Tag: php

July 20, 2007 / Technical Discussions
June 9, 2006 / CakePHP

I wanted to present a range of choices in a nicely formatted table and couldn’t see helper to do the job – so this is my first snippet for Cake PHP. I doubt it’s perfectly cake (for instance I do the header row myself rather than using the html helper, and I concatenate a string rather than building an array)

In this instance I added the function radioTable to a helper called “fed” and gave it the standard model and field variables.

May 28, 2006 / Technical Discussions

I’m working on a new project at the moment, it’s an intranet type thing so no point in linking to it, but I’m using CakePHP and thats been really interesting. Definately RAD, supposedly simple but it’s got so many really good features that while it is simple, it can be hard to discover the genius.

For instance,

  1. $this->flash controls post save redirects, but doesn’t do the actual redirect if you have debugging turned on. You have to dig out the default template to know this though.

DigitalPoint remains the number one forum on the net, as far as I can see and I’ve recently been made a moderator. It actually changes the way I use the forum and it’s really very interesting.

Christian Mezei owns SEOPedia and a free directory WebXperience – and he has big plans for that.

February 24, 2006 / PHP & Web Development

I just saw a forum post asking the difference between -> and => and it’s one of those tricky questions to research, just how can a search engine understand what you’re asking?

Well, luckily the answer is quite simple.

-> is used by objects to set, get or call a method of that object.
Ref: Chapter 18. Classes and Objects (PHP 4)

=> is used by arrays to describe the relationship between the key and the value
Ref: Arrays

Here’s an example of how the -> is used in a class

December 13, 2005 / PHP & Web Development

CaRP is a “Caching RSS Parser“, thus it’s name. It comes in a variety of flavours but I tested the free version.

The only problem I had was that my host had safe mode turned on and that caused some problems in the “installation” – creating the cache folders but the manual instructions did the trick.

The scripts come with an install and example page. To get real value check their online examples which show how you can combine two feeds and take the most recent, for example.

December 13, 2005 / PHP & Web Development

I’ve worked with DOMIT! because it’s part of the Mambo and Joomla CMS systems so I expected this to be a doddle. Sorry, it wasn’t. There were 2 undefined constants and one code defect which all took time to identify.

There is no doubt that the code in DOMIT! is far more exhaustive than that of Magpie but, really, you don’t need it if all you’re planning to do is parse an RSS onto a webpage.

December 12, 2005 / PHP & Web Development

This is the main page of a series (yet to be written) of How-To guides for adding RSS feeds to your website.

It’ll cover HTML and PHP scripted sites and all the tools will be free to use.

Why HTML? Well, some blogging systems and the Blogger sites don’t allow the user to add serverside scripts. Poop to them, but until they relax or allow some controlled way around it then those sites need to be treated as pure HTML.

Method Type Cache 3rd Party? SEF Score Demo
Magpie RSS PHP Yes No Yes 10 here
DOMIT! RSS PHP Yes No Yes 5 here
CaRP PHP Yes No Yes 4 here
SimplePie PHP Yes No Yes 10 here

October 11, 2005 / PHP & Web Development

I’ve been wanting to have a play with AJAX for ages and had book marked Rasmus’ 30 second AJAX Tutorial so tonight I took 30 seconds, which turned into 30 minutes and had a play.

I’ve extended his example slightly – to include a javascript fix and to make it a bit more browser safe – because I have Opera 7 as my test browser and it doesn’t work, but does for Opera 8 (apparantly).