HMBeaty
09-26-2011, 09:24 PM
Ok, I'm a little confused as to why this isn't working. The code works, however, when I try adding in the option so only certain usergroups can('t) view the content, it doesn't work, nothing shows up. :p
Here's the current code I'm using:
Hook location: postbit_display_start
$noadsense = explode(',', $vbulletin->options['usml_google_adsense_usergroups']);
if ($this->registry->options['usml_google_adsense_enable'] && is_member_of($vbulletin->userinfo, $noadsense))
{
if ($this->registry->options['usml_google_adsense_firstpost'] && $post['isfirstshown'])
{
$template_hook['postbit_end'] .= '
<li class="firstpost_advert_container">
<div class="firstpost_advert">
'.$this->registry->options[usml_google_adsense_firstpostadcode].'
</div>
</li>';
}
}
Obviously it's something silly I'm looking over (again :o), but what is the problem thatis_member_of($vbulletin->userinfo, $noadsense)
doesn't work as it should? :confused:
Here's the current code I'm using:
Hook location: postbit_display_start
$noadsense = explode(',', $vbulletin->options['usml_google_adsense_usergroups']);
if ($this->registry->options['usml_google_adsense_enable'] && is_member_of($vbulletin->userinfo, $noadsense))
{
if ($this->registry->options['usml_google_adsense_firstpost'] && $post['isfirstshown'])
{
$template_hook['postbit_end'] .= '
<li class="firstpost_advert_container">
<div class="firstpost_advert">
'.$this->registry->options[usml_google_adsense_firstpostadcode].'
</div>
</li>';
}
}
Obviously it's something silly I'm looking over (again :o), but what is the problem thatis_member_of($vbulletin->userinfo, $noadsense)
doesn't work as it should? :confused: