WordPress.org

Ready to get started?Download WordPress

Forums

Plugin development advice for Cricket Moods (2 posts)

  1. kccricket
    Member
    Posted 8 years ago #

    I've been working on a fairly major update of my plugin Cricket Moods. Currently, it has an option to automatically print the user's selected moods after the_time() using a filter on the_time(). The problem is that it doesn't currently check to see if it's already printed the moods, or if it's being printed in an appropriate location. For example with the default WP2.0 theme:
    http://cricketmoods.kccricket.net/?p=4

    As I said, the autoprinting is an option. You can always disable it and add cm_the_moods() to your template manually. I've thought of a few ways to resolve this:

    1. Make the filter on the_time() check to see if it's already been used for the current post. But this still leaves the problem of it being printed at inappropriate locations.
    2. If it doesn't look right with the default theme, perhaps I should remove the option altogether. But that makes it harder to install, and what if it actually behaves correctly with the user's chosen theme?
    3. In that case, perhaps I should leave the option, disable it per default, and add a warning message about using it.
    4. Maybe I'm going about it the wrong way. I could just scrap using the_time() and add a filter on the_content() instead, placing the moods just before the start of the post content.

    I'm torn. At the moment, I think that option 4 is the best one for keeping the plugin easy to use and compatible with every theme. I'm hoping to get advice from anybody--user or developer. What do you think?

  2. Happy user of the plugin here :)

    I'm happy enough putting the function in where I want it, bashing the code or my CSS to make it work, so the automatic insertion of moods isn't important to me. But to avoid mess with themes for the users who want plugins to "just work", I'd say that inserting before the content might be more reliable than after the time (I've been playing with a new design that totally broke it...

    Thanks for the plugin, thanks for continuing to work on it , and thanks for asking!

Topic Closed

This topic has been closed to new replies.

About this Topic