PDA

View Full Version : About to lose my mind lol (Google Adsense + Plugin)


HMBeaty
07-20-2011, 01:02 AM
I know I've done this before, but for some reason, I can't get it working this time. I'm not sure what I'm doing wrong, but I have tried...
if ($post['isfirstshown'])
{
$template_hook['postbit_end'] .= '<li class="firstpost_advert_container">
<div class="firstpost_advert">
{vb.raw vboptions.usml_google_adsense_firstpostadcode}
</div>
</li>';
}And also...
if ($post['isfirstshown'])
{
$template_hook['postbit_end'] .= '<li class="firstpost_advert_container">
<div class="firstpost_advert">
'.$vbulletin->options[usml_google_adsense_firstpostadcode].'
</div>
</li>';
}And ALSO...
if ($post['isfirstshown'])
{
$template_hook['postbit_end'] .= '<li class="firstpost_advert_container">
<div class="firstpost_advert">
$vbulletin->options[usml_google_adsense_firstpostadcode]
</div>
</li>';
}Yet none of these seem to work. However, if I remove the vboption from the code, and put my adsense code there in it's place, it works just fine. Also, if I was to enter just plain text in the vbulletin options where that textarea is for usml_google_adsense_firstpostadcode, it doesn't show up, so it's obviously something to do with how the vbulletin option is written into the plugin. So I'm stumped and about ready to pull my hair out because I know it's something simple lol. What am I doing wrong? :confused:

Badshah93
07-20-2011, 09:39 AM
Try this


if ($post['isfirstshown'])
{
$template_hook['postbit_end'] .= '<li class="firstpost_advert_container">
<div class="firstpost_advert">
'.$this->registry->options[usml_google_adsense_firstpostadcode].'
</div>
</li>';
}

HMBeaty
07-20-2011, 09:58 AM
Try this


if ($post['isfirstshown'])
{
$template_hook['postbit_end'] .= '<li class="firstpost_advert_container">
<div class="firstpost_advert">
'.$this->registry->options[usml_google_adsense_firstpostadcode].'
</div>
</li>';
}
That worked lol. Thanks :)