Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Server Development
Habbo Retros
Habbo Q&A
How to make a certain username a certain colour with PHP [HELP]
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="leenster" data-source="post: 111003" data-attributes="member: 10665"><p>try it without the clean()...</p><p>[CODE]</p><p>if ($link)</p><p>{</p><p> if($data['username']== 'JoshuaLuke') $class = 'class="someCSSclass"'; else $class = '';</p><p> </p><p> $prefix .= '<a href="/user/' . clean($data['username']) . '" ' .$class. '>';</p><p> $suffix .= '</a>';</p><p>}[/CODE]</p><p> </p><p> </p><p> </p><p>make sure to replace your</p><p><span style="color: #000000"><span style="color: #007700">if (</span><span style="color: #0000bb">$link</span><span style="color: #007700">)</span></span></p><p><span style="color: #007700">{</span><span style="color: #0000bb">$prefix </span><span style="color: #007700">.= </span><span style="color: #dd0000">'<a href="/user/' </span><span style="color: #007700">. </span><span style="color: #0000bb">clean</span><span style="color: #007700">(</span><span style="color: #0000bb">$data</span><span style="color: #007700">[</span><span style="color: #dd0000">'username'</span><span style="color: #007700">]) . </span><span style="color: #dd0000">'">'</span><span style="color: #007700">;</span><span style="color: #0000bb">$suffix </span><span style="color: #007700">.= </span><span style="color: #dd0000">'</a>'</span><span style="color: #007700">;</span></p><p><span style="color: #007700">}</span></p><p> </p><p>with the one i gave you..</p><p> </p><p> </p><p>from what i can see it should work...</p></blockquote><p></p>
[QUOTE="leenster, post: 111003, member: 10665"] try it without the clean()... [CODE] if ($link) { if($data['username']== 'JoshuaLuke') $class = 'class="someCSSclass"'; else $class = ''; $prefix .= '<a href="/user/' . clean($data['username']) . '" ' .$class. '>'; $suffix .= '</a>'; }[/CODE] make sure to replace your [COLOR=#000000][COLOR=#007700]if ([/COLOR][COLOR=#0000bb]$link[/COLOR][COLOR=#007700])[/COLOR][/COLOR] [COLOR=#007700]{[/COLOR][COLOR=#0000bb]$prefix [/COLOR][COLOR=#007700].= [/COLOR][COLOR=#dd0000]'<a href="/user/' [/COLOR][COLOR=#007700]. [/COLOR][COLOR=#0000bb]clean[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000bb]$data[/COLOR][COLOR=#007700][[/COLOR][COLOR=#dd0000]'username'[/COLOR][COLOR=#007700]]) . [/COLOR][COLOR=#dd0000]'">'[/COLOR][COLOR=#007700];[/COLOR][COLOR=#0000bb]$suffix [/COLOR][COLOR=#007700].= [/COLOR][COLOR=#dd0000]'</a>'[/COLOR][COLOR=#007700];[/COLOR] [COLOR=#007700]}[/COLOR] with the one i gave you.. from what i can see it should work... [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
How to make a certain username a certain colour with PHP [HELP]
Top