Collapsing archives updated

I have been very busy lately, but I have been working on the collapsing archives update for awhile. I have incorporated new features from collapsing categories into it, while trying to keep all the old features. One thing I have learned is that it is difficult to write code with many options, especially when some of them interact.

Since I released the collapsing categories update a bit prematurely, I have dubbed this one 0.9.alpha, and I have not given it a stable tag yet. So you will not see that it needs updating when you look at your plugins. I do think it is fairly stable, and would be very appreciative if a few people tried it out.

You can download it from the official wordpress plugin repository.

This entry was posted in wordpress and tagged , , . Bookmark the permalink.

17 Responses to Collapsing archives updated

  1. Andy says:

    Wow, big thanks for this one. Works fine here so far.. Just one problem that was existing from the beginning..
    In line 310 the class stays empty, at least when no posts should be shown under the month-entries.. So there’s no way to style the months in the css sheet.. Thanks anyhow, the rest is working (though you also forgot the img folder.. *g*)

  2. robfelty says:

    @Andy – thanks for the feedback. I created a new class called collapsArchMonth for all your styling pleasure, and I included the img directory. 0.9.1 is now released.

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

  4. Rich says:

    Unfortunately since upgrading to 0.9.1 i now get these error messages:

    Warning: Missing argument 1 for collapsArch(), called in /home2/magicric/public_html/blog/wp-content/themes/wucoco-two-column-0100/sidebar.php on line 15 and defined in /home2/magicric/public_html/blog/wp-content/plugins/collapsing-archives/collapsArch.php on line 139

    Warning: extract() [function.extract]: First argument should be an array in /home2/magicric/public_html/blog/wp-content/plugins/collapsing-archives/collapsArchList.php on line 41

  5. robfelty says:

    @ZenemiG and Rich,

    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

  6. ZenemiG says:

    Thanks for the answer, the problem would be that Im not using the widget (dont really like em)

    PS: I had subscribed to this and the other post I made a comment at (sorry for the double comment) but I never got my notification :s

  7. robfelty says:

    @Zenemig

    You’ll be happy to know that I just figured out today how to put non-widget functionality back in. Try upgrading to 0.9.3. The syntax has changed slightly, so look at the readme.txt file in the installation part about that. I hope that you get notified of this comment (check your spam folder perhaps?)

    Rob

  8. Stefan says:

    Hi,

    nice widget, but i’m missing something. It would be great, if you add an option to sort the categories together with the posts. E. g.

    a categorie
    b post
    c categorie
    d post
    e post
    f post
    x categorie
    y post

    instead of

    b post
    d post
    e post
    f post
    y post
    a categorie
    c categorie
    x categorie

    thank you

  9. robfelty says:

    @Stefan

    I don’t really understand what you mean. Are you talking about collapsing archives, or collapsing categories? It sounds like what you want is the functionality that collapsing categories provides. (And I don’t think that either one functions as in your second example. But I must be missing something.)

    Rob

  10. Stefan says:

    Sorry, of course i meant the collapsing categories.

    My blog has the category “04. OOP”. This category has the subcategories “04.03 Classes” and “04.04 UML”. Also the categoriy “04. OOP” has the posts “04.01 Common Classes”, “04.02 Objects”, “04.05 extends”, “04.06 Polymorphy”, …

    Collapsing Categories show the content in this order:

    04.03 … (subcategory)
    04.04 … (subcategory)
    04.01 … (post)
    04.02 … (post)
    04.05 … (post)
    04.06 … (post)

    but a view like this would be much nicer for me (all sorted alphabetical):

    04.01 … (post)
    04.02 … (post)
    04.03 … (subcategory)
    04.04 … (subcategory)
    04.05 … (post)
    04.06 … (post)

    Greets

  11. Matt says:

    Hi Rob.

    How can i have multiple versions of non-widget type?

    I know you name them like (‘%i%’) how can i create another and name that something else?

    I want to archives one showing one category then another showing another category?

    Or would it be best to use your other plugin?

  12. robfelty says:

    @Matt,

    Currently the non-widget version is a bit of a hack. There is no way to have multiple non-widget versions yet. I will put that in the TODO list. If you are SQL savvy, you might be able to directly modify the ‘collapsCatOptions’ row in the wp_options table, adding an additional set of options for ‘%j%’ and then using that. I have not tested that, but it might work.

    Rob

  13. Jim says:

    I just upgraded and did not get any error messages after de-activating/upgrading/activating, but I did notice BEFORE the upgrade that ONE of my Posts is “missing” from the Collapsing Archives and I cannot figure out why.
    It is the second newest post about a “Scam” and while it appears normally in the Blog, it is nowhere to be found in the Archives.
    The post DOES show up in the Collapsing Catagories section though.
    What could be wrong?

  14. robfelty says:

    @Jim – that is very odd. Is it possible that you are excluding the “scam” category from the archives?

    Rob

  15. Jim says:

    I don’t know how to exclude anything, I just did the post and it won’t show up in the Archives.
    I tried Editing the Date of the Post, but that did nothing.
    I don’t see anywhere to “exclude” a post.

    It may be a WP thing, yesterday I Googled the title of the post and it came up #1 in the results.
    Today I did the same thing and it is nowhere to be found. So it may not be a Collapsing Archive issue at all. I am just afraid if I go on the WP forum they will just bounce me back to you.

  16. robfelty says:

    @Jim – If you are still having trouble, you might try making a test site (say microcars.com/blogtest), which uses the same database and plugins. Then you could do a little debugging there. It is hard for me to debug remotely. I would suggest uncommenting lines 151-158 in collapsArchList.php. That will give you some debugging output.

    Rob

  17. Jim says:

    All fixed, the probem was not with the Plug In!
    Your suggestion of a test site was good and I left one up for this purpose of debugging in the future.

    The problem was “something” with that post. I deleted it, then made a brand new post, it magically appeared in the archives, then I edited the date to put it back in it’s place and all is well.