Topic-icon Problem with unspecified type

Support Specialist
10 years 10 months ago #54030 by alzander
Unfortunately, JReviews uses standard Joomla articles for it's content. There's not an easy way to know if the page being rendered is a JReviews page or a standard Joomla Content page.

You can probably try to configure an Open Graph object in the JFBConnect -> Open Graph configuration area and set it to apply to the jReviews directory that you want to exclude tags. Then, in the jreviews.php file, remove the code change I had you do previously. Around line 53, you'll see:
$itemDirId = $this->db->loadResult();
Update that like:
$itemDirId = $this->db->loadResult();
if ($itemDirId != 0)
{
    $openGraphLibrary = OpenGraphLibrary::getInstance(); 
    $openGraphLibrary->addBlockedTags(array('twitter:title,twitter:card,twitter:description,twitter:image' ); 
}
Test that and hopefully it will do what you're looking for it to do.

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

None
10 years 10 months ago #54107 by bioaktive
$openGraphLibrary = OpenGraphLibrary::getInstance();
$openGraphLibrary->addBlockedTags(array('type,image,title,description' ));
When i try to block og:type for jreviews because it messes my video object like You wrote to me i ve got this warnings:

Warning: explode() expects parameter 2 to be string, array given in /home/14447-5250.cloudwaysapps.com/jxunpxbwqy/public_html/libraries/sourcecoast/openGraph.php on line 98
Warning: Invalid argument supplied for foreach() in /home/14447-5250.cloudwaysapps.com/jxunpxbwqy/public_html/libraries/sourcecoast/openGraph.php on line 99
The topic has been locked.
Support Specialist
10 years 10 months ago #54111 by alzander
Apologies. My code above is not the proper way to specify different values. Please update it like:
$openGraphLibrary->addBlockedTags(array('type','image','title','description' ));
That will properly separate each tag value and should fix that error.

Please test that and let us know how it goes.

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

None
10 years 10 months ago #54125 by bioaktive
Warning: explode() expects parameter 2 to be string, array given in /home/14447-5250.cloudwaysapps.com/jxunpxbwqy/public_html/libraries/sourcecoast/openGraph.php on line 98
Warning: Invalid argument supplied for foreach() in /home/14447-5250.cloudwaysapps.com/jxunpxbwqy/public_html/libraries/sourcecoast/openGraph.php on line 99

Same error when i tried last change that You wrote me i tried it already, somthing nots passing correctly tags for block.
Sry for taking your time but its really im
The topic has been locked.
Support Specialist
10 years 10 months ago #54128 by alzander
Alright.. I totally apologize. I've just tested the code and determined where the problem is. Once again, I had made a mistake in my suggested code. Please update the last line to:
$openGraphLibrary->addBlockedTags('twitter:title,twitter:card,twitter:description,twitter:image' );
That line was tested on my own system and does remove the the tags, as expected, without any PHP errors or warning messages.

Please let us know how that goes, and sorry for the runaround.

Thanks,
Alex
The topic has been locked.