PDA

View Full Version : Hiding a specific table from "subscribers" group?


sross
05-25-2004, 11:24 PM
Hi, I have a table with a google ad in it:
<td class="tcat" colspan="20" style="font-weight:normal"><div class="smallfont"> <div>
<div align="center">Visiting google ads supports apug.&nbsp;<br>
<script type="text/javascript"><!--
google_ad_client = "pub-5488930663746956";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_channel ="";
google_ad_type = "text_image";
google_color_border = "C1BDB1";
google_color_bg = "FFFFFF";
google_color_link = "333333";
google_color_url = "444444";
google_color_text = "444444";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<br>
<br>
</div></td>
</tr>

I would like to hide this table from my subscribers group. I am not a coder but am assuming it needs somekind of if statement in it to say if part of group9 then hide table, etc? Can anyone help me code it? Thanks!

Majik?
05-26-2004, 01:04 AM
If it's usergroup 9 you use for your subscribers, you can use this:
<if condition="$bbuserinfo[usergroupid]!=9">
<!-- Non-Subscriber Stuff Here -->
</if>
If you use a secondary group for your subscribers, use this:
<if condition="!is_member_of($bbuserinfo, 9)">
<!-- Non-Subscriber Stuff Here -->
</if>
The second block of code using the is_member_of function will work for both primary and secondary groups. ;)

If you were wanting one block of code for subscribers and one for non-subscribers, use one of the following:
<if condition="$bbuserinfo[usergroupid]!=9">
<!-- Non-Subscriber Stuff Here -->
<else />
<!-- Subscriber Stuff Here -->
</if>
<if condition="!is_member_of($bbuserinfo, 9)">
<!-- Non-Subscriber Stuff Here -->
<else />
<!-- Subscriber Stuff Here -->
</if>

drex
12-24-2005, 06:40 PM
how about on the <php> side.

i can't seem to get the following to work for usergroup '9', a secondary user group

if (!in_array($bbuserinfo['usergroupid'], array(9,5,6,7))) print_no_permission();

it works fine for the primary user groups.

thanks