Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Design and Graphics Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 09-30-2008, 01:42 AM
dotJoel dotJoel is offline
 
Join Date: Feb 2007
Location: Australia
Posts: 75
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Custom CSS based on Usergroup?

Hi Guys,

I have a question....

I would like when posts are made from a certain usergroup in the forum that their posts receive a different background to others so that other members can recognise these posts easier.

I understand I need to use an <if> statement to achieve this. I tried:

<if condition="is_member_of($vbulletin->userinfo, 1, 2, 3)"></if>
<td class="postbox" id="td_post_$post[postid]">
<else />
<td class="postbox2" id="td_post_$post[postid]">
</if>

However this only works for the person making the post. It does not change the background for everyone else reading the forum only the individual that made the post can see the difference when they are logged in.

Any help would be great!

Regards,

Joel
Reply With Quote
  #2  
Old 10-07-2008, 01:59 PM
dotJoel dotJoel is offline
 
Join Date: Feb 2007
Location: Australia
Posts: 75
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

* Bump *
Reply With Quote
  #3  
Old 10-07-2008, 02:37 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How about:
HTML Code:
<if condition="is_member_of($post, 1, 2, 3)">
<td class="postbox" id="td_post_$post[postid]">
<else />
<td class="postbox2" id="td_post_$post[postid]">
</if>
(Also, did you realize you had an </if> after your conditional on the first line?)
Reply With Quote
  #4  
Old 10-20-2008, 10:33 AM
geeklands geeklands is offline
 
Join Date: Feb 2008
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is relevant to my interests,

Is there any full way to do this?

Ive seen it on some company forums.
Reply With Quote
  #5  
Old 10-20-2008, 02:21 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by geeklands View Post
This is relevant to my interests,

Is there any full way to do this?

Ive seen it on some company forums.
Did you try what was posted?
Reply With Quote
  #6  
Old 10-21-2008, 08:17 PM
geeklands geeklands is offline
 
Join Date: Feb 2008
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry, im not too good with this kind of stuff.

What im after, if the background of the posts of admins, mods and super mods to be a different color from the norm.

the Age Of Conan forum has it, although they wont tell me how
Reply With Quote
  #7  
Old 10-21-2008, 08:30 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is for 3.6.8, change for your own version...

Find this code in your postbit(_legacy) and add this style info into the div tag:
HTML Code:
<tr>
    <td class="alt1" id="td_post_$post[postid]" style="background-color:yellow">
    <!-- message, attachments, sig -->
And, change yellow to the color of your choice. I have not tested this code.
Reply With Quote
  #8  
Old 07-07-2009, 03:04 PM
EragonSN EragonSN is offline
 
Join Date: Sep 2006
Location: Norway
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry to bump this old thread, but anyone got any clues to this ?
Reply With Quote
  #9  
Old 07-07-2009, 03:18 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The answer was posted, so I'm not sure what you mean. I think there may even be a mod for this - do a search in "all mods" "titles only" and you may find it.
Reply With Quote
  #10  
Old 07-07-2009, 03:21 PM
EragonSN EragonSN is offline
 
Join Date: Sep 2006
Location: Norway
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm sorry, but I tried to search, and found nothing, or, maybe I'm just using the wrong key-words.

Either way, the code above doesn't work, the only thing I get to work is to show all member posts with the same color, regardless of their user group.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:58 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.08261 seconds
  • Memory Usage 2,255KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_html
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete