RSS
 

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

 

Forcing a Flex VBox to scroll when necessary

16 Jun

The VBox Flex container allows you to stack objects vertically.  If your VBox can have an unknown number of children and your app is not a fixed height, a weird behavior can occur where the VBox height expands beyond the height of it’s parent.  This usually causes scroll-bars to appear in unexpected places and possibly messes up your application layout.  Fixing this can be a nightmare of chasing down parent containers and trying to control their clipping.

Fortunately there’s a simple solution . Just set  minHeight=”0″ and it will tell the component to not expand beyond the height of it’s Parent.  This works for any container with a vertical layout as well including Panels

There’s additionally an autoLayout property which can be set to false, however I can’t get consistent results with that.  It seems like there would be some more intuitive property name to control this behavior, but at least there is a solution.

 
1 Comment

Posted in Flex

 

Adding and Removing Children from a Flex XMLList

22 Mar

I seem to always forget how this is done and for whatever reason there’s a lot of posts floating around with confusing information.  The XMLList doesn’t have any methods for adding and removing items, or even obtaining items at a specific index.  Adding and removing children from an XMLList in Flex is actually simple, though. The XMLList can be treated as if it were an Array.

// create an XML object with one child.
var parentXml:XML = ;

// parentXml.child is an XMLList.  add two new elements
parentXml.child[parentXml.child.length()] = ;
parentXml.child[parentXml.child.length()] = ;

// remove the 2nd item
delete parentXml.child[1];

Put this code inside a function and step through it in the debugger to see what’s happening.

One thing to note is that if you are binding controls to “parentXml”, the UI doens’t necessarily receive update events when the child nodes are manipulated.  In this case you may have to dispatch an event to force the UI to re-call the getter for parentXml.  Although, that is a subject for another post…

 
1 Comment

Posted in Flex