MT Blogroll 2.0 Public Beta

UPDATE: If you have any feature request I'm all ears. Gearing up for the release I want to see if there are any feature requests I can implement, I think I've fixed all the bugs that were reported so expect a release in the next few weeks.

I had released this to ProNet a few days ago but have not gotten much feedback. That can be either that people are waiting for the point release and don't want to install a beta or that there aren't many bugs in this beta. Either way I want to open up testing for MT Blogroll 2.0 (I'm still thinking about that version number). I'm going to copy my post to ProNet here to save me some time.

I've re-written Blogroll to use its own tables in the DB so before using mt-blogroll, you'll need to run mt-br-load.cgi (thanks Jay for letting me use mt-bl-load.cgi as the base) after that you'll need to run the config to make sure that everything is to your liking. mt-br-load.cgi imports all the data from the previous version of MT Blogroll, for the moment I have coded it so that it doesn't ever delete the old records so you can continuously re-run mt-br-load.cgi to re-load the tables. So far I've only created a schema for the mysql db as I only have real experience with that. I may need help creating a schema for PostgreSQL and SQLite.

On the config screen you'll have two values to set. The first is on what fields to display on the "Create a Link" screen. At the moment, Simple doesn't have the XFN generator whilst Advanced does.

The second option is for checking the last updates times on a blog. Basically new code in Blogroll calls pingomatic to check if/when the last time a blog on your blogroll pinged them and updates the db with that value. To have this work you will need to run the update-links.cgi script in the same directory as mt-blogroll.cgi. This can be done either way, you can either call it in your browser and have it update links that way (manually) or you can automatically tell it to run by cronning the script. The command you'll need to cron is similar to run-periodic-tasks:

cd <mt dir>; ./plugins/Blogroll/update-links.cgi

If you enabled the option you'll need to set a duration value as well. This duration value is used to evaluate the MTBlogrollEntryIfUpdated tag. Those of you who have used Blogrolling.com this is the same as the "what do you want to do with recently updated blogs" Basically this tag checks the difference between the current time and a recently updated time stored in the DB. If the difference is less than or equal to the duration you set previously, it will evaluate as true. For example, if you wanted recently updated blogs to have "new" next to them it would be something like this

<MTBlogrollEntryIfUpdated>NEW</MTBlogrollEntryIfUpdated>

If you use this tag will not be evaluated dynamically in static templates, ie MT Blogroll will only evaluate that tag during a rebuild. This means that the tag will use the time at rebuilding. This is where the next new feature of MT Blogroll kicks in. I have ported all the tags to the PHP system which means that you can now display Blogroll links in a dynamic template. If you use the MTBlogrollEntryIfUpdated tag, that will be dynamically evaluated so it will use the current time as a comparison rather than the time of rebuild (does that even make sense!)

If you really want to have the best of both worlds (ie you want a dynamic blogroll on a static page) create a dynamic index template with the blogroll code. In the static templates, add the following code where you want the blogroll to appear:

cd <mt dir>; ./plugins/Blogroll/update-links.cgi
 <?php
    include('<$MTCGIServerPath$>/php/mt.php');
    $mt = new MT(<$MTBlogID$>, '<$MTCGIServerPath$>/mt.cfg');
    $mt->display("mt:template template name");
?>

Other new features include the introduction of a MTBlogrollCategories container tag. I have tried to make MTBlogrollEntries and MTBlogrollCategories act as their MT counterparts (MTEntries and MTCategories) so almost all the same attributes are available (i.e. with MTBlogrollEntries you can use things like lastn, offset, category etc.). The only problem is I've not figured out the code if an MTEntries is embedded within MTCategories like so

<MTCategories>
<MTEntries>
...
</MTEntries>
</MTCategories>

Hopefully if I find some time I can fix this.

If you have a look at the UI you'll see there's loads of new things and tags for almost all of them, basically everything on the add link page has a tag. I've now got the date of creation and modification being tracked as well as authors. As a result there are loads of new tags. As there are so many tags I would recommend just looking at the top of Blogroll.pl for a full list (sorry just lazy heh!)

I think that should be all for now so enjoy The directory structure within the zip relate to the same named directories in MT. The docs still correspond to the old version, sorry about that.

I think that's it for now. Have fun playing around with it, I've had a blast writing it. This beta should be quite stable and should be fine to install on a working instance of MT

46 Comments

ac said:
on Mar 21, 2005 9:51 PM | Reply

Sounds like you've done some wonderful work on this plugin. Unfortunately, I am unable to use it. I get a 500 Internal Server Error when I try to run mt-br-load.cgi. Yes, I uploaded the files in ASCII (except for images!), and yes, I changed permissions to 755. I even tried some of the fixes suggested for version 1.0. I changed $DEBUG = 1; in Blogroll.pm, but nothing is showing up on my activity logs.

ac said:
on Mar 21, 2005 10:03 PM | Reply

Nevermind. I uploaded the cgi files again, changed the permissions again, and now it's working. Go figure! However, I still have the problem from 1.0 where the ampersand character breaks any ability to edit or delete entries in the blogroll.

An error occurred: Can't call method "output" on an undefined value at lib/Blogroll/Blogroll.pm line 517. Use of uninitialized value in string eq at lib/Blogroll/Blogroll.pm line 407. Use of uninitialized value in string eq at lib/Blogroll/Blogroll.pm line 407. Use of uninitialized value in string eq at lib/Blogroll/Blogroll.pm line 407.

Is there a way to completely wipe out my blogroll and start over?

Lola said:
on Mar 21, 2005 10:39 PM | Reply

I just installed this - it looks great, thank you for the hard work! I especially appreciate the multiple categories.

A minor interface bug - I'm seeing "Filter Options" repeated twice - is this intentional or not?

Lola Lee said:
on Mar 21, 2005 10:53 PM | Reply

Another question . . . if I want to display "new", or some other symbol to indicate blogs that have been updated, I have to use the php code, right? So I create a template containing the code used to create the list, and name it something like "Bloglist.php" and use the include code you have created?

Lola Lee said:
on Mar 21, 2005 10:55 PM | Reply

And yet another question - how often do you recommend that the cron job be run? I need to submit a request to my hosting service and would like to get an idea of what is the reasonable frequency - like every hour or every 6 hour.

Josh Poulson said:
on Mar 22, 2005 1:36 AM | Reply

Feature request: allow the specification of an index template that gets updated after the blogroll checks for recently updated, if the information has changed.

Justification: Most of my site is static and my strip on the side is updated independently of the index page, and is included on as many pages as possible by a server-side include. Server side includes invoke far less load on the server's CPU than dynamic index pages. If a single index template for the blogroll could be updated (only if information changed) it would support the goal of minimizing CPU utilization.

Arvind Satyanarayan said:
on Mar 22, 2005 6:49 AM | Reply

Ac: The ampersands should not cause anything to break. Where are you experiencing that error, that error means that it doesn't have a tmpl file to parse -- I thought I had fixed this bug perhaps not.

Lola: Thanks for that bug report, I'll fix it. About the displaying a NEW. You don't really need the PHP code, you could use MTBlogrollEntryIfUpdated in a static template but it would need to be rebuilt constantly to reflect the true update status. The PHP code is there as a workaround for that issue. About the update times, If you are on a shared server I would set it to run perhaps every 2/3 hours. I have found no need to run it any faster.

Josh: I would recommend you use a script like mt-rebuild to rebuild your templates. I will not be adding any rebuild code to update-links.cgi because as we saw that is a bad idea. update-links.cgi can be run by anyone from a web browser. At the moment there's no worried with that but if I included rebuild stuff in there it would shoot loads up as with MT versions prior to 3.14

Zack said:
on Mar 22, 2005 7:55 AM | Reply

The only problem is I've not figured out the code if an MTEntries is embedded within MTCategories

Does this mean that we can't yet list the blogroll items separated into different categories?

Also, I think is not corrected for the fact that the blog time zone can be different from the server timezone.

Thanks for a good plugin.

Arvind Satyanarayan said:
on Mar 22, 2005 8:03 AM | Reply

You can list entries by their category using

<MTBlogrollEntries category="Foo">
but what you can't do is have
<MTBlogrollCategories>
<MTBlogrollEntries>
...
</MBlogrollTEntries>
</MTBlogrollCategories>

so that it loops through the categories and list all entries in that category.

Zack said:
on Mar 22, 2005 10:44 AM | Reply

Also, I think <MTBlogrollEntryIfUpdated> is not corrected for the fact that the blog time zone can be different from the server timezone.

PS. Your quicktags have the <code> tag listed but it's not in your sanitize spec.

ac said:
on Mar 22, 2005 10:03 PM | Reply

I put copies of the template files in /tmpl/plugins/ as well (not explicitly indicated in the installation instructions, btw), and I am now able to get to the delete confirmation screen. When I choose "yes," I get the following error:

Use of uninitialized value in string eq at lib/Blogroll/Blogroll.pm line 365. Use of uninitialized value in string eq at lib/Blogroll/Blogroll.pm line 365.

I went back and checked, and the item I tried to delete is still there.

Arvind Satyanarayan said:
on Mar 23, 2005 6:01 AM | Reply

That's wrong. You shouldn't put the tmpl files into tmpl/plugins/, you need to put them into plugins/Blogroll/tmpl/ As I said before the folder in the zip coresspond to the folders in your MT Directory so everything in the plugins/ folder in the zip goes into your plugins/ folder in your MT Directory.

What were you deleting when you got that error ?

ac said:
on Mar 23, 2005 11:39 PM | Reply

Okay, I took the stuff out of tmpl/plugins and left everything in the appropriately corresponding folders. I am trying to delete some entries in MT-Blogroll. What kinds of details do you need? I notice that this is at the bottom of the delete confirmation page:

Use of uninitialized value in string eq at ../../lib/Blogroll/Blogroll.pm line 528. Use of uninitialized value in string eq at ../../lib/Blogroll/Blogroll.pm line 528. Use of uninitialized value in concatenation (.) or string at /usr/local/lib/perl5/5.6.1/File/Spec/Unix.pm line 78.

Zack said:
on Mar 24, 2005 8:09 PM | Reply

I am getting some strange results with the <MTBlogrollEntryModifiedDate> tag. For example, instead of "March 21, 2005 09:53 PM", I am getting "December 3-, 2005 09: 2 PM" which doesn't make sense at all.

Zack said:
on Mar 24, 2005 10:18 PM | Reply

Regarding my previous comment, I have figured out what is causing the problem with the dates. In MySQL 4.1 and later, the format of timestamp is 'YYYY-MM-DD HH:MM:DD'. formatts expects YYYYMMDDHHMMSS, so the time read from the database needs to be converted to this format before being passed to formatts.

Zack said:
on Mar 25, 2005 12:38 AM | Reply

When I run update-links.cgi, I get the following error:

Can't call method "data" without a package or object reference at ./plugins/Blogroll/update-links.cgi line 48.

yezbick said:
on Mar 25, 2005 3:00 AM | Reply

Is there a way to drop multiple feeds into a category at once from the interface? I have all my feeds in folders in Sage - and the exported opml leaves me with 264 to assign back into their Categories. -- I'm not seeing any way to check the box and drop multiples at once...It'd save a lot of time...

Also -- I'm getting little blurbs at the bottom of the page: Use of uninitialized value in split at lib/Blogroll/Blogroll.pm line 427.

Thanks...

Arvind Satyanarayan said:
on Mar 25, 2005 7:30 AM | Reply

Thanks for the bug reports. I just realized that update-links.cgi won't work at all... I'll need to release a new beta soon but no time!

Zach: Does the format attribute work on your MTEntryModifiedDate ?

Arvind Satyanarayan said:
on Mar 25, 2005 7:42 AM | Reply

Ac: What were you deleting when you got those errors? I've deleted categories and entries and it seems to work fine.

Zack said:
on Mar 25, 2005 8:18 AM | Reply

Arvind: Just realized MTEntryModifiedDate doesn't work either. I have modified both that and MTBlogrollEntryModifiedDate by adding a regexp there.

rowan said:
on Mar 25, 2005 8:58 PM | Reply

Help! All the links for the zip files (both 1 and 2) no longer access the zip files for MT-Blogroll. Did something go wrong or have they just been moved elsewhere?

Arvind Satyanarayan said:
on Mar 25, 2005 10:01 PM | Reply

Something went wrong :) The links should work again, sorry for the problems.

rowan said:
on Mar 26, 2005 10:02 PM | Reply

I got everything installed and the blogroll link seems to work. However, the window that comes up does not make sense to me.

How do you add blogrolls and blogroll categories? And what is the "identity" "Friendship"... stuff?

rowan said:
on Mar 26, 2005 10:17 PM | Reply

Oh Duh, Just went into the blog and see where you can create categories. Still confused about the stuff at the bottom of the screen. Also that on "save" it prompts for rebuilding the site. If a rebuild is necessary, which files should be rebuilt?

Thanks

Julie said:
on Mar 28, 2005 10:06 AM | Reply

Hey, I am using this now... Or rather, trying it out. I will ping you as soon as I make a post in my new MT blog, or comment here if it doesn't work. :p

FYI- the link to the "README.txt" isn't working, and the link to the documentation on the main menu of MT doesn't work either.

Arvind Satyanarayan said:
on Mar 28, 2005 11:45 AM | Reply

Thanks for the heads up, the links should be working now!

Stephen Collins said:
on Mar 28, 2005 4:05 PM | Reply

I've added a couple of links to my new blogroll, which worked fine. Then I updated one with XFN data. Now, I get this (the Blogroll.pm line number varies - 757 in the admin, 165 on a rebuild.) whenever I try to view my Blogroll - either in the admin pages, or in a rebuild:

An error occurred:
Can't use an undefined value as a SCALAR reference at lib/Blogroll/Blogroll.pm line 757
Use of uninitialized value in substr at /home/httpd/vhosts/stephencollins.org/cgi-bin/mt/lib/MT/Serialize.pm line 49.

I'm using MT 3.15, the latest MT Blogroll 2.0 Beta and Berkeley DB (I know, I should use MySQL, but I haven't had time to upgrade).

Daniel Freedman said:
on Mar 28, 2005 11:09 PM | Reply

I'm trying out this plugin and it works fine on my local (test) server, but when I uploaded it "live" I'm getting these error messages from cron, which is used to monitor the "future posting" capability within MT 3.15

Subroutine approve_comment redefined at lib/MT/App/CMS.pm line 1982. "my" variable $i masks earlier declaration in same scope at plugins/Blogroll/lib/Blogroll/Blogroll.pm line 745. "my" variable $i masks earlier declaration in same scope at plugins/Blogroll/lib/Blogroll/Blogroll.pm line 751. "my" variable @entries masks earlier declaration in same scope at plugins/Blogroll/Blogroll.pl line 150.

Any ideas?

Thanks

Dan

yezbick said:
on Mar 30, 2005 5:24 PM | Reply

I just checked my error logs and I'm getting the same error as Daniel: "my" variable $i masks earlier declaration in same scope at plugins/Blogroll/lib/Blogroll/Blogroll.pm line 745. "my" variable $i masks earlier declaration in same scope at plugins/Blogroll/lib/Blogroll/Blogroll.pm line 751.

Arvind Satyanarayan said:
on Mar 30, 2005 6:14 PM | Reply

That isn't an error simply a warning, it will do no harm to your installation and will be corrected in the next version. Thanks

Daniel Freedman said:
on Mar 31, 2005 3:49 AM | Reply

I've edited the Blogroll code to get rid of the "masks earlier declaration" warnings, but I'm still getting the "approve_comment redefined" error message. I have a feeling this is more to do with the Save and Rebuild hack I also applied on the same day, though. I've tried googling for this one, and although I've found some posts from other people getting the same error after applying different hacks, no-one's yet managed to come up with a solution. I tried commenting out "use strict;" from the top of cms.pm but that didn't fix it.... could it be my ISP's implementation of cron or perl that's causing this error?

Dan

Arvind Satyanarayan said:
on Mar 31, 2005 7:39 AM | Reply

I have posted some hacks that worked with the approvecomment subroutine, perhaps you implemented it incorrectly. Basically the error message says that there are two approvecomment subroutines, you will need to delete one of them.

Daniel Freedman said:
on Mar 31, 2005 3:38 PM | Reply

Unfortunately I can't find where the other "approve_comment" routine is defined! After I posted my last comment I went back to the standard CMS.pm and I'm still getting the error message from cron, so you're right, it's something else I've done. I just wish I knew what it was :-)

Lola Lee said:
on Apr 2, 2005 3:04 AM | Reply

Any idea when you'll have an updated version of Blogroll? It'd sure be great to have the update script working again.

Arvind Satyanarayan said:
on Apr 2, 2005 9:00 PM | Reply

I'm looking at a point release hopefully by next weekend, hang in there!

Zack said:
on Apr 3, 2005 11:31 PM | Reply

About feature requests, I would like the MTBlogrollEntries to wrk properly inside MTBlogrollCategories. Thanks!

jerm said:
on Apr 4, 2005 5:35 AM | Reply

Feature: I know a few sites that use blogrolling have a bit of javascript that the reader can then place on their site to display the roll.

jerm said:
on Apr 4, 2005 5:35 AM | Reply

Feature: I know a few sites that use blogrolling have a bit of javascript that the reader can then place on their site to display the roll.

Kristine said:
on Apr 4, 2005 7:06 AM | Reply

This is great! I had been meaning to try it out, but finally made time this weekend since my blogrolling subscription was running out ;)

Just a few comments and feature requests...

  • It took me a bit to find the link to the actual editing of the blogroll after I created my bookmarklet, so a pointer on that page would be a great idea, like others have mentioned :)
  • Once you have multiple categories, if you filter one, and then edit a link, it goes back to the unfilter screen. (similar to what ambimb said on the comments for Blogroll 1.0)
  • On the blogroll screen, it would be nice if the name of the blogroll link was a link to the edit page, either instead or or in addition to the current "edit" link. I'm used to the Entries and Templates pages actually using the left-hand title to link somewhere rather than have to look to the end of the line to click the edit link.
  • A container tag for the MTBlogrollEntryRel would probably be nice - I have some blogroll items that I have Rel info set up for, but other items don't, so they show rel="" in the tag. So a container or something similar could help with that, to only show the tag if it was available.
  • The thing I'll probably miss most from blogrolling is that I could set priority levels to easily sort my list. So if I had one person who was always meant to be on the top of a list, I'd give it a priority 1. If you want more ideas on this, I'm happy to brainstorm more on how I used it! Some sort of an ordering screen like "move up" and "move down" would be really cool. I suppose I could use the description field to put my numbers rather than an actual description and then try the sort order by description.

Thanks, this is really gonna be a useful tool for me, and I'll be sure to let you know any other feedback as I get more time to play with it :)

Anna said:
on Apr 5, 2005 1:46 AM | Reply

Ac: What were you deleting when you got those errors? I've deleted categories and entries and it seems to work fine.

As I wrote before, I'm getting the errors when I try to delete entries.

-P- said:
on Apr 12, 2005 3:16 AM | Reply

Hi! If it´s not too late for suggestions then... Is it possible to get link submitters name to show also with link in the page besides admin area?

I was planning to use your blogroll as a sidekick of one of my blogs which has 5 authors. Also link listing archives by author would be awesome.

This goes ofcourse bit beyound the normal blogroll behaviour but why not?

rowan said:
on Apr 17, 2005 4:43 AM | Reply

I am getting the following error after setting up the plugin: "Plugin error: plugins/glue.pl syntax error at plugins/glue.pl line 1, near "pl" BEGIN not safe after errors--compilation aborted at plugins/glue.pl line 9. Compilation failed in require at lib/MT.pm line 291."

It is preceeded by the following error message in the activity log: "Plugin error: plugins/Blogrollremove/Blogroll.pl Can't locate Blogroll/Blogroll.pm in @INC (@INC contains: ./plugins/Blogroll/lib ./extlib ./lib /usr/lib/perl5/5.8.4/i686-linux /usr/lib/perl5/5.8.4 /usr/lib/perl5/site_perl/5.8.4/i686-linux /usr/lib/perl5/"

Any idea what I am doing wrong?

Eric Six said:
on May 24, 2005 2:06 PM | Reply

Having some install issues.. I have installed the program and set permissions on the cgi files. All I get is a 500 error when trying to run the mt-bl-load.cgi. Any ideas?

Setup= MT 3.16, BerkelyDB, Linux.

For install I wget'd the files from your site, unzipped them into a temp directory and then copied them as outlined. I then set the permissions on the files in the mt/plugins/blogroll directory. No luck..

help!?

cheers Eric

Ari Paparo said:
on Jun 26, 2005 7:52 PM | Reply

Any progress on a sqlite version?

relaxedguy said:
on Aug 20, 2005 5:16 AM | Reply

I am getting the folowing error when try to load the beta 2 version of blogroll. Platform is MT 3.2b5. What do I have to change the @INC?

Plugin error: /home/httpd/vhosts/etnaroc.com/cgi-bin/mt/plugins/Blogroll/Blogroll.pl Can't locate loadable object for module DateTime in @INC (@INC contains: ./plugins/Blogroll/lib /home/httpd/vhosts/etnaroc.com/cgi-bin/mt/plugins/Blogroll/lib /home/httpd

relaxedguy said:
on Aug 20, 2005 5:17 AM | Reply

Another bug, related? When I run mt-blogroll.cgi I get the following error:

Can't read config without config file name at ../../lib/MT/ConfigMgr.pm line 285 MT::ConfigMgr::readconfigfile('MT::ConfigMgr=HASH(0x87e74e4)','undef') called at ../../lib/MT/ConfigMgr.pm line 249 MT::ConfigMgr::readconfig('MT::ConfigMgr=HASH(0x87e74e4)','undef') called at ../../lib/MT.pm line 375 MT::readconfig('MT=HASH(0x8f76054)','Directory','undef','Config','undef') called at ../../lib/MT.pm line 397 MT::init('MT=HASH(0x8f76054)') called at ../../lib/MT.pm line 72 MT::construct('MT') called at ../../lib/MT.pm line 65 MT::instanceof called at ../../lib/MT.pm line 58 MT::new('MT') called at lib/Blogroll/Blogroll.pm line 701 Blogroll::Blogroll::showqueue('Blogroll::Blogroll=HASH(0x87572e4)') called at ../../lib/MT/App.pm line 584 eval {...} called at ../../lib/MT/App.pm line 548 MT::App::run('Blogroll::Blogroll=HASH(0x87572e4)') called at mt-blogroll.cgi line 42 main::BEGIN() called at mt-blogroll.cgi line 43 eval {...} called at mt-blogroll.cgi line 43