Collapsing Archives

IMPORTANT INSTALLATION NOTES for WP 2.7
Please deactivate before upgrading, then re-activate the plugin.

The collapsing Archives plugin creates a hierarchical list of archives organized by year, month, and post. The years and months can be expanded and collapsed dynamically, as you can see in the sidebar on this page. It includes a number of different options, including whether or not to display months and posts.

The plugin is hosted on the official wordpress repository at: http://wordpress.org/extend/plugins/collapsing-archives

If you have any questions, bug reports, or feature requests, please post a comment below.

Your appreciation

If you really like my plugins, please give them a nice ranking in the wordpress plugin repository (links above), or you can send me a donation via paypal below:





Bugs, Features?

Please discuss bugs and features on the forum

78 Responses to Collapsing Archives

  1. Annie says:

    Hi, i have search so lot times to leave indeed yours plugins collapsus, please the same for the links of friends, i have a lot of them it take to much place in the sidebar…
    when i get some money i will give to you

  2. uddhava says:

    I was trying out your archives widget. And it looks good and functional!
    But i was wondering how to change the triangle into something else.
    I find it too big for the layout.
    could not find it in the css file..

  3. robfelty says:

    Nebulous –
    I have to confirm your direction reading skills:
    From the readme.txt file

    WIDGET INSTALLATION

    For those who have widget capabilities, (default in WordPress 2.3+), installation is easier.

    Unzip contents to wp-content/plugins/ so that the files are in a
    collapsing-archives directory. You must enable the Collapsing Archives
    plugin, then simply go the Presentation > Widgets section and add the
    Collapsing Archives Widget.

    I hope that helps.
    Rob

  4. robfelty says:

    Nebulous,
    Yes. That is a theme issue. You might try e-mailing the theme author, or if you don’t mind fooling around with code, take a look in the
    wp-content/themes
    directory. If you look in the default directory, you should see a file called archives.php. This is what sets up how the archives should be handled. You could do some copying and pasting into your themes archives.php file. Make sure you make a backup of the file first, and don’t fret if everything breaks, because you made a backup, so you can just copy the backup to archives.php, and live with the less than ideal handling of archives from your chosen theme.

    Rob

  5. Kaleb says:

    How I change the link colors of collapsing categories? I don’t want the same colors of css stylessheet of my site in there. Please, what I should modify in the .css of plugin for change to colors that I need? Thanks.

  6. kathy says:

    I am using your collapsing archives and collapsing categories, both exactly what I was looking for – thanks! I am having a slight problem with the archives, in May only 2 titles show up, but there are 6 posts. Any suggestions? thanks

  7. robfelty says:

    @Kathy,

    I looked at your site, and I noticed that all of the posts that don’t show up in May are in the “cleaning” category. There is an option to exclude certain categories from the archive listing if you like. Is it possible that you chose to exclude the cleaning category? Take a look at the options in the widget (or under settings).

    I like your blog very much! I am 95% vegan (I bend my rules occasionally in social situations). You might might the food part of my website interesting as well.

    Rob

  8. Steffen says:

    Hello rob,

    I am using collapsing archive on my blog, which have 12 authors and 2 administrators.

    One author gave me the hint: “I can change the collapsing archive settings.”

    Now my question:

    Where can i change the capability? Only the administrators have the ability to change the collapsing archive settings.

    Can you help me?

    Thanks,
    Steffen

  9. Steffen says:

    Hello rob,

    I am using collapsing archive on my blog, which have 12 authors and 2 administrators.

    One author gave me the hint: “I can change the collapsing archive settings.”

    Now my question:

    Where can i change the capability? Only the administrators have the ability to change the collapsing archive settings.

    Can you help me?

    Thanks,
    Steffen

    PS: sorry my email-adress was wrong

  10. robfelty says:

    @Steffen – you have to ask your administrator to change it for you, or ask for administrative privileges. That would be the case for modifying any settings, not just for the settings for this plugin.

  11. kathy says:

    Rob,
    I checked; I do not have the plugin set to exclude any categories. I also tried changing the name of the category and deleting and reuploading the plugin. Still my “cleaning” posts won’t show. I added a test post for June in the cleaning category, and it didn’t show up either. Strange. Oh well, I am going to continue to use the plugin because I really like the set up.
    I checked out your recipes and look forward to trying some. Your site is quite diversified. Cool!
    Kathy

    (Sorry if this is a duplicate I posted before, but don’t see my post)

  12. I think that there is a little bug in the widget. When I don’t expand months to show the list of post, there is a missing at the end.

  13. Andrew says:

    If you have a lot of posts, the performance is so-so from the archives loading the entire database every time.
    I’m going to code it so that it writes to a single db row on publish time and just reads the one row each time it is rendered.

  14. robfelty says:

    @Andrew,

    That is a very good idea. If you need any help figuring it out, I would be happy to help. If you are willing to share your changes, I would be happy to add them to the official repository, and of course give you full credit.

  15. Zielony says:

    Hi Rob,

    Thanks for great plugin. But I have small problem because in my archives a collapse character doesn’t show up. Where is a problem? Thanks

  16. Zielony says:

    Hi Rob,

    Thanks for great plugin. But I have small problem, because in my archive widget a collapse character doesn’t show up. Do you know how fix it?
    Many thanks.

  17. Mieze says:

    Hi :)
    Thank you for your great plugin .. but all I get is a SQL-Syntax-Error :(

    “You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘ON wp_posts.ID = .object_id LEFT JOIN ON .slug NOT IN (”) WHERE .term_taxonomy’ at line 4]
    SELECT wp_posts.ID, wp_posts.post_title, wp_posts.post_date, YEAR(wp_posts.post_date) AS ‘year’, MONTH(wp_posts.post_date) AS ‘month’ FROM wp_posts LEFT JOIN ON wp_posts.ID = .object_id LEFT JOIN ON .slug NOT IN (”) WHERE .term_taxonomy_id = .term_id AND post_date != ‘0000-00-00 00:00:00’ AND post_status = ‘publish’ AND post_type = ‘post’ ” GROUP BY wp_posts.ID ORDER BY wp_posts.post_date DESC”

    … any idea how I can fix this ..?

    Yours,
    Mieze

  18. Hi,

    I have the same problem as Kathy – posts in one particular category do not show up. The category is definitely not listed in the categories to exclude, and in fact when I put some other categories in there to see if it made any difference, they were not excluded. Any ideas why this might be? I am using wordpress v2.6.

  19. Freezerburnt says:

    I get the same SQL error as Mieze above. I’ll try digging into it, but in the mean time, is there a required version of MySQL?

    Thanks!

  20. FreezerBurnt says:

    Meize – You need to upgrade your version of WordPress. I WAS running 2.1.2 and after upgrading to 2.6.1 the error went away.

    It’s because the database format changed a bit I guess.

    FreezerBurnt

  21. Mieze says:

    Ah, thanks :) .. I upgraded a few days ago, but didn’t think of the plugin – now I tried again, and it works :) .. it’s just not collapsing the way I would like it to do, but that’s not a bug^^

  22. ZenemiG says:

    First of all, thanks for this plugin.

    That being said, here comes the ugly part… I upgraded this plugin to the newer version and it gives me the following error:

    | Warning: extract() [function.extract]: First argument should be an array in /home/.gutsy/zenemig
    | /zenblog/wp-content/plugins/collapsing-archives/collapsArchList.php on line 41

    Any clue what could be the problem?

    Thanks again for the plugin and for keeping it updated ;)

  23. robfelty says:

    @ZenemiG,

    Make sure to deactivate and then reactivate the plugin when upgrading. Normally it is not required, but this version has some major differences, and it works better this way.

    Also note that in order to allow people to have multiple instances of the widgets on the same page, the plugin no longer works in a non-widget sense. If you want non-widget functionality, you have to stick with the older version.

    I hope this helps.

    Rob

  24. Frank says:

    Hi,

    I’ve been using this plugin for a while now, but when I updated it yesterday, it now kills another part of my blog [tabber, which uses js].

    Do you still have the older version available? I’d like to go back to it.

  25. robfelty says:

    @Frank – all older versions are available from the download page – look for the “other versions” link.

    I will look into possible conflicts with tabber. I have not used that plugin before.

    Rob

  26. John says:

    I installed the plugin on WordPress 2.6.2 and it seems to be working fine, however the option to “Truncate Post Title to XXX characters” doesn’t seem to be working at all!

    When I activate the checkbox and enter an arbitrary number of characters I would like all titles to be truncated to, nothing happens. When I go back to the widget preferences I see that the characters field is empty, so it doesn’t seem to be saving this particular field input. In other words the checkbox for the option remains selected, but the custom value of characters field is empty.

    All other options are working perfectly…

    I’d really appreciate some help with this since this is quite an important feature for me to be able to use!

    John

  27. Robert Felty says:

    @John,

    Sorry about that. I fixed this in version 0.9.2

    Rob

  28. Mark says:

    Rob, before anything, I’d like to commend you for the great job on this plugin! I’ve been using it on my client’s site and she can’t be any happier that it shortened her archives.

    However, just recently, I encountered an odd problem. When I click on the arrow to expand the archives, that arrow disappears after it gets clicked! It didn’t happen before so I’m guessing there was a change somewhere in the site that’s causing the arrow to disappear once clicked. I tried to single out the code in the sidebar, remove all CSS, and removed all scripts from the header, but still can’t get it to work like it used to.

    Do you think you can help me find the source of the problem? I’m using the 0.8.9 version of the plugin since the recent one is giving me a function.extract error similar to the guy who mentioned it here previously.

    Link to the site is in my name and the archives are at the bottom part of the site. I’d really appreciate your help. Thanks!!

    Mark

  29. Robert Felty says:

    @Mark,

    Thanks for the kind words. I assume you are not using the plugin as a widget. I recently figured out how to make it work as both again. I would try upgrading to version 0.9.3. Make sure you re-read the installation instructions, as they have changed a bit for manual installation. Let me know if that works.

    Rob

  30. transwarp says:

    I`ve got a problem with Version 0.93.
    My blog has an estimated number of 580 postings, over three years. Now I’ve problems when the plugin generates the posting-lists for these years. Means, the whole rendering of the blog-site stops while the plugin is working. But it stops for several minutes, so users, and I, think about a freeze. Using an widget-cache does not take any positive effect. Its interesting, that I have also problems inside the widget-management of my admin-account. While rendering the actuall widget-list of my sidebar, it stops when the widget of “collapsing archives” should appear. Thats all what it does. Only deactivating of the plugin solves my problem. Any idea what could have happend? Till now I’m very satisfied with “collapsing archives” and I’m wondering why these problems occur now, after weeks of successfull using it. I’m looking for help … :-/

  31. robfelty says:

    @transwarp – It would help if you gave me a link to your site. Or even better, create a test site that uses the same database, and let me take a look at that. What version of wp are you using?

    Rob

  32. transwarp says:

    Hi Rob. Thanks for helping.
    I’m honest: I can’t really reproduce the problem I told you yesterday. There are still some rendering-problems with the widget-seperator in my sidebar. And I can’t use the plugin “WP widget cache” on your plugin. Alle entries concerning the cache are ignored. But as a summary: The performance-probs are gone, maybe a slowdown of my provider?
    But feel free to take a look at http://www.johanndrees.de/blog. Thanks.

  33. transwarp says:

    Hi. I thought I posted an answer, but maybe it’s lost. So, again:
    Thanks Rob for your help.
    After reconfigure of my widget cache, the blog speeds up radically. So my problem has changed a little bit. Means, after your Widget, I get a dislocated widget-separator (the line between the widgeds). Feel free to have a look on my blog-site (see website-info). Any idea what’s the problem?

  34. transwarp says:

    Hi Rob, thanks for your help. Your spam-filter kills all of my postings, so let’s have try number three now.
    After reconfiguring the widget cache, my blog speeds up dramatically. But now there’s a new problem with the widget-separator (the line between the widgets), because it’s a little bit dislocated after your widget. Any idea what may be the reason? Feel free to visit my blog (see website-info). Thanks.

  35. transwarp says:

    Hi Rob. Your Spam-Filter kills all my postings, so please check the spam-archive. Thanks.

  36. transwarp says:

    Additional info: I’m using wordpress 2.6.3 and all plugins with the most actuall version.

  37. robfelty says:

    @transwarp Sorry about the zealous spam filter. I should really work on figuring that out. I don’t have an exact answer for the line displacement, but I would fool around with the css in collapsArch.css

    Rob

  38. Stef says:

    Hi again, Robert

    I’ve found a bug – some punctuation characters in the post titles are converted to “&#code” when listed by the widget in the sidebar – I’ve taken a screenshot, you’ll find it at http://www.zoto.com/beardedgit/img/1024×640/85a3efcb752f1a81a7c74e49e0b7d812.jpg

    Is it fixable?

    Cheers,

    Stef

  39. Stef says:

    Actually, it’s even more curious – it only happens on post titles up to August 2007. From September 207 onwards the punctuation shows as it it supposed to.

    Weird.

    No matter. I can live with it.

  40. Stef says:

    Or even 2007…

    Doh!

  41. robfelty says:

    @Stef – thanks for the report. I will look into it. Also, I like your website style, especially what you have done with collapsing categories and archives.

    Rob

  42. microcars says:

    whoo hoo! This Plug-In is fabulous.
    There was a short thread on the WordPress Support forum from someone looking for this kind of Plug-In and NO ONE could recommend the correct Plug-In! After I posted trying to show that none of the “answers” were helpful the thread was “locked” no further posts allowed.

    I eventually found Collapsing Archives by browsing through all the Plug Ins.

    This is worth money, I will be sending you some. thank you thank you thank you!
    Jim

  43. jonx says:

    hello, nice plugin but I have the following problems with WP2.6.3:
    after deployment to wp-content/plugins/collapsing-archives, enable and run, the category list displays an error message about the fact that extract needs to work on an array. it looks like $option is not initialized. Also, when I change an option, the option is applied but not saved, when I come back to the option page it is empty. When I save my options, I get the following message : widget_number = %i%
    I have probably setup something wrong. I’m in manual mode and my code is:

    <?php
    if( function_exists(‘collapsArch’) ) {
    collapsArch(‘%i%’);
    } else {
    echo “\n”;
    wp_get_archives(‘type=monthly&limit=12&show_post_count=1’);
    echo “\n”;
    }
    ?>

    may you clarify something in the setup: Unpack the tar contents to wp-content/plugins/ so that the files are in a collapsArch directory.

    shall the directory be called “collapsArch”? any other name?

  44. robfelty says:

    @Jonx,

    The plugin should be in the collapsing-archives folder. The collapsArch instructions are old. Sorry about that. I will update them. I am still figuring out how to get it work both as a widget and manually, so I appreciate your patience. I would try de-activating then re-activating. Then select your desired options, and see if that works. If that still doesn’t work, try deleting the “collapsCatOptions” row from the wp_options table in your database. If that doesn’t work, then I am not sure where to proceed.

    Rob

  45. jonx says:

    No problem. I still have the problem. I’ll try resting the settings like you sugested. Thank you.

  46. Pingback: WordPress Plugin Releases for 11/22

  47. Matt says:

    Hi there.

    I’m having a problem with this not working in Internet Explorer. There seems to be an error in the javascript.

    It says ClassName is null?

    THanks

  48. There is a bug in this widget (I’ve already talk about it some months ago).

    When we have the option “Show Month Link” checked, and the option “Month Links should expand to show Posts” unchecked, there are a and a tags missing in the end.

    I’ve solved the problem with the following change in the file collapsArchList.php:

    389a390,393
    > elseif( $showMonths==’yes’ ) {
    > echo ”
    > “;
    > }

  49. robfelty says:

    @Rui,

    Thanks for bugging me about that again. I think your code got a bit mangled. I used a slightly different method of fixing it, but it should be fixed now in 0.9.6

    Rob