MyBB Community Forums

Full Version: Visible after login and.......
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hello,

I have a question, I have things on my forum that is visible after login so invisible for guests. the code is:

<if $mybb->user['uid'] > 0 then>
here you want to hide
</if>


But now I want to set it also invisible for not activated members, is this possible??
So that I have the things invisible for guests and unactivated accounts.
How can I do this? set the unactivated group as guest ???? or is there a code for???


Thanks
Yes, you just have to add an or statement to the if statement.

<if $mybb->user['uid'] != 1 || $mybb->user['uid'] != 5 then>
Code to display to registered members and not to guests or awaiting activation.
</if> 

That should do it.
(2012-02-14, 08:58 PM)BleepyEvans Wrote: [ -> ]Yes, you just have to add an or statement to the if statement.

<if $mybb->user['uid'] != 1 || $mybb->user['uid'] != 5 then>
Code to display to registered members and not to guests or awaiting activation.
</if> 

That should do it.

We gonna gif it a try thanks!!!
I have try and not working Sad Sad
Ok, what PHP plugin are you using?
You want to be using $mybb->user['usergroup'], not $mybb->user['uid'].
Nice spot xD

I PMed the code I use before so if he uses that, it should sort it.
Hai

I use the plugin "PHP and Template Conditionals" from "ZiNgA BuRgA".

And I tryed the code:
<if $GLOBALS['mybb']->user['usergroup'] != 1 || $GLOBALS['mybb']->user['usergroup'] != 5>
//Code
</if> 

that I reseaved at the PM from "BleepyEvans" and that one isn't work I get errors then in the index page.

Sorry forgot the 'then', thats the problem when you dont prove read.
<if $GLOBALS['mybb']->user['usergroup'] != 1 && $GLOBALS['mybb']->user['usergroup'] != 7 then>
Try this
</if>
(2012-02-14, 10:21 PM)BleepyEvans Wrote: [ -> ]Sorry, thats the problem when you dont prove read.

Ive copied this direct from my template, this will check the users additional usergroups too.
Ive only included guests for now, if it works we can progress after.

<if $GLOBALS['mybb']->user['usergroup'] != 1 then>
Try this
</if>

This code works fine here for the guests!!
,





I have found the sollution I have set this code

<if $GLOBALS['mybb']->user['usergroup'] != 1 then><if $GLOBALS['mybb']->user['usergroup'] != 5 then>
here the things you want to hide
</if></if>

This like to be working by me!!!
I updated my post
http://community.mybb.com/thread-113470-...#pid824540

While you just posted.
Pages: 1 2