As part of our contextual adverts attempt we are hitting a stumbling block where we dont seem to be able to access the keywords themselves via our plugin. We have tried to access them using the same / simular syntax to that used in templates:
None echo out any results.Code:echo $vbulletin->thread['keywords']; echo $vbulletin->threadinfo['keywords']; echo $vbulletin->vboptions['keywords'];
I managed to echo out the keywords in the postbit_legacy template successfully using:
{vb:raw thread.keywords}
It is in postbit_legacy that i am trying to 'call' the output of my external file.. but obviously the plugin is executed back at global_bootstrap_init_start so i cant feed the keywords to the plugin there.. and even if i could.. i have no idea how to put {vb:raw thread.keywords} into a variable that can be used by the external file..
I hope all that makes sense :erm:
so while looking into vbseo's files finding how/when it replaces the default keywords I came across this section:
so $kw_content clearly contains the new keywords..Code:if(VBSEO_REWRITE_META_KEYWORDS && $kw_content) { $kw_content = strip_tags($kw_content); if(VBSEO_STOPWORDS) $kw_content = preg_replace('#,?\b(' . VBSEO_STOPWORDS . ')\b#i', '', $kw_content); if(strlen($kw_content) > VBSEO_META_DESCRIPTION_MAX_CHARS) { $kw_content = vbseo_substr_words($kw_content, VBSEO_META_DESCRIPTION_MAX_CHARS); } $newtext = preg_replace('#(<meta name="keywords".*?content=)"#is', '$1"'.str_replace('$','\$',$kw_content).',', $newtext); }
but is there anyway to assign that to a global so I can access it with my plugin? rather than just be used in the preg_replace??
when is this code called hook wise? Just in case im calling my plugin prior to the code
cheers guys![]()


LinkBack URL
About LinkBacks






Reply With Quote