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

Reply
 
Thread Tools Display Modes
  #1  
Old 01-05-2009, 02:30 AM
DR AUTONAMUS DR AUTONAMUS is offline
 
Join Date: Jul 2007
Posts: 35
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Admins and mods have different post backgrounds when posting.

When making a post is it possible to have the admins and mods have different post backgrounds when posting... so you can see what level they are(Usergroup)

If you would like pictures to explain what I mean just ask.
Reply With Quote
  #2  
Old 01-05-2009, 02:46 PM
Kirk Y's Avatar
Kirk Y Kirk Y is offline
 
Join Date: Apr 2005
Location: Tallahassee, Florida
Posts: 2,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Find the class tag of that td cell in your postbit and use a conditional statement to switch it around depending on usergroup.

HTML Code:
<td class="<if condition="is_member_of($post, X)">alt1</else>alt2</if>">...</td>
Reply With Quote
  #3  
Old 01-06-2009, 08:29 AM
DR AUTONAMUS DR AUTONAMUS is offline
 
Join Date: Jul 2007
Posts: 35
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So this would allow me to have the post bits like these:

I know these are phpBB but this is were I got the Idea from.
Admin:

Mod:

User:


So I need to make 3 different colors for the post bit dependent on there user group... Maybe more for future groups.
Reply With Quote
  #4  
Old 01-06-2009, 02:52 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Kirby's code is a bit off... it should be <else />, not </else>. But you can use a condition around any of the table column classes you want to change. It may be easier to 'read' if you do it this way:

HTML Code:
<if condition="is_member_of($post, X)">
<td class="whatever">
<else />
<if condition="is_member_of($post, Y)">
<td class="whatever2">
<else />
<td class="alt1">
</if>
</if>
You'll need to do that for every td tag you want changed.
Reply With Quote
  #5  
Old 01-06-2009, 03:08 PM
TimberFloorAu's Avatar
TimberFloorAu TimberFloorAu is offline
 
Join Date: May 2008
Location: Brisbane
Posts: 2,264
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can we alternate colour background on each subsequent post, within same usergroup?
Reply With Quote
  #6  
Old 01-06-2009, 03:19 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I would guess so, but I think you would have to get a plugin involved then.
Reply With Quote
  #7  
Old 01-06-2009, 03:26 PM
DR AUTONAMUS DR AUTONAMUS is offline
 
Join Date: Jul 2007
Posts: 35
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So this would be before every td tag in the postbit template ?

$post, X and $post, y would be the user groups?

and How would I make another alt# so I could have it on different styles
Reply With Quote
  #8  
Old 01-06-2009, 03:41 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You would do that for every td tag that you wish to change. I've seen some users only want to change the post background and that would be here in red:
Code:
    <if condition="$show['moderated']">
    <td class="alt2" id="td_post_$post[postid]">
    <else />
    <td class="alt1" id="td_post_$post[postid]">
    </if>
Make sure when you change it that all your <if> tags have a closing </if> tag.

x and y would be the usergroups.

To add another alt class, you would put it in the Main CSS for the style - at the bottom of that page.
Reply With Quote
  #9  
Old 01-06-2009, 03:54 PM
SiK GambleR SiK GambleR is offline
 
Join Date: Oct 2007
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

now, as a secondary question to this, what if instead of changing the postbit BG I wanted to change just the admin or mod's font color, is that possible?
Reply With Quote
  #10  
Old 01-06-2009, 04:04 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sure, you can either just change the class or add the css for the color inline there.

If you just want to change the background inline, instead of adding a new class, just go:
Code:
<td class="alt2" id="td_post_$post[postid]" style="background: #00ff00 url('smiley.gif') no-repeat fixed center;">
(All just a thrown together example - don't use that code cuz I have no idea what you would produce!) Doing so for the font color would be similar.
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 01:42 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.04300 seconds
  • Memory Usage 2,253KB
  • Queries Executed 11 (?)
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_code
  • (2)bbcode_html
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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_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