MyBB Tutorials

Different usertitle style based on defined uid

Submitted by linkzy, , Thread ID: 52

Thread Closed
linkzy
No pressure, no diamonds
Level:
0
Reputation:
181
Posts:
5.34K
Likes:
341
Credits:
54
15-01-2015, 07:55 AM
This post was last modified: 17-01-2015, 09:19 AM by linkzy
#1
You Need Php Template conditional plugin

1- Now open postbit template or postbit_classic whatever one you actually using
Find:
Code (Text):
{$post['usertitle']}
Replace it with:
PHP:
PHP Code:
<if $post['uid'] == 2 then>
                <
span style="color: red;">{$post['usertitle']}</span>
<else />
{
$post['usertitle']}
</if><
br /> 

This will give the user with the id = 2 different usertitle style wich ofc is defined by you.


Now this will work on postbit only, if you want to change it on member profile too do this:
1- Open Member Template -> member_profile
Find:
PHP Code:
{$usertitle
Replace it with:

PHP Code:
<if $memprofile['uid'] == 2 then>
                <
span style="color: red;">paki wizard</span>
<else>
{
$usertitle}
</if><
br /> 


That's it, hope you enjoyed the tutorial.
| A | v4hl| Addicted | Senpai | Sui | Sensei | H | fdigl |


RE: Different usertitle style based on defined uid

linkzy
No pressure, no diamonds
Level:
0
Reputation:
181
Posts:
5.34K
Likes:
341
Credits:
54
OP
17-01-2015, 09:09 AM
#2
17-01-2015, 08:59 AM
dnyan247 Wrote:
How i can provide different styles to each user of same group

Well you mean user in a group right ??

if so then


<if $post['usergroup'] == groupidhere then>

Stuffs done D:


In Member prof

<if $memprofile['usergroup'] == groupidhere then>
Done D:
| A | v4hl| Addicted | Senpai | Sui | Sensei | H | fdigl |


RE: Different usertitle style based on defined uid

Blowjob
Closed Account
Level:
0
Reputation:
26
Posts:
2.16K
Likes:
189
Credits:
2.53K
17-01-2015, 09:16 AM
This post was last modified: 17-01-2015, 09:17 AM by Blowjob
#3
Quick suggestion,

replace
Code:
<if $memprofile['uid'] == 2 then>
                <span style="color: red;">paki wizard</span><br />
<else>
{$usertitle}
</if>

with

Code:
( <if $memprofile['uid'] == 1 then>
                <span style="color: red;">paki wizard</span>
<else>
{$usertitle}
</if> )<br/>

as if you don't, you'll get this:

[Image: oKaKk6I.png]

but if you do, you'll get this

[Image: ZI7mbIo.png]

RE: Different usertitle style based on defined uid

linkzy
No pressure, no diamonds
Level:
0
Reputation:
181
Posts:
5.34K
Likes:
341
Credits:
54
OP
17-01-2015, 09:19 AM
#4
17-01-2015, 09:16 AM
Hug Wrote:
Quick suggestion,

replace

Code:
<if $memprofile['uid'] == 2 then>
                <span style="color: red;">paki wizard</span><br />
<else>
{$usertitle}
</if>

with


Code:
( <if $memprofile['uid'] == 1 then>
                <span style="color: red;">paki wizard</span>
<else>
{$usertitle}
</if> )<br/>

as if you don't, you'll get this:

[Image: oKaKk6I.png]

but if you do, you'll get this

[Image: ZI7mbIo.png]

oh yeah use the second one broh
| A | v4hl| Addicted | Senpai | Sui | Sensei | H | fdigl |


RE: Different usertitle style based on defined uid

Blowjob
Closed Account
Level:
0
Reputation:
26
Posts:
2.16K
Likes:
189
Credits:
2.53K
17-01-2015, 09:21 AM
This post was last modified: 23-01-2015, 03:15 AM by Blowjob
#5
17-01-2015, 09:19 AM
Mr_Devil Wrote:
17-01-2015, 09:16 AM
Hug Wrote:
Quick suggestion,

replace


Code:
<if $memprofile['uid'] == 2 then>
                <span style="color: red;">paki wizard</span><br />
<else>
{$usertitle}
</if>

with



Code:
( <if $memprofile['uid'] == 1 then>
                <span style="color: red;">paki wizard</span>
<else>
{$usertitle}
</if> )<br/>

as if you don't, you'll get this:

[Image: oKaKk6I.png]

but if you do, you'll get this

[Image: ZI7mbIo.png]

oh yeah use the second one broh

Thank you for noticing you're mistake ~

RE: Different usertitle style based on defined uid

linkzy
No pressure, no diamonds
Level:
0
Reputation:
181
Posts:
5.34K
Likes:
341
Credits:
54
OP
17-01-2015, 09:23 AM
#6
17-01-2015, 09:21 AM
Hug Wrote:
17-01-2015, 09:19 AM
Mr_Devil Wrote:
17-01-2015, 09:16 AM
Hug Wrote:
Quick suggestion,

replace



Code:
<if $memprofile['uid'] == 2 then>
                <span style="color: red;">paki wizard</span><br />
<else>
{$usertitle}
</if>

with




Code:
( <if $memprofile['uid'] == 1 then>
                <span style="color: red;">paki wizard</span>
<else>
{$usertitle}
</if> )<br/>

as if you don't, you'll get this:

[Image: oKaKk6I.png]

but if you do, you'll get this

[Image: ZI7mbIo.png]

oh yeah use the second one broh

lol what?

Well i wrote that code by mistake :'( so ok use the one which ur using now
| A | v4hl| Addicted | Senpai | Sui | Sensei | H | fdigl |


RE: Different usertitle style based on defined uid

Tom
Tom yum soup <3
Prime
Level:
0
Reputation:
45
Posts:
1.51K
Likes:
97
Credits:
1.62K
17-01-2015, 09:24 AM
#7
Hug I should of done it on your forum first...

RE: Different usertitle style based on defined uid

Tom
Tom yum soup <3
Prime
Level:
0
Reputation:
45
Posts:
1.51K
Likes:
97
Credits:
1.62K
17-01-2015, 10:09 AM
#8
Also question, will you have to do this for every user or will it still use usergroup colours by it self?

RE: Different usertitle style based on defined uid

linkzy
No pressure, no diamonds
Level:
0
Reputation:
181
Posts:
5.34K
Likes:
341
Credits:
54
OP
17-01-2015, 10:12 AM
#9
17-01-2015, 10:09 AM
Tom Wrote:
Also question, will you have to do this for every user or will it still use usergroup colours by it self?

i didnt got you
| A | v4hl| Addicted | Senpai | Sui | Sensei | H | fdigl |


RE: Different usertitle style based on defined uid

Blowjob
Closed Account
Level:
0
Reputation:
26
Posts:
2.16K
Likes:
189
Credits:
2.53K
17-01-2015, 10:35 AM
#10
17-01-2015, 09:24 AM
Tom Wrote:
Hug I should of done it on your forum first...

Nope!

Users browsing this thread: 1 Guest(s)