MyBB Community Forums

Full Version: COMPLETE: PHP in profile template
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm trying to make it so one specific account is displayed a certain way, and all the other follow suite. I have the php plug in installed. I'm currently trying to attempt something below, but it's not working and if you guys could sort of debug for me that would be marvelous ^^; I'm quite new to using php.

<if $mybb->uid='7' then>
this is the alternate information I want displayed!

                         <else>

this is the information ever profile should have!
</if>
$mybb->user['uid'] is what holds the current connected user's UID. $memprofile['uid'] is what holds the profile owner's UID.
so, I should have it as $mybb->user['uid']? How do I set it to only apply if the uid is 7?

My best guess is $mybb->user['uid']='7' but that didn't work too well

oh, I'm speaking about the mini profile btw, the one displayed in posts. I forgot to mention that, lol. I just want to make it so this special account is displayed differently and instead of his name linking to his profile, it would like to it's own page.
<if $post['uid']== '7' then><a href="member.php">{$post['username']}</a><else>{$post['profilelink']}</if>

Should do it for postbit

Of course replace member.php with the correct link.
$mybb->user['uid'] => Current connected user
$memprofile['uid'] => Profile owner
$post['uid'] => Post author
*logged mentally for future reference

Thank you both!
You are welcome.

Note that I didn't noticed Leefish's post.
Your answer was informative though Omar.

at OP - look in the postbit and showthread - you will see many variables - {$thread['uid']} could be handy, as is {$post['usergroup']}.
C: i see that now. I only noticed it after i altered what you had suggested XD

@Omar your information was helpful and will continue to be in the future, when I'll need to know those things XD which as much as these people work me, I'm sure I will. Both of you were very helpful to me c: