MyBB Community Forums
Disable Signatures for Guests (IF statement inside templates) - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Community Archive (https://community.mybb.com/forum-106.html)
+--- Forum: Archived Forums (https://community.mybb.com/forum-143.html)
+---- Forum: Archived Development and Support (https://community.mybb.com/forum-155.html)
+----- Forum: MyBB 1.6 (https://community.mybb.com/forum-138.html)
+------ Forum: 1.6 General Support (https://community.mybb.com/forum-127.html)
+------ Thread: Disable Signatures for Guests (IF statement inside templates) (/thread-80174.html)

Pages: 1 2 3


RE: Disable Signatures for Guests (IF statement inside templates) - Omar G. - 2011-09-02

I use the same plugin, weird, anyways, try these:

<if $GLOBALS['mybb']->user['usergroup'] == 1 then>
//Guests see this content
</if>

or

<if $mybb->usergroup['gid'] == 1 then>
//Guests see this content
</if>

Good luck.


RE: Disable Signatures for Guests (IF statement inside templates) - Glas - 2011-09-02

(2011-09-02, 06:06 PM)Sama34 Wrote: I use the same plugin, weird, anyways, try these:

<if $GLOBALS['mybb']->user['usergroup'] == 1 then>
//Guests see this content
</if>

or

<if $mybb->usergroup['gid'] == 1 then>
//Guests see this content
</if>

Good luck.


1st method outputs:
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/beatdjn/public_html/foros/global.php(504) : eval()'d code on line 2


2nd method:
does not show error, but still shows login form


Sad


RE: Disable Signatures for Guests (IF statement inside templates) - Omar G. - 2011-09-02

Second code is suppose to show the login from to guests, it shows the login form to you as a member?

Can you share the exact code inside your template for the ones that show syntax errors?


RE: Disable Signatures for Guests (IF statement inside templates) - Glas - 2011-09-02

(2011-09-02, 06:25 PM)Sama34 Wrote: Second code is suppose to show the login from to guests, it shows the login form to you as a member?

Can you share the exact code inside your template for the ones that show syntax errors?

2nd shows to both, users and guests

exact code for error is
<if $GLOBALS['mybb']->user['usergroup'] == 1 then>
<form action='member.php' method='post'>
<font color="FFFFFF">Usuario: </font><input type='text' name='username' size='9' maxlength='30' />
<text="FFFFFF">Contraseña: </text> <input type='password' name='password' size='9' />
<input type='hidden' name='action' value='do_login'>
<input type='hidden' name='url' value='index.php' />
<input type='submit' class='submit' name='submit' value='Conectar' /></form>

ignoren esto estoy haciendo pruebas
</if> 



RE: Disable Signatures for Guests (IF statement inside templates) - Omar G. - 2011-09-02

Try this
<if $GLOBALS['mybb']->user['usergroup'] == 1 then>
<form action="member.php" method="post">
<font color="FFFFFF">Usuario: </font><input type="text" name="username" size="9" maxlength="30" />
<text="FFFFFF">Contraseña: </text> <input type="password" name="password" size="9" />
<input type="hidden" name="action" value="do_login">
<input type="hidden" name="url" value="index.php" />
<input type="submit" class="submit" name="submit" value="Conectar" /></form>

ignoren esto estoy haciendo pruebas
</if> 



RE: Disable Signatures for Guests (IF statement inside templates) - Glas - 2011-09-02

(2011-09-02, 06:33 PM)Sama34 Wrote: Try this
<if $GLOBALS['mybb']->user['usergroup'] == 1 then>
<form action="member.php" method="post">
<font color="FFFFFF">Usuario: </font><input type="text" name="username" size="9" maxlength="30" />
<text="FFFFFF">Contraseña: </text> <input type="password" name="password" size="9" />
<input type="hidden" name="action" value="do_login">
<input type="hidden" name="url" value="index.php" />
<input type="submit" class="submit" name="submit" value="Conectar" /></form>

ignoren esto estoy haciendo pruebas
</if> 



Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/beatdjn/public_html/foros/global.php(504) : eval()'d code on line 2


RE: Disable Signatures for Guests (IF statement inside templates) - Omar G. - 2011-09-02

I don't what is happening, it is working for me, try asking Yumi, maybe it is a problem with your forum or some plugin you use.


RE: Disable Signatures for Guests (IF statement inside templates) - Glas - 2011-09-03

ugh can't contact yumi or log into mybbhacks
always ask me for a captcha where there is no one