RSS
 

Archive for the ‘PHP’ Category

HungryFEED RSS Plugin for WordPress

22 Jul

I decided to delve into the world of WordPress plugin development this week.  I’m a contributor to a site for film camera gear and we have a page that lists equipment for sale.  We wanted to pull in an RSS feed from eBay and display it on a page.  There seems to be a WordPress plugin for anything, but I was surprised that I couldn’t find one that worked the way I liked.  Anyway, two hours later and I had managed to write my own.  Without further ado, here’s HungryFEED.

I’m really impressed with the WordPress plugin API and distribution system.  It’s well organized with great documentation.  I was psyched to see the little “upgrade available” button next to my own plugin once I published it to the WordPress plugin directory!  Even though I prefer object-oriented code, I have to admit the procedural style of WordPress code is consistent and easy to follow.

In the process I also had get my hands dirty with SimplePie RSS library that WordPress uses.  It does a nice job of parsing all kinds of RSS but I found it a bit difficult to debug feed errors.  Its also a little touchy with eBay feeds and there seems to be some glitches using set_feed_url(), so I would up accessing feed_url directly, which doesn’t seem right.  But it works so it’ll have to do for now.

If you give the plugin a try, feel free to leave a comment on directly the HungryFEED page.

 
 

Phreeze Running as a Joomla Component

10 Jul

Our company has decided on Joomla to manage our primary website, however we’ve been writing code using our own Phreeze framework for several years and have a lot of time invested in these applications.  We’re now trying to integrate all of our web properties and provide single sign-on, which is a challenging task.  It occurred to me that we might be able to run our Phreeze applications as a plugin within the Joomla framework to avoid having to re-write a lot of code.

Read the rest of this entry »

 
 

Install WordPress 3 with Multiple TLDs

09 Jul

WordPress 3 now includes the features that were previously available as WordPress MU.  “MU” stands for Multi-User (or Multi-Site) and this lets you to run multiple blogs all from a single WordPress installation.  This walk-through will help you configure WordPress to manage multiple sites, each with their own top-level domain (TLD).

As you go through this walk-through, it helps to understand that WordPress MU was originally designed to create a branded, automated community of blogs using sub-domains such as user1.wordpress.com, user2.wordpress.com, etc.  You can sign up on wordpress.com right now and get your own instant blog, hosted on their servers.  You become a part of the wordpress.com community.  WordPress MU was designed to allow you to create your own communities under your own domain name branding.

This walk-through addresses a slightly different type of user which is perhaps a server admin or simply a person who runs several blogs.  There is no “community” and you don’t allow anonymous users to stop by and create a blog.  You might currently have WordPress installations on multiple servers with totally unrelated domains.  Keeping the code and plugins updated for multiple blogs gets to be a hassle, so the idea of a single, centralized WordPress install is appealing for maintenance reasons.  Thanks to WordPress’s flexible architecture you can do this, but it’s not part of the original design.

The reason I write all of this is to hopefully explain why TLDs are outside the scope of WordPress’s original design.  You can still set it up without understanding any of this, however it will make things easier if you know how the pieces fit together.

Read the rest of this entry »

 
18 Comments

Posted in PHP

 

Installing LAMP stack on OSX 10.6 Snow Leopard

18 Sep

I’m setting up a new machine and found a great tutorial written by Josh Lockhart on getting a PHP web development environment up and running on Snow Leopard.  This goes through almost everything to be up and running for a typical LAMP stack with unit testing using all of the default services.

Josh’s instructions include everything that I need except mcrypt.  Luckily Michael Gracie has provided a walk-through for installing mcrypt on Snow Leopard which involves re-compiling some things, but isn’t as tough as it first appears.

After getting PHP and mcrypt going, the last step for me is setting up MySQL which has some caveats on OSX.  The main problem is that the MySQL installer places the mysql.sock file in a non-standard place and so you have to either create a link or alter your php.ini file before PHP will be able to talk to MySQL.  (If you get “Can’t connect to local MySQL server through socket ‘/var/mysql/mysql.sock’” or  “No such file or directory” when calling mysql_connect, then this is the problem)

Read the rest of this entry »

 
7 Comments

Posted in MySQL, OSX, PHP

 

Flex Remoting and WebORB Mysterious Error Messages

01 Jul

If you work with Flex remoting and WebORB, you are probably familiar with the following errors:

  • NetConnection.Call.Failed: HTTP: Status 500
  • Channel Disconnected

You may have tried directing your browser to weborb.php only to get this message: “WebORB v3.5.0 Fatal error: Call to a member function getServiceURI()”

The getServiceURI message is actually a red herring error message.  This simply occurs because weborb.php is expecting the raw headers to contain Flash remoting AMF message data.  Your browser is just making a normal HTTP GET and doesn’t know anything about AMF.   So weborb.php winds up with a null object on which it tries to call getServiceURI().  I wouldn’t be surprised to see a future release of WebORB that catches this error, even though it isn’t the purpose of this particular file to run inside a browser.

Read the rest of this entry »

 
2 Comments

Posted in AIR, Flex, PHP