When vbulletin's facebook integration is turned on, the head is filled with meta property="og: tags for Facebooks opengraph. The og:url however is not being corrected to the vbseo set url rewrite.
This is a discussion on Facebook Opengraph within the Bug Reporting forums, part of the vBSEO SEO Plugin category; When vbulletin's facebook integration is turned on, the head is filled with meta property="og: tags for Facebooks opengraph. The og:url ...
When vbulletin's facebook integration is turned on, the head is filled with meta property="og: tags for Facebooks opengraph. The og:url however is not being corrected to the vbseo set url rewrite.
Hello,
please modify functions_vbseo_vb.php file:
find:
and replace with:Code:$headinclude = '<link rel="canonical" href="'.htmlspecialchars(vbseo_create_full_url($url)).'" />' . "\n" . $headinclude;
Code:{ $hfullurl = htmlspecialchars(vbseo_create_full_url($url)); $headinclude = '<link rel="canonical" href="'.$hfullurl.'" />' . "\n" . $headinclude; $headinclude = preg_replace('#("og\:url" content=")[^"]*#', '$1'.$hfullurl, $headinclude); }
Oleg Ignatiuk / Crawlability Inc.
Security vbulletin - Patch Level for all supported versions released!
Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!
Oleg,
No go. I received a parse error. Here is the code that I have:
Parse error: syntax error, unexpected $end in /vbseo/includes/functions_vbseo_vb.php on line 1405Code:if(VBSEO_CANONIC_LINK_TAG && $headinclude && $url) //$headinclude = '<link rel="canonical" href="'.htmlspecialchars(vbseo_create_full_url($url)).'" />' . "\n" . $headinclude;} { $hfullurl = htmlspecialchars(vbseo_create_full_url($url)); $headinclude = '<link rel="canonical" href="'.$hfullurl.'" />' . "\n" . $headinclude; $headinclude = preg_replace('#("og\:url" content=")[^"]*#', '$1'.$hfullurl, $headinclude); }
What do you have on line 1405?
Oleg Ignatiuk / Crawlability Inc.
Security vbulletin - Patch Level for all supported versions released!
Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!
Hey Oleg,
1405 is a bit misleading as I had some comments in place as I applied the patch. Removing my comments and using the same code you listed the error is actually on line 1401, which is ?>.
Make sure that you applied modification exactly as described above (and upload original file first), I just tried it and it works for me.
Oleg Ignatiuk / Crawlability Inc.
Security vbulletin - Patch Level for all supported versions released!
Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!
Hey Oleg,
Ok, the patch has been applied again and I have no error, however it is ineffective for the tag:
Code:if(VBSEO_CANONIC_LINK_TAG && $headinclude && $url) { $hfullurl = htmlspecialchars(vbseo_create_full_url($url)); $headinclude = '<link rel="canonical" href="'.$hfullurl.'" />' . "\n" . $headinclude; $headinclude = preg_replace('#("og\:url" content=")[^"]*#', '$1'.$hfullurl, $headinclude); } }Enes Kanter - The New Big Man on CampusCode:<meta property="og:url" content="http://www.nationofblue.com/content.php?r=1660-enes-kanter-new-big-man-campus" />
I'm having the same problem as well
The modification above applies only to forum URLs. For CMS you should modify functions_vbseo.php file:
find:
add below:PHP Code:$excpars = array('r');
PHP Code:$newtext = preg_replace('#("og\:url" content=")[^"]*#', '$1'.htmlspecialchars(vbseo_create_full_url($vbse_rurl)), $newtext);
Last edited by Oleg Ignatiuk; 06-29-2010 at 10:48 AM.
Oleg Ignatiuk / Crawlability Inc.
Security vbulletin - Patch Level for all supported versions released!
Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!
I've tried that but when searching in thefile for $excpars = array(vbseo_vbroute_var()); it says not found.
Sorry, the line would be:
PHP Code:$excpars = array('r');
Oleg Ignatiuk / Crawlability Inc.
Security vbulletin - Patch Level for all supported versions released!
Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!
Beautiful. Thanks Oleg!