Subscribe / Connect / Follow Widget
[resolved] Patch to Work with MU Domain Mapping (4 posts)

  1. John Peden
    Posted 2 years ago #

    Hi folks,

    As the plugin pics up the imageurl in the backend, when the image is loaded into the front-end it is fixed and as such doesn't work with MU domain mapping. I patched line 18 with the following code to get it working:

    //Rewrite for mapped domains
    		if( isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == "on" ) {
    			$siteUrl = site_url();
    			$mappedUrl = str_replace('http://', 'https://', $siteUrl);
    		} else {
    			$mappedUrl = str_replace('https://', 'http://', $mappedUrl);
    		$startPos = strrpos($imageurl, 'http://');
    		$endPos = strrpos($imageurl, '/files');
    		$urlLength = $endPos - $startPos;
    		//End rewrite for mapped domains

    Please feel free to re-write if you don't think it is quite as slick as it could be! Hopefully this will find its way into the next release :)


  2. Srini G
    Plugin Author

    Posted 2 years ago #

    Thanks. Fixed in 0.5.7.

  3. John Peden
    Posted 2 years ago #


    I've rewritten a couple of lines of the plugin to improve its flexibility with different themes etc. Could I email you the updated code so that you can deploy as a new release?


  4. Srini G
    Plugin Author

    Posted 2 years ago #

    Hi John. Sure, send me over.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Subscribe / Connect / Follow Widget
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic