I have much banner in my site, that banner will shown for guest and member
but for VIP member, admin, and moderator that banner is hiding
i using plugin for ads like myadvertisement, but that make some query and slow down my forum (CMIIW) how to make some modification in php script and template for this?
thanks for help
You'd need the PHP in Templates plugin by Yumi.
(2011-05-15, 04:23 PM)Shukaku Wrote: [ -> ]You'd need the PHP in Templates plugin by Yumi.
thanks for help. where i can get that plugin? and how to apply it in order to fit what I mean?
Install this:
http://community.mybb.com/thread-31860.html
To place an ad just for specific usergroups, do like this;
Copy/Paste this code in the template where you want to show ads only for those specific groups.
$groups = array(1,2,5,7); // Add usergroup ID here replacing 1,2,5,7 etc.
<if in_array($mybb->user['usergroup'],$groups) then>
YOUR_AD_CODE_GOES_HERE
</if>
(2011-05-15, 04:35 PM)Yaldaram Wrote: [ -> ]Install this: http://community.mybb.com/thread-31860.html
To place an ad just for specific usergroups, do like this;
Copy/Paste this code in the template where you want to show ads only for those specific groups.
$groups = array(1,2,5,7); // Add usergroup ID here replacing 1,2,5,7 etc.
<if in_array($mybb->user['usergroup'],$groups) then>
YOUR_AD_CODE_GOES_HERE
</if>
Alhamdulillah, suqron for help
Thanks for the compliments
Can you please paste your complete code what you've added ?
in header template just like intruction
$groups = array(1,2,5,7); // Add usergroup ID here replacing 1,2,5,7 etc.
<if in_array($mybb->user['usergroup'],$groups) then>
YOUR_AD_CODE_GOES_HERE
</if>
Change to this:
<if in_array($mybb->user['usergroup'],array(1,2,5,7)) then>
YOUR_AD_CODE_GOES_HERE
</if>