Hide ads for premium members.
#11
To use that code that was posted above in the templates you must have the PHP in Templates and Template Conditionals plug in installed:

http://community.mybboard.net/thread-31860.html
[Image: sig.gif]

Contact me in private only if you need paid help with mybb-related issues. Otherwise, please don''t, unless I invite you to. Thanks Smile
Reply
#12
I have the Template Conditionals Installed.

This code is right?
<if $mybb->usergroup['cancp'] != 9>
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tbody>
<tr>
<td class="trow2" align="center">
To remove the ads <a href="http://mysite.com/forum/subscribe.php" target="_blank">click here</a>.
<br />
<img src="http://mysite.com/forum/images/MyAds/vf3.png" />
</td>
</tr>
</tbody>
</table>
</if>
[Image: 468x602b.png]
Reply
#13
Try this:

Only one group:

<if $GLOBALS['mybb']->user['usergroup'] == x then>
Ads code here
</if>

The code above will display the ads only for members in usergroup x.

More than one usergroup:

<if in_array($GLOBALS['mybb']->user['usergroup'], array(a,b,c,d,e,f)) then>
Ads code here
</if>

The code above will display the ads only for members in usergroup a,b,c,d and f.
XThreads App For MyBB: Link Directory, YouTube Gallery & etc - Full List
My Demo Site
Reply
#14
Do I need to put it like this:
<?php 
<if in_array($GLOBALS['mybb']->user['usergroup'], array(a,b,c,d,e,f)) then>
Ads code here
</if>
?>

With the <?php and ?>??
http://community.mybboard.net/thread-31860.html
[Image: 468x602b.png]
Reply
#15
No, you don't need to put the php tag (<?php ?>).
XThreads App For MyBB: Link Directory, YouTube Gallery & etc - Full List
My Demo Site
Reply
#16
(2010-01-12, 05:27 PM)RateU Wrote: No, you don't need to put the php tag (<?php ?>).
Thank you. I used the second one.
[Image: 468x602b.png]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)