WordPress.org

Ready to get started?Download WordPress

Forums

Manual Related Posts
[resolved] Feature Requests (4 posts)

  1. Jason Lemahieu (MadtownLems)
    Member
    Posted 1 year ago #

    Great plugin! Here are a few quick feature requests to make it even better I think. Note that we are looking to use it in Multisite network settings, where each site admin has limited capabilities, and they're choosing from many available themes. (That might help explain/justify some of the ideas.)

    1) "Thumb mode" should not even be an option if the current theme doesn't support Post Thumbnails. Otherwise, they're just dumping the same default icon all over. See http://codex.wordpress.org/Function_Reference/current_theme_supports

    2) I believe that the default of 0 for number of posts (including Auto) is a bad choice, I believe that something like 3 or 4 is a much more reasonable default.

    3) The settings page includes a php snippet. However, there are many times when the people doing the settings for this will not have the ability to put php on the site. I'd suggest only displaying this message if (current_user_can('edit_themes'))

    4) I'm confused by the inclusion of "Shortcode mode" on the settings page without there even being a radio box to check it in the first place. If you're just trying to remind people that you can use this shortcode, I'd suggest just putting some text at the top instead.

    http://wordpress.org/extend/plugins/baw-manual-related-posts/

  2. Julio Potier
    Member
    Plugin Author

    Posted 1 year ago #

    Hello Jason!

    1) I added a function called "baw_first_image" so you can now use the "bawmrp_no_thumb":
    add_filter( 'bawmrp_no_thumb', 'my_own_picture' );

    function my_own_picture( $pic, $id )
    {
        $default = 'http://example.com/image.jpg';
        return baw_first_image( $id, $default );
    }

    or call this function like this where you want/need:
    baw_first_image( $post, $default );
    where $post can be a post object or post ID, and default the default picture url.

    2) 4 by default now

    3) Done with if (current_user_can('edit_themes')), very good idea, i love that, where was my mind!

    4) I changed the description to avoid the confusion.

    5) New filter "hide_baw_about" to avoid the inclusion of my "about" section in settings page ;)

    You're very pro, thank you very much :)

    ps: version 1.7.14 updated ;)

  3. Jason Lemahieu (MadtownLems)
    Member
    Posted 1 year ago #

    2) perfect. thank you :) <-- new default number
    4) perfect. thank you :) <-- hide 'About'

    3) I'm glad you like the idea! A few more notes:

    You still have a comment about how they can add content using the "bawmrp_more_content filter hook". If they can't edit themes or install plugins, they probably can't write php code on the server to hook into anything either. I'd wrap this same line around the current_user_can('edit_themes');

    For the shortcode line that you removed, it's interesting that the _shortcode_ itself is something that almost everyone could use. It was the wrapping of it in <?php do_shortcode(' [baw...] '); ?> that was the issue. If you wanted to let users know about the shortcode, I'd show the actual shortcode sample to everyone, then maybe include:

    if (current_user_can('edit_themes') echo "Or you can use do_shortcode('...') in your theme files";

    1) This is the one where I'm experiencing some issues, and it looks like others are as well. I've done a bit of testing, and the behavior is quite odd.

    I see that there's an option now about using the First Image that only shows up when the theme does NOT support featured images. This is kind of a cool idea. However, when the theme DOES support featured images, this option still matters somehow! That is, if you switch themes from one that DOESN'T support thumbnails to one that DOES, having the box checked or not at that time still affects it after changing themes, even though the checkbox is no longer displayed!

    I can try to help debug the image thumbnail stuff some more later if you'd like assistance, but seeing as a few others have reported similar issues, I bet you're 90% of the way to a fix already. :)

    Cheers!

  4. Jason Lemahieu (MadtownLems)
    Member
    Posted 1 year ago #

    Also, be sure to sanitize user input. Currently, it looks like users are able to embed things like scripts and iframes through the "Display something is no related posts are found?" text box.

    Also also, there is a typo in that label: "iS no related" should probably be "iF no related"

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.