vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Inferno shoutbox name color! (https://vborg.vbsupport.ru/showthread.php?t=280363)

slammz 03-19-2012 07:52 PM

Inferno shoutbox name color!
 
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 [DATE]1332190780[/DATE] at [TIME]1332190780[/TIME] ---------------

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
Code:

<vb:if condition="$inferno['userid'] == X">
custom code
<vb:else />
everyone else
</vb:if>


slammz 03-20-2012 03:35 AM

Quote:

Originally Posted by Iain M (Post 2311207)
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
Code:

<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:

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:

Code:

{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:
Code:

<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

Quote:

Originally Posted by Iain M (Post 2311305)
Try replacing the {vb:raw shout.musername} with:
Code:

<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....

Code:

<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

Quote:

Originally Posted by Iain M (Post 2311417)
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....

Code:

<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:


All times are GMT. The time now is 01:21 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01093 seconds
  • Memory Usage 1,736KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (8)bbcode_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete