Topic-icon How to change "Content Plugin - Like" url

Active Subscriptions:

None
11 years 7 months ago #26844 by andbal1
Hi, i've created a facebook app using joomla but setting on Content Plugin - Like in article, the like url is the joomla url and not the facebook app url. For example i need change 102.socialapp-store.com/index.php/compon...ent/article/100-roma to apps.facebook.com/hotels-map/hotels-map/...ent/article/100-roma. Maybe i can solve this changing something in the jfbconnect code or directly (and i'd liek more this) change the base of my joomla installation
The topic has been locked.
Support Specialist
11 years 7 months ago #26847 by alzander
Andrea,
In the configuration.php file of Joomla, there is a setting for $live_site that 'may' work for some of what you're looking for. You'll really need to test that though as it can cause problems with some extensions as well.

If you want to change the URL we generate with a change to our Content plugin, you will need to edit the /libraries/sourcecoast/articleContent.php file. Look for the following block of code around line 200:
private static function _getCompleteURL($url)
    {
        $url = JRoute::_($url, true);
        $jUri = JURI::getInstance();
        $url = rtrim($jUri->toString(array('scheme', 'host')), '/') . $url;
        return $url;
    }
Change that to:
private static function _getCompleteURL($url)
    {
         return "https://apps.facebook.com/hotels-map";
    }
Again, test a lot with that code as well.

Hope that helps, but keep us posted on how it goes!

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
11 years 7 months ago #26850 by andbal1
Tx for fast reply but doesn't work, in this case the url is alwais apps.facebook.com/hotels-map/

I need apps.facebook.com/hotels-map/ is just the base of the url. For example I need change
https://102.socialapp-store.com/index.php/component/content/article/100-roma

with
https://apps.facebook.com/hotels-map/hotels-map/index.php/component/content/article/100-roma.
The topic has been locked.
Support Specialist
11 years 7 months ago #26851 by alzander
Woops. Not sure what I was thinking. Replace the code with this:
private static function _getCompleteURL($url) 
    { 
        $url = JRoute::_($url, true); 
        $url = "https://apps.facebook.com/hotels-map" . $url; 
        return $url; 
    }
That should hopefully do it for you, but if not, as always, let us know!

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
11 years 7 months ago #26852 by andbal1
Tx, all is ok, let me say you offer best support service i have never seen!!!
The topic has been locked.
Support Specialist
11 years 7 months ago #26858 by alzander
No problem for the support, and glad we could help. We see your subscription recently expired, and we hope you'll choose to resubscribe again in the future.

Finally, if you haven't already, please consider leaving a rating and review for JFBConnect or our support on the Joomla Extension Directory. It's certainly not required, but very appreciated:
extensions.joomla.org/extensions/social-...ook-integration/7215

Thanks, and best of luck,
Alex
The topic has been locked.
Active Subscriptions:

None
11 years 7 months ago #26859 by andbal1
Sorry, is it possibile do something about the base url also for social tag? i mean change base url with apps.facebook.com/hotels-map also using the jfbconnect example like {JFBCLike}, {JFBCSend} or comment {JFBCComments}
The topic has been locked.
Support Specialist
11 years 7 months ago #26880 by alzander
In the /libraries/sourcecoast/utilities.php file around line 180, you'll see:
static function getStrippedUrl()
    {
        $href = JURI::current();
Change that last line to:
$href = 'https://apps.facebook.com/hotels-map/';
Try that, and see how it goes.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
11 years 7 months ago #26982 by andbal1
Sorry, also in this case i need
https://apps.facebook.com/hotels-map
is just the base of the url, not a static link.

My goal is to change in an automatic way
https://102.socialapp-store.com/index.php/component/content/article/12643-verona

to
https://apps.facebook.com/hotels-map/index.php/component/content/article/12643-verona
The topic has been locked.
Support Specialist
11 years 7 months ago #26983 by alzander
The change in the utilities.php file I mentioned should just be setting the 'base' URL to be for your Canvas URL when used in automatic links generated by JFBConnect. The full path or query string from the current page should still be intact though.

Did you try the change and it didn't work? If so, was every URL just the Canvas URL? If so, we'll need to test some more to determine the cause.

Thanks,
Alex
The topic has been locked.