Reblogger

February 19, 2008 – 5:00 pm

A huge number of posts I’ve been making are reposts selected from some of the feeds I read. I installed the wordpress plugin for reblog, an open source project by eyebeam. It didn’t work straight off the bat, but I found this bugfix which tells you that there are a pair of lines out of order (line 737-8 of the file ClientController.class.php). Here they are in the correct order. If $ARGS['user'] is numeric, which it is, it needs to be changed into an array like (id => 2) before using it as an argument when calling is_subclass_of(). Looks like a cut and pasting error. This is the correct order of those two lines:

if(is_numeric($ARGS['user']))
return new RF_User(array(’id’ => intval($ARGS['user'])));
if(is_subclass_of($ARGS['user'], ‘RF_User’))
return $ARGS['user'];

While this did fix the initial error, another error remained. The XML refeed was coming out but erroring midpost.

After quite a lot of digging, I found one of those annoying typo errors causing the problem:

Line 37 of the file reblog/refeed/style/templates/out/page-rss2.tpl should be changed from this:

<source url=”{$item->feed->url|escape}” link=”{$item->feed->link|escape}”>{$item->feed.title|escape}</source>

to this:

<source url=”{$item->feed->url|escape}” link=”{$item->feed->link|escape}”>{$item->feed->title|escape}</source>

There are still minor irritations that I will work on before using it anymore. For instance, I have some trouble with reposting videos and with editing these reblogged entries in the wordpress interface. There is a lot of information being passed around through html forms, databases, xml feeds, etc, and I think my problems are to do with improperly escaping characters and /or the embedded links that are added into the description field of typical RSS 2.0 feeds nowadays. I think I might like to strip my description fields of certain html that messes up the formatting of my page. Also, I thought it was linking back to each original post directly and it’s not, making it rather confusing. You don’t see it’s “reblogged” until you get to the bottom and if you click the link you get to my blog’s permalink page.

I checked the reblog help forums on sourceforge but alas, it seems robots sacked the town. This guy’s blog has a thorough explanation of the probable reason for the errors I’m experiencing… a failure to properly clean the data going into the mysql db… Not escaping single quotes can really mess up things when you are inserting data into a database.

  1. 1 Trackback(s)

  2. Feb 26, 2008: J2D3 » Blog Archive » Synchronous Surfing

Post a Comment