PDA

View Full Version : Inferno shoutbox name color!


slammz
03-19-2012, 07:52 PM
So I was messing around in the template "inferno_shoutbox_shout". I notice that I could make everyone's name do different things like so:

https://vborg.vbsupport.ru/

I was wondering how I could do it for only one user or several? So like say I want mine like that but then I will billy's to have something different? How can I do this?


Thanks :)

--------------- Added 1332190780 at 1332190780 ---------------

This is on another forum:
https://vborg.vbsupport.ru/

That's what I want it like without having to make a usergroup since then my name would be displayed like that on the whole forum.

Iain M
03-20-2012, 12:14 AM
I don't use the Inferno shoutbox, but if you search for userid in the template you were editing you should be able to do something like
<vb:if condition="$inferno['userid'] == X">
custom code
<vb:else />
everyone else
</vb:if>

slammz
03-20-2012, 03:35 AM
I don't use the Inferno shoutbox, but if you search for userid in the template you were editing you should be able to do something like
<vb:if condition="$inferno['userid'] == X">
custom code
<vb:else />
everyone else
</vb:if>

It isn't working for the things I have tried. This is the template code:


<vb:if condition="!$shout[s_me]">
<div style="padding-top: 1px; padding-bottom: 1px;<vb:if condition="$shout[s_notice]">padding-bottom: 6px;</vb:if>" class="smallfont"<vb:if condition="$shout[canmod]"> ondblclick="return InfernoShoutbox.edit_shout({vb:raw shout.sid});"</vb:if>><vb:if condition="!$shout[s_notice]">[<span class="time">{vb:raw shout.date} {vb:raw shout.time}</span>] </vb:if><vb:if condition="$shout[s_private] > 0 && !$ispmwindow"><b>[PM]</b> </vb:if><vb:if condition="!$shout[s_notice]"><a <vb:if condition="!$vboptions[ishout_disable_pm]">href="#" onclick="return InfernoShoutbox.open_pm_tab('pm_{vb:raw shout.userid}', '{vb:raw shout.javascript_name}');"<vb:else />href="member.php?{vb:raw session.sessionurl}u={vb:raw shout.s_user}"</vb:if>></vb:if>
{vb:raw shout.musername}
<vb:if condition="!$shout[s_notice]"></a></vb:if>: {vb:raw shout.s_shout}</div>
<vb:else />
<div style="padding-top: 1px; padding-bottom: 1px;" class="smallfont"<vb:if condition="$shout[canmod]"> ondblclick="return InfernoShoutbox.edit_shout({vb:raw shout.sid});"</vb:if>>*{vb:raw shout.musername} {vb:raw shout.s_shout}*</div>
</vb:if>


The part:


{vb:raw shout.s_user}"</vb:if>></vb:if>
{vb:raw shout.musername}
<vb:if condition="!$shout[s_notice]"></a></vb:if>: {vb:raw shout.s_shout}</div>
<vb:else />


That "{vb:raw shout.musername}" is what controls what the username does.

Iain M
03-20-2012, 09:33 AM
Try replacing the {vb:raw shout.musername} with:
<vb:if condition="$shout['s_user'] == X">
<span style="CUSTOM STYLING">{vb:raw shout.musername}</span>
<vb:else />
{vb:raw shout.musername}
</vb:if>

Change X to your userid.

slammz
03-20-2012, 01:22 PM
Try replacing the {vb:raw shout.musername} with:
<vb:if condition="$shout['s_user'] == X">
<span style="CUSTOM STYLING">{vb:raw shout.musername}</span>
<vb:else />
{vb:raw shout.musername}
</vb:if>

Change X to your userid.

Thank You so much man! You are a ton of help!:up:

Also, how could I do a different one for each user?

Iain M
03-20-2012, 04:13 PM
How many users are we talking about? You could end up with a lot of code... but a quick way is just add an else if for each user....

<vb:if condition="$shout['s_user'] == X">
<span style="CUSTOM STYLING">{vb:raw shout.musername}</span>
<vb:elseif condition="$shout['s_user'] == X" />
<span style="CUSTOM STYLING">{vb:raw shout.musername}</span>
<vb:else />
{vb:raw shout.musername}
</vb:if>

slammz
03-20-2012, 06:08 PM
How many users are we talking about? You could end up with a lot of code... but a quick way is just add an else if for each user....

<vb:if condition="$shout['s_user'] == X">
<span style="CUSTOM STYLING">{vb:raw shout.musername}</span>
<vb:elseif condition="$shout['s_user'] == X" />
<span style="CUSTOM STYLING">{vb:raw shout.musername}</span>
<vb:else />
{vb:raw shout.musername}
</vb:if>

That's what I was looking for! Thanks.:up: