-
AuthorPosts
-
simone82 Friend
simone82
- Join date:
- May 2009
- Posts:
- 41
- Downloads:
- 1
- Uploads:
- 3
- Thanks:
- 11
- Thanked:
- 1 times in 1 posts
January 14, 2013 at 1:09 pm #183970Hi guys,
recently I purchased a plugin for OG properties control. It conflict with JA Social plugin that generated some code, perhaps wrong.
I need to use the fb-like option, but without the meta properties automatically generated under tag “head”.
As I write, the code it seem wrong, because the og:site_name took content from description and not from Joomla site name global configuration.I try to delete this lines from sucbuttons.php:
$document->addCustomTag('<meta property="og:site_name" content="'.$config->getValue('sitename').'"/>');
$document->addCustomTag('<meta property="og:title" content="'.$row->title.'"/>');
$document->addCustomTag('<meta property="og:type" content="article"/>');
$document->addCustomTag('<meta property="og:url" content="'.$link.'"/>');but the code persist on page… Can you help me? :((
I’m on JA Mero template at http://www.simonegianolio.info
simone82 Friend
simone82
- Join date:
- May 2009
- Posts:
- 41
- Downloads:
- 1
- Uploads:
- 3
- Thanks:
- 11
- Thanked:
- 1 times in 1 posts
January 14, 2013 at 2:41 pm #479652Please note that I confuse the JA Social plugin with SocButtons plugin… :-[
The wrong code persist, but I delete the following lines in jasocial.php to resolve my problem:
$tags .= '<meta property="og:title" content="' . $titleshare . '"/>' . "rn";
$tags .= '<meta property="og:site_name" content="' . $document->getDescription() . '"/>' . "rn";
if($imageshare){
$tags .= '<meta property="og:image" content="' . $imageshare . '"/>';
}
if(!empty($descriptionshare)){
$tags .= '<meta name="og:description" content="'.$descriptionshare.'" />';
}
$tags .= '<meta name="og:url" content="'.$this->curPageURL().'" />';
if(!empty($app_id)) {
$tags .= '<meta property="og:app_id" content="' . $app_id . '" />';
}
$body = $this->str_ireplace('<head>', '<head>' . "rn" . $tags, $body, 1);Have you another suggestion?
Stork11 Friend
Stork11
- Join date:
- March 2011
- Posts:
- 2273
- Downloads:
- 0
- Uploads:
- 142
- Thanks:
- 55
- Thanked:
- 431 times in 393 posts
January 15, 2013 at 7:44 am #479787Hello simone82,
You can use below code to get your site name
[PHP]
$config = JFactory::getConfig();
$_siteName = $config->getValue( ‘config.sitename’ );
[/PHP]
After that, use $_siteName instead $document->getDescription()Hope this helps.
Regards.
-
AuthorPosts
This topic contains 3 replies, has 2 voices, and was last updated by Stork11 12 years ago.
We moved to new unified forum. Please post all new support queries in our New Forum