WordPress.org

Forums

EasyRotator for WordPress - Slider Plugin
[resolved] easy rotator and multisite (11 posts)

  1. Atlanta
    Member
    Posted 2 years ago #

    easyrotator_display_rotator('erc_82_xxxxxx');

    only displays on the main site.

    How do I get easy rotator to display on all sub sites without having to create the same slideshow over and over?

    http://wordpress.org/extend/plugins/easyrotator-for-wordpress/

  2. Atlanta
    Member
    Posted 2 years ago #

    P.s I am trying to display easy rotator on a dashboard widget sitewide using custom dashboard widget plugin for multisite.

  3. DWUser
    Member
    Plugin Author

    Posted 2 years ago #

    Hi Atlanta,

    To display rotators on other sites, you have a couple of options. First, you can copy the wp-content/uploads/EasyRotatorStorage/user-content/erc_82_XXXXXX folder from the main site to the other sites' wp-content/uploads/ folders. Or, you could modify the easyrotator.php plugin file, modifying this function (which starts around line 1170):

    public function renderRotator($fullPath)

    You would have to update the following two lines to conditionally be different based on the passed $fullPath value:

    $path = $this->getContentDir() . $fullPath;

    And

    $urlHere = $this->getContentDirURL() . $fullPath . '/content/';

    Please let me know if you have any other questions.

    Sincerely,
    Drew O'Neill

  4. Atlanta
    Member
    Posted 2 years ago #

    Thanks for the quick answer Drew. I am considering purchasing the pro version today.

    I searched easyrotator.php and did not find public function renderRotator($fullPath)

    Also, when you say that I have to update the following two lines which I don't see in easyrotator.php,

    $path = $this->getContentDir() . $fullPath;
    $urlHere = $this->getContentDirURL() . $fullPath . '/content/';

    am I replacing $fullpath with the erc_82 number?

    Thanks for your help.

  5. DWUser
    Member
    Plugin Author

    Posted 2 years ago #

    Hi,

    I apologize for the confusion—these changes are actually in the easyrotator-for-wordpress/engine/main.php file.

    Here's an example of the updated code you might use:


    $path = $this->getContentDir() . $fullPath;
    if ($fullPath == 'erc_88_xxxxxx') // update this value!
    {
    $path = '/var/www/somedir/other/site/wp-content/uploads/EasyRotatorStorage/user-content/' . $fullPath;
    }

    ...

    $urlHere = $this->getContentDirURL() . $fullPath . '/content/';
    if ($fullPath == 'erc_88_xxxxxx') // update this value!
    {
    $urlHere = 'http://other.site.com/wp-content/uploads/EasyRotatorStorage/user-content/' . $fullPath . '/content/';
    }

    Sincerely,
    Drew O'Neill

  6. DWUser
    Member
    Plugin Author

    Posted 2 years ago #

  7. Atlanta
    Member
    Posted 2 years ago #

    Hi, Drew, thanks. Clarification- I think your instructions are meant for different websites, not a multisite network, no?

    Eg..

    "To display rotators on other sites, you have a couple of options. First, you can copy the wp-content/uploads/EasyRotatorStorage/user-content/erc_82_XXXXXX folder from the main site to the other sites' wp-content/uploads/ folders."

    I want erc_82_XXXXXX to play in mysite.com/subsite-a, mysite.comsubsite-b, mysite.comsubsite-c. It sounds like these instructions are for mysite.com and anothersite.com

    I aslo tried this variation https://gist.github.com/anonymous/9f38300fc5822872cc34/raw/b71c12a05c5fa486fd4c1d44001bf2e553117900/gistfile1.txt and updated the erc value but it didn't work.

  8. Atlanta
    Member
    Posted 2 years ago #

    Just changed status to not resolved...

  9. Atlanta
    Member
    Posted 2 years ago #

    Just changed status to not resolved...

  10. DWUser
    Member
    Plugin Author

    Posted 2 years ago #

    Hi,

    Let me run some additional experiments on a test setup and I'll get back to you shortly.

    Sincerely,
    Drew O'Neill

  11. DWUser
    Member
    Plugin Author

    Posted 2 years ago #

    Hi Atlanta,

    I've double-checked the code and it works correctly on a WP multisite network. The trick is that you'll need to know what the file path and public URL to the main site's wp-content/uploads/EasyRotatorStorage/ folder.

    If you can confirm the following information, I'll show the exact code that's needed:
    - The ID of the rotator you want to display (e.g. erc_xx_xxxxxx)
    - The path to the location where this rotator's files are stored in the main site. This will be e.g. /var/www/yoursite/wp-content/uploads/EasyRotatorStorage/wp-content/erc_xx_xxxxxx.
    - The public URL to that folder you just identified

    Sincerely,
    Drew O'Neill

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • EasyRotator for WordPress - Slider Plugin
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.