WordPress.org

Ready to get started?Download WordPress

Forums

Related Posts Thumbnails
Installing 2 copies of the same plugin (8 posts)

  1. lackie2k4
    Member
    Posted 1 year ago #

    HI, your plugin is the only plugin that i have found to have complete control over related tags, and it is awesome!!!!

    I want to have multiple instances of the plugin running so i can have different related content on a single page, so i want to copy the plugin.

    I have renamed the plugin folder and renamed every instance that the plugin references to in the .php file.

    My question is, where does the plugin specify the saved settings, because ATM the plugins are sharing settings and i want to specify to save to a different set.

    Regards
    matthew

    http://wordpress.org/extend/plugins/related-posts-thumbnails/

  2. gastonius
    Member
    Posted 1 year ago #

    Hi lackie, using your fav text editor, just search for "relpoststh_" (without the quotes) and replace for "relpoststhb_" or something similar in your new copy, that should do.

    Have a great day

  3. Troklop
    Member
    Posted 1 year ago #

    Hi, I can't install two in a same time. I have tried to replace "relpoststh_" with " relpoststhb_" (without the quotes) and nothing. WordPress shows error on the line 803 and 805 and I can't figure it out. I love your plugin and I am using it in post. I want to add it in the same time in sidebar but I want to change the number of thumbnails in sidebar (not in posts) to be in line with that in post. For example, I have selected to show 6 posts in post but I want there to be only 3 in sidebar. How can I do it?

  4. gastonius
    Member
    Posted 1 year ago #

    Hi, not my plugin. But I can try to help you, can you paste lines #803~805? (and the error you get), that would be helpful.

  5. Troklop
    Member
    Posted 1 year ago #

    Hi,

    Fatal error: Cannot redeclare related_posts_thumbnails() (previously declared in /xxxxx/xxxxxxx/xxxxxx/xxxxxx/content/plugins/related-posts-thumbnails/related-posts-thumbnails.php:803) in /xxxxx/xxxxxxxx/xxxxxx/xxxxxx/content/plugins/related-posts-thumbnails2/related-posts-thumbnails.php on line 805

    803. global $related_posts_thumbnails;
    805.}

    Sorry for the x-es!

    I have put in pastebin for you to look: http://pastebin.com/B54W9Kpc

  6. Troklop
    Member
    Posted 1 year ago #

    I had to rename dir to related-posts-thumbnails2

  7. gastonius
    Member
    Posted 1 year ago #

    Basically: the copy of the plugin is complaining there are more than 1 thing with the same name -which is expected, as we just copied the same thing :)-

    This is the nasty / ugly / hacky / do-it-but-don't-tell-anyone-shame-on-your-code solution:

    http://pastebin.com/n4jCWzMi

    I'm up to my neck of work right now, but if you can wait for a week or so, I can build a nicer version that would allow you to have more than 1 widget (instead of copying the plugin several times)

    Have a nice weekend!
    G

  8. gastonius
    Member
    Posted 1 year ago #

    Also:

    "For example, I have selected to show 6 posts in post but I want there to be only 3 in sidebar."

    Casually, I replied to another guy the solution for that a few months ago:

    http://wordpress.org/support/topic/plugin-related-posts-thumbnails-setting-different-amount-of-posts-for-two-get_related_posts_thumbnails?replies=2

    (I guess I should create a B version of this plugin with all those hacks, as the original owner abandoned it)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.