The purpose of this blog is to improve my English. I'm sure you can help me.
Please write comments and make suggestions.

Collapsing blogroll

Collroll is my new plugin that lets you insert your blogroll into a static page or into a post. The categories are collapsed by default. Here is how it looks like.

As Collroll uses the built-in blogroll no extra database table is used to store your bookmarks. Once the plugin is activated the background color for the category titles can be set. Have a look at the screenshot.

Download | Show download statistics

Collroll admin page

Leave me a comment if you wish some features. You can also chat with me if you add me to your friends list on facebook 1.

Ideas related to this plugin:

  • Link descriptions (planned for the next version)
  • A browser plugin for direct bookmarking a web page on your blog. If you’re a desktop application developer contact me please.
  • Sharing bookmarks with other bloggers. For instance you will be able to show bookmarks of your friends on your site or just set a link to them.
  • Option to open the link in a new page by default regardless of which setting is set while adding a new link.
  1. I’m the one with the hockey stick in the background
Other posts:

65 Comments

  • By Tom B., February 8, 2009 @ 10:35 pm

    I was trying out this plugin on my test site, and ran into a problem. As you can see at this page, it kind of breaks my theme. Any ideas?

  • By Slopjong, February 9, 2009 @ 9:58 am

    Great, someone is using my plugin. This is motivation :)

    I’ve just took a look in your page code and I didn’t find anything strange. I’m analyzing it later on this day.

    Stay tuned.

  • By melissa, February 10, 2009 @ 5:10 pm

    The instructions on the wordpress download page are not clear how to insert this into a weblog. All they say is “Put in your post or on a page where the blogroll should appear.” I installed this from my WP admin panel, so I did not get the readme file that comes with the .zip — you should edit that installation language to describe more fully how to install.

    Once I downloaded the .zip, and saw there was a readme file, I see “Put in your post or on a page where the blogroll should appear.” However, adding a text widget with “” does not work. I tried editing the php for the sidebar directly and inserting ““, and it did not work.

    So, what are the exact steps to adding this to the sidebar (through a text widget?) or in the php itself.

    Thanks!

  • By melissa, February 10, 2009 @ 5:12 pm

    And now I’m starting to wonder – can this not be used in the sidebar at all? Does it need posts tags around it to make it work?

  • By melissa, February 10, 2009 @ 5:46 pm

    It works great in a page itself (yippee!) – but if you have any tips on how to make it work in my sidebar, you’d be my hero!

    (sorry for the multiple posts…)

  • By Slopjong, February 11, 2009 @ 12:09 pm

    Cool, one more who’s using my plugin :)

    If you have some feature requests please let me know. My plugin might break your theme design, if so contact me.

  • By Tom B., February 11, 2009 @ 8:12 pm

    That took care of the problem. You might want to add that to your readme file.

    I do have a couple of suggestions. Convert it to a shortcode, rather than the comment code. That way people using the RTF editor can see where it is without switching to the HTML editor. And maybe allowing users to control the width of the field, rather than setting it to cover the entire page. And as melissa points out, a lot of people like the blogroll in the sidebar, so if you can create a widget, it will add to your possible users.

    Hope those give you some ideas. Thanks for the help getting the problem fixed.

  • By Tyler, February 13, 2009 @ 9:19 am

    Hey, I just installed your plugin, but I’m not sure exactly what I’m supposed to insert into the page. I installed/activated the plugin, set up a page called ‘Links’, but what text do I insert into that page? Thanks.

  • By Tyler, February 13, 2009 @ 9:22 am

    Nevermind, figured it out. Thx for the cool plugin. Keep up the good work!

  • By Courtney Bostdorff, February 21, 2009 @ 11:54 am

    Hello, Great Plugin. I have a feature request. I’m using “My Link Order” to put my categories and links in the order I need them, however it’s a completely separate linking system apart from the default “blogroll”. Any way to set the link order for both categories and then links? Thanks!

    Courtney Bostdorff

  • By baron, February 24, 2009 @ 5:06 pm

    hi. Thanks for plugin

    perfect.

    Regards

  • By Karel, February 24, 2009 @ 8:35 pm

    Great idea! However, when I click Expand or a category header I get redirected to the first link in the category! See http://www.boskapel.nl/andere-sites/

    I’ll leave it in for the moment, but that is really awkward. Tested with FF3 and IE7.

    Regards!

  • By Karel, February 24, 2009 @ 8:37 pm

    (Clicking the first category header seems to work OK)

  • By Karel, February 24, 2009 @ 8:48 pm

    Solved, more or less: it is a conflict with the plugin Identify External Links. Now which one do I like more…

  • By slopjong, February 24, 2009 @ 9:19 pm

    No idea what Identify External Links is for. I don’t see any changes at the first glance if I activate that plugin.

    Update: Now I know what you mean. Well I’m trying to bugfix it. Stay tuned.

  • By Iskak, February 25, 2009 @ 2:17 am

    Cool…. very cool

  • By Teresa, March 8, 2009 @ 12:04 am

    Great plugin. How do I set it so the default is for the links to NOT be collapsed?

  • By chris, March 8, 2009 @ 1:14 am

    How do you change the color of the text?

  • By slopjong, March 8, 2009 @ 12:44 pm

    @ Teresa: Not yet possible. I’ll add a new option for that.
    @ Chris: Not yet possible again. I’ll add a new option for that too ;-)

  • By ramon, March 9, 2009 @ 12:35 am

    Hi. Thanks for the plugin.

    What about columns to show blogroll links?

  • By slopjong, March 9, 2009 @ 9:43 am

    Nice suggestion. Thx.

  • By Kim, March 15, 2009 @ 6:58 pm

    Can this plugin be used in the sidebar and if so how?

  • By slopjong, March 15, 2009 @ 7:13 pm

    No. Take a look at “Related plugins” in the readme file.

  • By misterjaytee, March 28, 2009 @ 8:54 pm

    Nice plugin. I have a couple of requests:
    * The links could do with the description displayed by the side (like the blogroll-links plug-in).
    * It would be nice if the default colours related to h1, h2 or h3 from the css

    Keep up the good work :)

  • By misterjaytee, March 28, 2009 @ 8:56 pm

    P.S. I like the way it leaves out empty categories (or ones with no visible links). That means I can make all the links in the default “Blogroll” invisible and they won’t display on my main links page.

  • By misterjaytee, March 28, 2009 @ 9:07 pm

    Just found out that you can display descriptions by editing the settings.php file.

    Two slight issues with the descriptions though:
    * Any html markup in them doesn’t work (sometimes I have related links there) – blogroll-links plugin does this okay, but I prefer your plugin ;)
    *There only a space between the link and the description – it could do with something like ” – ” in between.

    I’ll try and hack the php files for now to do this.

  • By misterjaytee, March 28, 2009 @ 10:10 pm

    Okay – thought I’d persevere and we’re nearly there:

    To display the description and put ” ~ ” between the link and description, edit the settings.php file – wp-content/plugins/collroll/settings.php

    From the line where it says “// Not stored in the database” substitute with this (until the end of the file):

    $collroll_default_settings = array(
    ‘category_order’ => ‘ASC’,
    ‘order’ => ‘ASC’,

    ‘limit’ => -1,
    ‘category’ => ”,
    ‘exclude_category’ => ”,
    ‘category_name’ => ”,
    ‘hide_invisible’ => 1,
    ’show_updated’ => 0,
    ‘echo’ => 1,
    ‘categorize’ => 1,
    ‘title_li’ => ‘Bookmarks’,
    ‘title_before’ => ”,
    ‘title_after’ => ”,
    ‘class’ => ‘linkcat’,
    ‘category_before’ => ‘‘,
    ‘category_after’ => ‘
    ‘,
    ’show_description’ => ‘1′,
    ‘between’ => ‘ ~ ‘

    );
    ?>

  • By misterjaytee, March 28, 2009 @ 10:12 pm

    Sorry that didn’t work – I should have put code links around it!

    put this in the file:
    $collroll_default_settings = array(
    'category_order' => 'ASC',
    'order' => 'ASC',

    'limit' => -1,
    'category' => '',
    'exclude_category' => '',
    'category_name' => '',
    'hide_invisible' => 1,
    'show_updated' => 0,
    'echo' => 1,
    'categorize' => 1,
    'title_li' => 'Bookmarks',
    'title_before' => '',
    'title_after' => '',
    'class' => 'linkcat',
    'category_before' => '',
    'category_after' => '
    ',
    'show_description' => '1',
    'between' => ' ~ '

    );
    ?>

  • By misterjaytee, March 28, 2009 @ 10:13 pm

    Arghh! It’s not working.

    Okay, replace the last line in the array with this (and ignore the rest):

    ’show_description’ => ‘1′,
    ‘between’ => ‘ ~ ‘

  • By misterjaytee, March 28, 2009 @ 10:16 pm

    And to properly display hyperlinks (or other html) in the decriptions, edit the file
    wp-includes/bookmark-template.php

    In function _walk_bookmarks , find the line:

    $output .= $between . $desc;

    and replace it with:
    $output .= $between . $bookmark->link_description;

  • By misterjaytee, March 28, 2009 @ 10:24 pm

    The only problem I have left now is that the Expand/Collapse links do not work, but clicking each link does – obviously the function switchmenu works.

    When I click the Expand/Collapse links, I get a javascript error complaining that “el is null”.

    Any ideas?

  • By misterjaytee, March 28, 2009 @ 10:34 pm

    Okay, sorted that last problem as well – the clever bit that doesn’t display invisible bookmarks (or categories with no bookmarks) needs to be used in the closeall and openall functions.

    So I hacked frontend.php and in the openall and closeall functions, before the echo “var el = document… part, I added the code:
    $params = array_merge($merged_options, array(’category’=>$cat->term_id));
    $bookmarks = get_bookmarks($params);
    if ( empty($bookmarks) )
    continue;

    Thanks for the plug-in – it’s now replaced the blogroll-links plug-in :)

  • By nomercy, April 15, 2009 @ 6:00 am

    Hi … error found in frontend.php :

    style tyle=”text/css”

    must be type

  • By melissa, April 16, 2009 @ 8:33 pm

    I know you pointed us to “Collapsing Links” as a way to get those into a sidebar widget… but that plugin is no longer supported, and doesn’t work for 2.7+.

    So, is there any chance you would consider incorporating your functionality into an accompanying widget?

  • By slopjong, April 16, 2009 @ 8:56 pm

    Yes there is a way. Few days ago I saw my plugin displaying the blogroll in the sidebar of one of my users. I had not time yet to figure it out. Thanks for your suggestion about “Collapsing Links”. I didn’t notice that it’s not compatible with 2.7+

  • By slopjong, April 20, 2009 @ 12:39 am

    @Melissa: Use the ‘Text’ widget and type in [collroll]. This worked for another blog’s owner but not for me for whatever reason.

    It would be cool if I got feedback if this works for you or not.

  • By slopjong, April 20, 2009 @ 1:59 pm

    @Melissa: Check the website http://doxaconsultoria.com.br and take a look in the sidebar. As I can see ‘Collapsing Links’ works on wp 2.7+
    Give it a new chance ;)

  • By melvin, April 29, 2009 @ 10:43 pm

    Hi

    I would like to change the text size of the categories on the page. It is too large in the theme I am using. Don’t want to change the theme though.
    Otherwise a great plugin. Exactly what I was looking for. I’ve moved from develping sites in Joomla to WP, and what a pleasure.

    Cheers
    melvin

  • By slopjong, April 29, 2009 @ 10:48 pm

    This feature is already implemented. I was working on other things last days so I didn’t publish the new release. I still have to deal with a problem that I’ll solve soon.

  • By Jacki, May 5, 2009 @ 6:18 am

    Thanks for the plugin – it’s really nice! I just wondered how you can edit it to make the links all open in a new window (ie target=”new”) as I don’t like sending visitors AWAY from my site completely.
    Cheers

  • By Jacki, May 5, 2009 @ 6:34 am

    PS the fix for getting it to show in the sidebar did not work for me either – all I got was the same as you can see in your sidebar. Obviously some sort of code needs to go there as it is just reading it as text (also putting html tags in didn’t work).

  • By slopjong, May 5, 2009 @ 10:19 am

    Jacki, tanks for this notice.

    I’ve decided to create a widget for displaying it in the sidebar but give me some time. I have to do other things first. I’ll modify the code too to set the target to “_blank”.

    Have a nice day.

  • By cp, June 22, 2009 @ 10:28 pm

    Is there an update for wp 2.8?

  • By slopjong, June 23, 2009 @ 8:00 pm

    Are there problems? I didn’t care about Collroll in WP 2.8 because it worked in my offline WP 2.8 installation. But I tested it 2 months ago so there could have changed some things.

    Let me know what problem you have.

  • By Brian, June 29, 2009 @ 10:20 am

    Hi,

    Great plugin, but as nomercy points out there’s a typo on line 88 of frontend.php where ‘tyle’ is used instead of ‘type’ which makes validation fail.

  • By slopjong, June 29, 2009 @ 3:08 pm

    This bug was fixed but I forgot to tag the new version. First I have to fix some issues in another plugin. Thanks for your note.

  • By Chris Taylor, August 5, 2009 @ 10:22 am

    Amazing plugin, Mr. Schmitz. Thank you for creating it. And thanks for posting your hacks, too, misterjaytee, they were very helpful also.

    I have two quick questions regarding the settings.php.

    1) What’s the syntax for excluding a link category in the ‘exclude_category’ parameter? I’d like to exclude “Blogroll”, for example. If I put the name ‘Blogroll’ in between the quotes it still shows up in the collapsed list (unless I use the jaytee workaround and make every item on it private).

    2) What is the syntax for defining order of categories/links? Can they only be ordered by a generic sort of class (i.e. name, ID) or can you specify the precise ordering sequence within that particular parameter? i.e. have something like ‘category_orderby’ => ‘Blogroll1′, ‘Blogroll2′, ‘Blogroll3′, etc.

    If the sorting/ordering can not be specified directly, can you recommend a plugin that is compatible with yours that will accomplish the same task?

  • By slopjong, August 5, 2009 @ 10:55 am

    Hi Chris,

    I haven’t worked for so long time on that plugin. I have to do a lot of things at the moment. I tell you more this evening.

    Edit: I’m skating tonight. You hear from me tomorrow.

  • By Darcy, August 5, 2009 @ 10:47 pm

    Great! Simple and easy to install & style. Many thanks for this!

  • By Chris Taylor, August 6, 2009 @ 5:31 am

    One more quick question =) Using misterjaytee’s hack we can include the descriptions of the links themselves… is there any parameter we can used to display the link category after the category name/title? i.e. (link category) — (link category description)?

  • By LizzyFin, August 20, 2009 @ 11:42 pm

    Hey, thanks for a nice plugin!
    I was wondering if there is a variable that could be changed so the link list could be started in the expanded state? Do tell!

  • By bampi, August 30, 2009 @ 4:20 pm

    Hi there,

    One question… if I want to manually add the [collroll] in sidebar.php for example what code should I use in php? Something like … Or is there anyway to show your blogroll in sidebar.php but manually, not as a widget… since in the spot I want to show it… that area is not widgetized… Thanks

  • By slopjong, August 31, 2009 @ 2:50 pm

    I don’t do sports two days so now I have time for Collroll. I have another four speedskating races in September so I might work only on it if I can manage it.

    @Chris:
    Not yet. It will come sooner than later.

    @LizzyFin:
    Go to Settings -> Collapsing Blogroll. There you have several options for Collroll.

    @bampi:
    Some people were able but I could not figure it out. Did you try Collapsing Links? That plugin is not mine but give it a try. Let me know if Collapsing Links works or not.

  • By bampi, August 31, 2009 @ 6:52 pm

    @slopjong: Collapsing Links works like a charm, thanks for the clue…

  • By slopjong, September 1, 2009 @ 11:19 pm

    Hey guys. Now it’s possible to turn on the descriptions even those of the categories. Nonetheless the update is coming in two weeks.

    Why two weeks?
    - I want to make other changes and I’ll write some documentation.
    - I’m participating on several speedskating races in September so I’m skating a lot at the moment.

  • By Per Lund, September 29, 2009 @ 9:25 am

    Thanks for a great plugin.
    I have an issue with the color of the Category title, when I change it there is no change in color on hovering.

  • By patty jones, October 11, 2009 @ 5:29 am

    Thanks Mr. Schmitz for the plugin and misterjaytee the code edit to get the descriptions! Love it!

  • By aboudaqn, October 25, 2009 @ 11:58 pm

    Slopjong,

    When you make CollRoll is into a collapsable blogroll _widget_, you should find its popularity soar…

    Regards – AD

  • By Slopjong, October 26, 2009 @ 12:47 am

    There is no need to make it widgetable because there is already one. Take a look in the readme section.

  • By Slopjong, October 26, 2009 @ 12:49 am

    By the way. The project has almost died (with me) yesterday. Had a serious car crash.

  • By misterjaytee, November 1, 2009 @ 10:01 pm

    @Slopjong – hope you are okay (or at least recovering well). Good to see you can still type though :)

  • By Slopjong, November 2, 2009 @ 7:59 am

    Hi misterjaytee.

    Nice to hear from you again.

    I want to continue the development. I had stopped because I was tired of debugging some strange errors. I’m developing php and javascript by “code and fix” and this takes too much time to debug something. What IDEs can you recommend for mac? Has anyone already used Firephp?

  • By Michael, January 20, 2010 @ 1:15 am

    In your example the links collapse and expand, but when you hover over it on the right side of the screen an image pops up.

    Can I do that?
    If I can is it possible to make it larger, and reside on the right side of the screen?

    THANK YOU SO MUCH! GREAT PLUGINN!!!!

  • By Slopjong, January 20, 2010 @ 12:46 pm

    It’s possible but I need some server resources. If you can offer me what I need for that contact me please.

Other Links to this Post

  1. More Plugins for Blogrolls | Tom B.'s Rambles — February 12, 2009 @ 4:06 pm

RSS feed for comments on this post. TrackBack URI

Leave a comment

Theme based on MagicBlue