PDA

View Full Version : shoutbox permissions


Chadi
07-30-2005, 01:59 AM
I use a shoutbox from www.cbox.co.za

This is my code


<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="center" style="border-style:solid; border-width:1px; " bgcolor="#F5F5FF" bordercolor="#C0C0C0">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td style="border-bottom-style: solid; border-bottom-width: 2px">
<iframe frameborder="0" width="100%" src="http://cbox.co.za/box/?boxid=43&boxtag=786&sec=main" marginheight="0" marginwidth="0" scrolling="yes" name="cboxmain" allowtransparency="yes" style="border: #ababab 0px solid" height="200"></iframe></td></tr>
<tr><td>
<if condition="is_member_of($bbuserinfo,1,3,4,8,11)">
You must be registered and confirmed active account to use the shoutbox
<else />
<iframe frameborder="0" width="100%" height="50" src="http://cbox.co.za/box/?boxid=439&boxtag=7868&sec=form&wname=68&wemail=68&wmsg=175" marginheight="0" marginwidth="0" scrolling="no" name="cboxform" allowtransparency="yes" style="border: #ababab 0px solid; border-top: 0px;"></iframe>
</if>
</td></tr></table></td>


The red part is what was suggested to use to restrict access to the groups listed. Problem is it only works on non registered users but no other groups in the list. How do I correct this?

Adrian Schneider
07-30-2005, 02:03 AM
Unless you installed this hack (https://vborg.vbsupport.ru/showthread.php?t=61149) that won't work. You'll need to have each usergroup seperately. such as:

<if condition="is_member_of($bbuserinfo, 1) OR is_member_of($bbuserinfo, 3) ...">...</if>

Chadi
07-30-2005, 02:32 AM
I keep getting this error

Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/chadi/public_html/includes/adminfunctions_template.php(3096) : eval()'d code on line 319

This is what I put in:

<if condition="is_member_of($bbuserinfo, 1)"></if>
<if condition="is_member_of($bbuserinfo, 3)"></if>
<if condition="is_member_of($bbuserinfo, 4)"></if>
<if condition="is_member_of($bbuserinfo, 8)"></if>
<if condition="is_member_of($bbuserinfo, 11)"></if>
You must be registered and confirmed active account to use the shoutbox
<else />

What am I doing wrong?

It only works on group 1

Boofo
07-30-2005, 02:37 AM
Read post number 2. That is your answer. ;)

Chadi
07-30-2005, 02:38 AM
What do you mean? That is what I tried.

I tried the hack also, didn't work at all.

I'm not technical with coding so please bear with me here.

I tried this also

<if condition="is_member_of($bbuserinfo, 1) OR is_member_of($bbuserinfo, 3) OR is_member_of($bbuserinfo, 4) OR is_member_of($bbuserinfo, 8) OR is_member_of($bbuserinfo, 11)"></if>

Error:

Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/chadi/public_html/includes/adminfunctions_template.php(3096) : eval()'d code on line 315

I tried this also

<if condition="is_member_of($bbuserinfo, 1) OR is_member_of($bbuserinfo, 3) OR is_member_of($bbuserinfo, 4) OR is_member_of($bbuserinfo, 8) OR is_member_of($bbuserinfo, 11) "</if>

Error:

Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/chadi/public_html/includes/adminfunctions_template.php(3096) : eval()'d code on line 38

Adrian Schneider
07-30-2005, 02:45 AM
<if condition="is_member_of($bbuserinfo, 1) OR is_member_of($bbuserinfo, 3) OR is_member_of($bbuserinfo, 4) OR is_member_of($bbuserinfo, 8) OR is_member_of($bbuserinfo, 11) "</if>

<if condition="is_member_of($bbuserinfo, 1) OR is_member_of($bbuserinfo, 3) OR is_member_of($bbuserinfo, 4) OR is_member_of($bbuserinfo, 8) OR is_member_of($bbuserinfo, 11)">
text
<else />
othertext
</if>

Chadi
07-30-2005, 02:49 AM
I'm sorry but your confusing me :(

<if condition="is_member_of($bbuserinfo, 1) OR is_member_of($bbuserinfo, 3) OR is_member_of($bbuserinfo, 4) OR is_member_of($bbuserinfo, 8) OR is_member_of($bbuserinfo, 11)">
You must be registered and account activated to use this shoutbox.
<else />
Shoutbox enabled.
</if>

Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/chadi/public_html/includes/adminfunctions_template.php(3096) : eval()'d code on line 317

Adrian Schneider
07-30-2005, 02:58 AM
lol I'm having troubles finding the typo, what version of vBulletin are you using?

Chadi
07-30-2005, 03:04 AM
3.07

I tried with and without the hack (both versions) you mentioned. Right now I'm without the hack.

Anyone else wish to try ? :)