A-  A  A+ RSS Feed

Deep Thoughts by Robert Felty

thoughts on wordpress, latex, cooking et alia

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

70 Responses to “Collapsing Archives”

  1. On June 1st, 2008 at 9:56 am
    Annie wrote:

    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. On June 4th, 2008 at 6:29 am
    uddhava wrote:

    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. On June 13th, 2008 at 10:40 am
    robfelty wrote:

    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. On June 13th, 2008 at 11:12 am
    robfelty wrote:

    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. On June 20th, 2008 at 2:54 pm
    Kaleb wrote:

    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. On June 20th, 2008 at 3:40 pm
    robfelty wrote:

    @Kaleb – please read the faq
    http://wordpress.org/extend/plugins/collapsing-archives/faq/

  7. On June 21st, 2008 at 12:26 pm
    kathy wrote:

    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

  8. On June 21st, 2008 at 3:46 pm
    robfelty wrote:

    @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

  9. On June 26th, 2008 at 6:28 am
    Steffen wrote:

    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

  10. On June 26th, 2008 at 6:30 am
    Steffen wrote:

    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

  11. On June 26th, 2008 at 6:43 pm
    robfelty wrote:

    @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.

  12. On June 29th, 2008 at 8:24 am
    kathy wrote:

    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)

  13. On July 2nd, 2008 at 10:52 am
    Rui Carlos Gonçalves wrote:

    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.

  14. On July 16th, 2008 at 2:47 pm
    Andrew wrote:

    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.

  15. On July 16th, 2008 at 9:22 pm
    robfelty wrote:

    @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.

  16. On July 26th, 2008 at 6:39 am
    Zielony wrote:

    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

  17. On July 26th, 2008 at 6:44 am
    Zielony wrote:

    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.

  18. On August 1st, 2008 at 7:56 pm
    Mieze wrote:

    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

  19. On September 3rd, 2008 at 3:14 pm
    Worldtraveller wrote:

    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.

  20. On September 3rd, 2008 at 5:28 pm
    Freezerburnt wrote:

    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!

  21. On September 3rd, 2008 at 10:03 pm
    FreezerBurnt wrote:

    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

  22. On September 18th, 2008 at 12:29 pm
    Mieze wrote:

    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^^

  23. On October 29th, 2008 at 10:35 am
    ZenemiG wrote:

    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 ;)

  24. On October 29th, 2008 at 8:04 pm
    robfelty wrote:

    @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

  25. On October 30th, 2008 at 1:37 pm
    Frank wrote:

    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.

  26. On October 30th, 2008 at 10:55 pm
    robfelty wrote:

    @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

  27. On October 31st, 2008 at 10:05 pm
    John wrote:

    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

  28. On November 2nd, 2008 at 11:22 am
    Robert Felty wrote:

    @John,

    Sorry about that. I fixed this in version 0.9.2

    Rob

  29. On November 11th, 2008 at 2:25 am
    Mark wrote:

    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

  30. On November 11th, 2008 at 12:18 pm
    Robert Felty wrote:

    @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

  31. On November 12th, 2008 at 4:13 pm
    transwarp wrote:

    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 … :-/

  32. On November 12th, 2008 at 4:18 pm
    robfelty wrote:

    @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

  33. On November 13th, 2008 at 8:30 am
    transwarp wrote:

    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.

  34. On November 13th, 2008 at 2:44 pm
    transwarp wrote:

    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?

  35. On November 13th, 2008 at 2:50 pm
    transwarp wrote:

    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.

  36. On November 13th, 2008 at 2:56 pm
    transwarp wrote:

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

  37. On November 13th, 2008 at 2:59 pm
    transwarp wrote:

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

  38. On November 13th, 2008 at 3:20 pm
    robfelty wrote:

    @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

  39. On November 13th, 2008 at 3:40 pm
    Stef wrote:

    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

  40. On November 13th, 2008 at 5:44 pm
    Stef wrote:

    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.

  41. On November 13th, 2008 at 5:47 pm
    Stef wrote:

    Or even 2007…

    Doh!

  42. On November 13th, 2008 at 6:06 pm
    robfelty wrote:

    @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

  43. On November 17th, 2008 at 2:28 pm
    microcars wrote:

    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

  44. On November 19th, 2008 at 8:03 am
    jonx wrote:

    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?

  45. On November 19th, 2008 at 11:57 am
    robfelty wrote:

    @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

  46. On November 21st, 2008 at 7:32 am
    jonx wrote:

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

  47. On November 29th, 2008 at 1:41 am
    WordPress Plugin Releases for 11/22 wrote:

    [...] Collapsing Categories [...]

  48. On November 30th, 2008 at 2:15 pm
    Matt wrote:

    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

  49. On December 2nd, 2008 at 12:40 pm
    Rui Carlos Gonçalves wrote:

    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 ”
    > “;
    > }

  50. On December 2nd, 2008 at 3:04 pm
    robfelty wrote:

    @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

  51. On December 2nd, 2008 at 9:59 pm
    robfelty wrote:

    I have decided to move discussion of my plugins to bbpress, which should be more flexible. Please visit the forum for collapsing archives

  52. On December 9th, 2008 at 7:39 am
    WordPress Plugin Releases for 11/22 | BlogBroker24-7 wrote:

    [...] Collapsing Categories [...]

  53. On January 16th, 2009 at 6:34 am
    WordPress Plugin Releases for 01/16 | Weblog Tools Collection wrote:

    [...] Collapsing Archives [...]

  54. On January 16th, 2009 at 7:34 am
    WordPress Plugin Releases for 01/16 | Web 3.0 Technology.com wrote:

    [...] Collapsing Archives [...]

  55. On January 16th, 2009 at 7:37 pm
    WordPress Plugin Releases for 01/16 | BlogBroker24-7 wrote:

    [...] Collapsing Archives [...]

  56. On January 17th, 2009 at 9:17 am
    Weblog Tools Collection: WordPress Plugin Releases for 01/16 | Aslifm Blogu wrote:

    [...] Collapsing Archives [...]

  57. On January 19th, 2009 at 8:37 pm
    Wizreport » WordPress Plugin Releases for 01/16 wrote:

    [...] Collapsing Archives [...]

  58. On January 23rd, 2009 at 12:03 pm
    WordPress Plugin Releases for 01/16 wrote:

    [...] Collapsing Archives [...]

  59. On January 31st, 2009 at 6:41 am
    WordPress Plugin Releases for 01/16 : Xinfo - Open Source News & Discussion wrote:

    [...] Collapsing Archives [...]

  60. On February 9th, 2009 at 2:21 am
    More Software | Tom B.'s Rambles wrote:

    [...] has done 3 other Collapsing plugins. Collapsing Archives, also working well here, and very useful for people that do a lot of posting. Collapsing [...]

  61. On March 6th, 2009 at 1:19 am
    WordPress Plugin Releases for 01/16 | Blogging Money Step wrote:

    [...] Collapsing Archives [...]

  62. On October 6th, 2009 at 5:05 am
    30 Wordpress Plugins To Help You Improve Your Sidebar - Programming Blog wrote:

    [...] 15. Collapsing Archive [...]

  63. On October 6th, 2009 at 2:37 pm
    30 Plugins To Help You Improve Your Wordpress Sidebar | ART HACKER wrote:

    [...] Collapsing Archive Being able to collapse your archive will save you some useful space in your sidebar. Collapsing [...]

  64. On October 6th, 2009 at 3:49 pm
    30 Wordpress Plugins To Help You Improve Your Sidebar | Web Design wrote:

    [...] 15. Collapsing Archive [...]

  65. On October 7th, 2009 at 1:12 am
    30 Wordpress Plugins To Help You Improve Your Sidebar | huibit05.com wrote:

    [...] 15. Collapsing Archive [...]

  66. On October 7th, 2009 at 11:14 am
    30 Wordpress Plugins To Help You Improve Your Sidebar - Partytow wrote:

    [...] 15. Collapsing Archive [...]

  67. On October 8th, 2009 at 1:03 am
    30 Wordpress Plugins To Help You Improve Your Sidebar | IndoWeblog - Free Blog Hosting for Everyone wrote:

    [...] 15. Collapsing Archive [...]

  68. On October 10th, 2009 at 6:10 am
    30 Wordpress Plugins To Help You Improve Your Sidebar | Akshar Technolgies wrote:

    [...] 15. Collapsing Archive [...]

  69. On October 27th, 2009 at 9:48 am
    30 Plugin yang membantu meningkatkan kegunaan dan keindahan sidebar | tempe media wrote:

    [...] 15. Collapsing Archive [...]

  70. On November 1st, 2009 at 6:55 am
    Wordpress: 30 plugins recomendados para tu sidebar - elWebmaster.com wrote:

    [...] Haz clic aquí para ingesar al sitio de Collapsing Archive» [...]