vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   user title html markup (https://vborg.vbsupport.ru/showthread.php?t=193362)

Chadi 10-11-2008 05:47 PM

user title html markup
 
Vbulletin by default has the usergroup > html markup feature. However, I'd like one specifically for user TITLE html markup as well. Couldn't find any here, either in modification graveyard or not quite that feature but close.

I tried to figure it out on my own, but not a coder by trade.

For one, I want this applied in postbit_legacy at least. So I went to that template.

I see this:

Quote:

<if condition="$post['usertitle']"><div class="smallfont">$post[usertitle]</div></if>
Now, on my home page shoutbox you cannot use it unless you're a registered member. So I have this if rule applied to the text box area of the shoutbox:

Quote:

<if condition="in_array($bbuserinfo['usergroupid'], array(2,6,7,35))">
I'm trying to figure out a way to apply the same thing specifically for the admin and moderator usergroup, to the user title. Any help on this appreciated.

Lynne 10-11-2008 08:04 PM

<if condition="is_member_of($bbuserinfo, 2,6,7,35)">

for just admins and mods:

<if condition="is_member_of($bbuserinfo, 5, 6, 7)">

dannykilla 10-13-2008 01:34 PM

So where on the postbit template do you place the code

<if condition="is_member_of($bbuserinfo, 5, 6, 7)">

Dan

Lynne 10-13-2008 05:13 PM

Quote:

Originally Posted by dannykilla (Post 1644095)
So where on the postbit template do you place the code

<if condition="is_member_of($bbuserinfo, 5, 6, 7)">

Dan

Around the item that you only want shown to users in usergroup 5, 6, or 7.

dannykilla 10-13-2008 07:56 PM

Like this?
<if condition="is_member_of($bbuserinfo, 5, 6, 7)"><div class="smallfont">$post[usertitle]</div></if>

if so it didn't work for me?

Lynne 10-13-2008 08:16 PM

What is it you are trying to do? What you are trying to do will influence what variables to use. The condition that is written will only show certain information to a user if the *user looking at the thread* is a moderator/supermod/admin. If you only want to show it if the poster is a moderator/supermod/admin, then use $post in the condition.

dannykilla 10-13-2008 08:23 PM

Basically I want to have my user title have the colour like my username for example :

in my postbit I have at the min this:

Dannykilla
Guild Leader

I want it to show this:

Dannykilla
Guild Leader

Lynne 10-13-2008 10:43 PM

It's not quite that easy to do what you want. Your username actually gets processed through a function called fetch_musername to determine what is should be displayed as. You might be able to modify that function to do the same for the title (includes/functions.php). It might be easier to just modify the postbit to add the style directly. ie for red admins:
HTML Code:

<if condition="is_member_of($post, 6)"><div style="color:red;">$post[usertitle]</div></if>

dannykilla 10-13-2008 10:47 PM

Thanks Lynne, but I have sorted it now I just copied the <span style .... >
into the User title box and that worked !!!!!

Lynne 10-13-2008 11:06 PM

Yes, if you use that, then that would work also. (I don't use that so I'd have to do it a different way on my site.)


All times are GMT. The time now is 03:50 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.00997 seconds
  • Memory Usage 1,732KB
  • 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
  • (1)bbcode_html_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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