0
Welcome Guest! Login
0 items Join Now

Using Roksprocket Wordpress on post to use Featured image

  • Using Roksprocket Wordpress on post to use Featured image

    Posted 6 years 5 months ago
    • Matt's Avatar
    • Matt
    • Preeminent Rocketeer
    • Posts: 21506
    • Thanks: 3081
    • messin' with stuff

    Re: Using Roksprocket Wordpress on post to use Featured image

    Posted 6 years 5 months ago
  • Re: Using Roksprocket Wordpress on post to use Featured image

    Posted 6 years 5 months ago
    • Any suggestion or any file to edit? I cant access the links provided btw.

      Regards,
    • Matt's Avatar
    • Matt
    • Preeminent Rocketeer
    • Posts: 21506
    • Thanks: 3081
    • messin' with stuff

    Re: Using Roksprocket Wordpress on post to use Featured image

    Posted 6 years 5 months ago
    • Content from those old posts:



      Open:

      \wp-content\plugins\wp_roksprocket\lib\RokSprocket\Item\Image.php

      delete:
      if (!$container->platforminfo->isLinkExternal($url)) {
          $url = $container->platforminfo->getUrlForPath($container->platforminfo->getPathForUrl($url));
      }
    • Last Edit: 6 years 5 months ago by Matt.
    • SEARCH the forum first! These boards are rich in knowledge and vast in topics. This includes searching just the 'Solved' forums, using Google, and using ChatGPT :woohoo:
  • Re: Using Roksprocket Wordpress on post to use Featured image

    Posted 6 years 5 months ago
    • Matt's Avatar
    • Matt
    • Preeminent Rocketeer
    • Posts: 21506
    • Thanks: 3081
    • messin' with stuff

    Re: Using Roksprocket Wordpress on post to use Featured image

    Posted 6 years 5 months ago
    • William Castello wrote:
      First - this is NOT a server issue. This is a coding issue. There is nothing the server can do to force code to concatenate two disparate path types. And there is nothing a server can do to drop one of the forward slashes from an 'http:/'

      This patch will eat into the time it takes the server to display your page, but I didn't have time to find a real fix. (Offer me an added year free membership and I'll do the "real fix"!) - Here's the patch that'll fix your images:

      File: /wp-content/plugins/wp_roksprocket/lib/RokSprocket/Item/Image.php


      	public function setSource($url, $autosetsize = true)
      	{
      		$container = RokCommon_Service::getContainer();
      
      		if (!$container->platforminfo->isLinkExternal($url)) {
      			$url = $container->platforminfo->getUrlForPath($container->platforminfo->getPathForUrl($url));
      		}else{
      			//echo "URL:" . $url . " Appears to be external."; exit(); // TESTING - Hank
      		}
      		if(strpos($url,'onsite-computer-tech.com')){
      			$pos = strrpos ( $url , 'onsite-computer-tech.com' );
      			$url = 'https://' . substr ( $url, $pos ); // TESTING - Hank
      			//echo "IMG: $pos:" . $url; exit(); // TESTING - Hank
      		}
      		$this->source = $url;
      
      		if ($autosetsize) {
      			$this->setSizeFromSource();
      		}
      	}
      	


      Note: I hard-coded my domain to save time. Also, if you're not running SSL (but you should!), drop the 's' from 'https'
    • SEARCH the forum first! These boards are rich in knowledge and vast in topics. This includes searching just the 'Solved' forums, using Google, and using ChatGPT :woohoo:

Time to create page: 0.058 seconds