Mike’s Linux Desktop Experiences

January 8, 2009

Experimentation with Zenphoto

Filed under: Uncategorized — Mr. Mike @ 5:42 am

I’ve been doing some experimentation with Zenphoto. Trying to create a good php feed for Facebook so that I can be a bit more lazy about posting travel updates. Right now I can transcode a bunch of videos and images on my machine, upload them to Zenphoto, visit the gallery and it will generate the rss feeds and thumbs and everything on the fly.

The problem, or a problem, because there have been many, is that Facebook seems to mess up the RSS feeds. I sent them a message to find out if they could do anything about it. A URL like:


Gets converted to


So I did some searching about mod_rewrite and stuff, but instead found a nice idea to just replace some of the variables right off the bat. This is much more precise and should not introduce gaping security holes… unless they’re already there. At the top of i.php in zencore I added:

// Hack around a facebook bug where & gets changed to &amp%3B

It seems to work. I’m posting it here, because well, I need to have this somehwere so that when I eventually upgrade, I remember what I did.

What I’m not sure about is why the %3B is converted to a semicolon in the variable names.  I know %3B is a semicolon, but why is it *converted*?  I’m surprised that a semicolon is a valid array index in PHP.


  1. Hey did you get this running the way you wanted?
    I’ve been futzing with the existing facebook pluggins for zenphoto with no luck at all.
    My PHP is pretty limited so I doubt I could help you… but if you manage to find a solution here I’d LOVE to hear about it.

    Comment by Ben — March 18, 2010 @ 12:04 pm | Reply

  2. The solution *did* work. I’m not thrilled with how Facebook takes up the feed. It looks *okay* I guess.

    The basic idea of the solution above is that what *should* be


    instead gets mangled by Facebook into:


    So the php code checks if Facebook set the “i” variable. If it didn’t, then it sets it to what amp;i was.

    It was a while back that I hacked with this, and Facebook did some major changes, so I’m not sure if the problem still exists.

    (Note that WordPress might be messing up some of my special characters too)

    Comment by Mr. Mike — March 19, 2010 @ 12:12 pm | Reply

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: