This is my first time using plugins, so please bear with me.
Here's what my plugin looks like now:
----- ----- -----
global $ids;
$excluded = array(199, 299, 399);
if (!is_member_of($vbulletin->userinfo, $excluded) AND $post['postid'] == $ids[2])
{
$template_hook['postbit_end'] .= '<li class="firstpost_advert_container"><div class="firstpost_advert">
<div class="firstpost_advert">
<center>
AD CODE HERE
</center>
</div>';
}
----- ----- -----
I'm still doing something wrong with my added code. What sticks out to you? I'm not in any of those user group IDs. Let me know what you think. Thank you very much!
Quote:
Originally Posted by MarkFL
The conditional you are using is valid within a template only, however you can exclude usergroups within the plugin PHP code. For example:
PHP Code:
global $ids;
$excluded = array(5, 6, 7);
if (!is_member_of($vbulletin->userinfo, $excluded) AND $post['postid'] == $ids[2])
{
$template_hook['postbit_end'] .= 'Ad goes here...';
}
Make sure the HTML you add is within the single quotes...it needs to be a data string.
I prefer using plugins rather than hacking templates, if at all possible. 
|