vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Design and Graphics Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=168)
-   -   Custom CSS based on Usergroup? (https://vborg.vbsupport.ru/showthread.php?t=192289)

dotJoel 09-30-2008 01:42 AM

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

dotJoel 10-07-2008 01:59 PM

* Bump *

Lynne 10-07-2008 02:37 PM

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?)

geeklands 10-20-2008 10:33 AM

This is relevant to my interests,

Is there any full way to do this?

Ive seen it on some company forums.

Lynne 10-20-2008 02:21 PM

Quote:

Originally Posted by geeklands (Post 1648829)
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?

geeklands 10-21-2008 08:17 PM

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

Lynne 10-21-2008 08:30 PM

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.

EragonSN 07-07-2009 03:04 PM

Sorry to bump this old thread, but anyone got any clues to this ?

Lynne 07-07-2009 03:18 PM

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.

EragonSN 07-07-2009 03:21 PM

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.


All times are GMT. The time now is 01:54 AM.

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.02621 seconds
  • Memory Usage 1,734KB
  • 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
  • (2)bbcode_html_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete