Adam Green
Twitter API Consultant
adam@140dev.com
781-879-2960
@140dev

When in doubt, blame server paths

by Adam Green on November 12, 2010

in 140dev Source Code

I’ve been making a lot of changes in the 140dev code as a result of my son’s testing. It is great to get someone who isn’t an experienced PHP coder to test this. He blocks on things I’d just write around.

I modified the scripts in the Twitter database server module to eliminate the need for hard coded directory paths. This makes the installation process much easier.

I also decided to modify the Twitter display plugin. I had been using file_get_contents() to load the list of tweets into a Web page, but the more I read about it, the more I see that it will cause problems in the future. Too many Web hosts block its use. I’m switching this to an include() instead. It is a little messier, since it will be necessary to find the correct internal server path to get the tweets. I’ll add a helper script to show the right path to use once the code is on the server.

So I removed paths from one module, only to add them to another. It’s always paths when doing server code.

I’ll have this ready to release as version 0.11 on Saturday. I also have to rewrite the install pages for both modules. I see that I have to be much more clear, much earlier about what needs to be changed to install the code.

Previous post:

Next post: