REM State

10 Feb

3.1.0 Beta 4 Beta 5

And to make up for the late post today, here’s another release. :)

This release integrates the fix for bug 37 that just went into 3.0.12, and also fixes bug 34, which is probably more important to the IE7-users in the crowd. I still think that IE’s behavior is broken, but my code will work both ways now regardless.

Edited to add…

I botched beta 4; it works fine in IE7, but not in Firefox because of a stupid little mistake. I’ve fixed the problem and tagged a new release. Sorry for the false start!

Download In Series 3.1.0 Beta 5.

32 Responses to “3.1.0 Beta 4 Beta 5”

  1. AvatarAlan
    1

    when there is no series, you want the widget to return without printing anything.

    so amend widget_series_toc function as

    if(!empty($toc) && is_single()) {
    $output = $args['before_widget'];
    $output .= $args['before_title'] . $options['title'] . $args['after_title'];
    $output .= $toc;
    $output .= $args['after_widget'];
    }
    echo $output;

    Reply to this comment.
  2. AvatarQuandary
    2
    Author Comment

    Nope, the current code is exactly correct. The before/after_widget text needs to be output even if there is no ToC to be printed; otherwise, the final HTML output may be broken (specifically, if the ToC widget is the only widget in the sidebar, you’ll get <ul></ul>, which won’t pass validation). Thanks, though. ;)

    Reply to this comment.
  3. AvatarIskwew
    3

    Hi and thanks for a neat plugin. I downloaded the previous version, though. But here are som thoughts on what you might put into the next version:

    1. Series on pages. What would be nice is to have a static page for each series, with just the table of content and some comments.

    2. A table of content page which should be numbered 0, since it is not part of the actual series.

    3. Posibility to add some posts which are related to the series, but more like appendixes, or material for further reading.

    Regards,
    Iskwew

    Reply to this comment.
  4. AvatarQuandary
    4
    Author Comment

    The first item you mentioned is covered by bug 29. The second and third items probably are a single feature, i.e., “related posts” that aren’t actually part of the content of the series proper. It’s a valid ask, but I’m going to have to ponder on what a good author experience would look like, as well as what a good reader experience would be. I’ve filed bug 39 to cover this.

    Thanks!

    Reply to this comment.
  5. AvatarSteve
    5

    Re: Alan’s post about the widget.

    I understand where he’s coming from. I’ve built several themes with boxes, borders, whatever, around sidebar widgets. If the widget shows up and is empty, it looks ugly.

    Unfortunately, you can’t depend on users being intelligent enough to not put the widget in until there’s a series.

    So - conditionally register the widget and its control. If there is no series, there is no widget.

    BTW - great work on this. I used the earlier one but abandoned it because it didn’t work as expected and I didn’t have time to screw with it. Thanks for picking up the ball and running with this. It’s a good plugin and more useful than the rest.

    Reply to this comment.
  6. AvatarQuandary
    6
    Author Comment

    Hey Steve,

    I prefer to blame the system for being stupid before blaming users. ;)

    Conditional registration is a thought that had not occurred to me, and it’s a novel idea, but I think it could be confusing and potentially harmful. Specifically, I can envision:

    • Users reporting the fact that the widget is not available as a bug
    • Users not using the series widget, because it’s not immediately available after installation
    • Users creating a series, adding the widget, then deciding they didn’t want that series… at which point, we’re in a broken state (unregistered widget on the sidebar).

    What I can do is make it so that the widget will still output its header, even when there’s no content. Given the header, I think that most folks will know “hey, that spot’s empty because I don’t have any series yet; maybe I should go write one, or take that widget out.” :)

    Reply to this comment.
  7. AvatarSteve
    7

    Right you are…you have different considerations when writing a plugin for general consumption vs. a custom, like I usually do.

    BTW, if the series went away, so would the widget registration so your point #3 shouldn’t be a problem. The widget would disappear, although all the options would still be in the db - much the same as deactivating a plugin without removing the widget first.

    The other two reasons, though, are enough arguments against doing it as I suggested.

    And duh - having a blank sidebar widget would certainly be an indication to take it out, wouldn’t it? LOL

    Another BTW - if you use the get_args($args) function, you have available all of the arguments as vars, i.e., $before_widget, $before_title, etc. rather than having to get them from the array. Just a little easier, IMHO.

    Reply to this comment.
  8. AvatarQuandary
    8
    Author Comment

    BTW, if the series went away, so would the widget registration so your point #3 shouldn’t be a problem. The widget would disappear, although all the options would still be in the db - much the same as deactivating a plugin without removing the widget first.

    Eeeeh… I’d have to test that. The scenario I’m envisioning is that the user has only the Series List widget installed, and then removes their only post… then their sidebar either reverts to the default (and stays that way), or switches between the default sidebar and the custom/widget sidebar (depending on if they add a new series). You may very well be technically correct; in any case, I have to commend you for a very interesting way to solve the problem. :)

    Another BTW - if you use the get_args($args) function, you have available all of the arguments as vars, i.e., $before_widget, $before_title, etc. rather than having to get them from the array. Just a little easier, IMHO.

    get_args() isn’t a PHP or WordPress-defined function; I assume you mean extract($args). I concur that explicit array references are not as pretty as nice, succinct variable references. However, from a clarity and defensive coding standpoint, I much prefer explicit array references. Specifically, someone reading the code knows where the variable came from (clarity), and you won’t accidentally overwrite your local variables if your caller decides to add new values to the array (security). Yes, you can tell extract() to not clobber existing variables (it’s not the default), but you still pollute your namespace — as soon as some schmuck decides to use an uninitialized variable, you have a potential vulnerability in your code. :)

    I really appreciate you taking the time to go through the code base and give your thoughts; please feel free to get in touch with me via e-mail if you’d like to discuss anything else. I can always use more help!

    Reply to this comment.
  9. AvatarAlan
    9

    Just so you know where i was coming from, the vast majority of posts on the blog i run are not in a series - but for the series we DO have, it is important to have a ToC. An empty ToC widget does mess things up though. Fortunately i’ve written my own plugin that allows me to show the widget only when

    is_single() && InSeries::adv_CurrentSeries($post->ID)

    Cheers for the plugin - wouldn’t be without it.

    Reply to this comment.
  10. AvatarPeter Lurie
    10

    Thanks for the plugin…

    a small request… I’d like to change the displayed position of In-Series to directly after the TITLE, and not after the_content.

    Is there a way of doing this with a template tag?

    Thanks

    Reply to this comment.
  11. AvatarQuandary
    11
    Author Comment

    Err… the HTML <title>, or the title of the post (In Series automatically inserts <link/> elements by default)? If not the HTML title, “directly after” the title of the post would be the very start of the_content, ne? If that’s sufficient, check the FAQ (and essentially reverse the positioning to put the ToC info at the very start). If not, you’ll need to turn off the automatic templating, and go to manual tags — the public API is fully documented in in-series.php.

    Reply to this comment.
  12. Avatarsteve
    12

    Does the latest beta version have the option to only display the TOC on post pages?

    thanks

    Reply to this comment.
  13. AvatarQuandary
    13
    Author Comment
  14. AvatarLuc
    14

    Hello,

    I’ma happy 3.0.12 user
    My weblog uses WP 2.6

    I tried 3.1.0 beta 5 and got

    Warning: Invalid argument supplied for foreach() in /foo/bar/wp-content/plugins/in-series/in-series-config.php on line 45

    Warning: Invalid argument supplied for foreach() in /foo/bar/wp-content/plugins/in-series/in-series-config-advanced.php on line 20

    Any idea

    Luc

    Reply to this comment.
  15. AvatarQuandary
    15
    Author Comment

    Yep. Please refer to the FAQ (specifically, you need to follow proper upgrade procedure).

    Reply to this comment.
  16. AvatarOklilihila
    16

    Using In Series 3.1.0 Beta 5 on Wordpress 2.5.1. List Series Widget in sidebar listing not only the series but trackbacks unrelated to series. ??

    Reply to this comment.
  17. AvatarLuc
    17

    Ok i’m stupid.. of course it worked like a charm

    Sorry

    Luc

    Reply to this comment.
  18. AvatarQuandary
    18
    Author Comment

    Nah, don’t be sorry; I knew the answer right away. You should only feel sorry if you ask a stumper — those take a lot of my time to figure out answers for. ;)

    Reply to this comment.
  19. AvatarQuandary
    19
    Author Comment

    @Oklilihila,

    If you have specific repro steps, please file a bug. Thank you!

    Reply to this comment.
  20. AvatarRyan
    20

    How do I get this to appear at the bottom of the post?

    Reply to this comment.
  21. AvatarQuandary
    21
    Author Comment
  22. AvatarBloggerSavvy
    22

    To get this working on WP 2.7 I have to manually add and edit the entries in the DB (wp_in_series_3_0_11_entries table). Any fix for this? Thank you. :)

    Reply to this comment.
  23. AvatarQuandary
    23
    Author Comment

    Did you upgrade In Series? Did you follow the proper upgrade procedure?

    Reply to this comment.
  24. AvatarBloggerSavvy
    24

    Did you upgrade In Series? Did you follow the proper upgrade procedure?

    Yes. Also, there were no series in use. I installed this plugin but at the bottom of post management/editing the only option to a new (or existing series)post is the name of the series and two radio buttons that say “start” and “end”. When I add a new post to a series (in WP 2.7) I have to manually edit the DB (phpMyAdmin) and then the items appear with no problem.

    I do not know if this is related, but after installing this plugin and then creating a series, I immediately began experiencing the white screen of death every time I try to add or edit a post.

    I hope this reply helps narrow down any potential issues.

    Reply to this comment.
  25. AvatarQuandary
    25
    Author Comment

    I’m sorry to hear that — WordPress partially broke In Series in their 2.6 release, and the 2.7 release appears to be brand new. I wouldn’t be surprised if the plugin’s completely broken by whatever the hell they’ve done. Unfortunately, I lost interest in cleaning up after the API incompatibility mess left by the WordPress development team; I haven’t supported In Series for this reason since the early 2.4 days.

    Reply to this comment.
  26. AvatarBloggerSavvy
    26

    I’m sorry to hear that — WordPress partially broke In Series in their 2.6 release, and the 2.7 release appears to be brand new. I wouldn’t be surprised if the plugin’s completely broken by whatever the hell they’ve done. Unfortunately, I lost interest in cleaning up after the API incompatibility mess left by the WordPress development team; I haven’t supported In Series for this reason since the early 2.4 days.

    Oh gee, that’s too bad. Would you be offended if I asked some twitter users if they might be interested in updating this (hopefully some will respond)?

    I think you’ve put so much work into this that it would be sad to see this die. (Please don’t let this die).

    Reply to this comment.
  27. AvatarBloggerSavvy
    27

    Oh… and I don’t know where my other comment went, but this plugin is NOT the one causing the white screen. The only issue is having to manually (phpMyAdmin) edit the database.

    Reply to this comment.
  28. AvatarQuandary
    28
    Author Comment

    Not at all; go right ahead.

    Reply to this comment.
  29. AvatarPaulo Brabo
    29

    Hello, 3.1.0 Beta 5 user here!

    I have a non-widget theme and I use the non-supported direct call on my sidebar. With Beta 2 the list was sorted by latest post and I rather liked it, but no more. In fact I can’t tell how the list is being sorted right now.

    Can I use the direct call and still get the list by last updated option? What are the parameters?

    Thank you so much!

    Paulo

    Reply to this comment.
  30. AvatarQuandary
    30
    Author Comment

    Um… you’re asking me to support something explicitly marked unsupported :)? I’d recommend using the supported, documented API in in-series.php instead. That would be InSeries::adv_SeriesList_By<SortCriteria>($ascending). Your options are series name, most-recently-posted-to, and series creation date.

    Or use InSeries::SeriesList() if you want an easy, pre-generated list with limits spat right out onto the page. The plugin config controls the order in which the series are listed by this call, which is also fully documented in in-series.php.

    Reply to this comment.
  31. AvatarPaulo Brabo
    31

    Yay thanks for supporting the unsupported! I’ll try it right away, and I promise to check the thoroughly documented in-series.php before making another silly question.

    By the way, as far as I am concerned In Series 3.1.0 Beta 5 is working flawlessly with Wordpress 2.7. Go figure!

    Thank you again for this plugin. Even unsupported it keeps supporting a lot of blogs on this small planet. A happy winter season for you!

    Reply to this comment.
  32. pingback pingback:
    32
    In Series – The WordPress Plugin I Use To Power This Blog | Tech Dreams

    […] But you know the good news? The next release of In Series is expected to overcome all these limitations. The beta version of new In Series is available for download here […]

    Reply to this comment.

Leave a Reply

Comment Preview:

© 2009 REM State | Entries (RSS) and Comments (RSS)

Global Positioning System Gazettewordpress logo