The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Modifying auto generated Blog <title> and og:description tags
I have a blog setup for a client, and they would like both the Forum name and Username removed from the Blog entry's title and facebook meta tags for SEO purposes.
This seems like something I could *probably* do with a plugin... can anyone offer insight on this as far as how and where the titles get generated? Thanks. |
#2
|
|||
|
|||
It looks like the keywords and description are set in a plugin ousing hook global_state_check (that's part of the blocg product). The code looks like this:
Code:
if ($vbulletin->GPC['blogid'] AND $GLOBALS['bloginfo'] = verify_blog($vbulletin->GPC['blogid'], false, false)) { $GLOBALS['blogid'] =& $GLOBALS['bloginfo']['blogid']; $vbulletin->options['keywords'] = ($GLOBALS['bloginfo']['taglist'] ? $GLOBALS['bloginfo']['taglist'] . ', ' : '') . $GLOBALS['bloginfo']['title'] . ', ' . $vbulletin->options['keywords']; $vbulletin->options['description'] = $GLOBALS['bloginfo']['title'] . ' ' . $GLOBALS['bloginfo']['blog_title']; } So it might work if you were to create your own plugin using that hook, and set the execution order to something > 5 to make sure it runs after the existing plugin. Then do something like: Code:
if ($vbulletin->GPC['blogid'] AND $GLOBALS['bloginfo']) { $vbulletin->options['keywords'] = ''; // of course you can set these to whatever you want instead of a blank string $vbulletin->options['description'] = ''; } |
#3
|
||||
|
||||
Okay here is what I ended up with:
hooked at global_state_check, this will pull from the blog text and feed it into the meta description/ og:description PHP Code:
PHP Code:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|