Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
  #1  
Old 04-23-2005, 05:21 PM
HeloHi's Avatar
HeloHi HeloHi is offline
 
Join Date: Feb 2005
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default How do I alternate quote box color?

I use alternating post colors, I know that using the main CSS for a certain template to change the alt2 color sets the quote box to that color. But on the even reply posts, if someone quotes, the color of the quote box is the same color as the post itself.

So what I am wondering is, how to make the quote box alternate color to the post it is in. If it is a quote in a post that is using alt1 color, I would like the quote box to use the alt2 color, and if it is a quote in a post using alt2 color, I would like the quote box to use the alt1 color.

Am I missing something simple here? Please help!

here is my bbcode_quote template:

Code:
<div style="margin:20px; margin-top:5px; <if condition="$show['iewidthfix']">width: 100%;</if>">
	<div class="smallfont" style="margin-bottom:2px">$vbphrase[quote]:</div>
	<table cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%">
	<tr>
		<td class="alt2" style="border:1px inset">
			<if condition="$show['username']">
				<div><phrase 1="$username">$vbphrase[originally_posted_by_x]</phrase></div>
				<div style="font-style:italic">$message</div>
			<else />
				$message
			</if>
		</td>
	</tr>
	</table>
</div>
I know it needs to be changed to reach the effect I desire, but I am a total n00b coder. Any suggestions?
Reply With Quote
  #2  
Old 04-23-2005, 07:45 PM
Telkman Telkman is offline
 
Join Date: Jul 2003
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If the post colour is simply defined through the normal .alt1/.alt2 classes, try this...

Replace:

Code:
<td class="alt2" style="border:1px inset">
With:

Code:
<td class="altquote" style="border:1px inset">
Then in your "Additional CSS Definitions" for the style in question, add css declarations for the styling you want...

e.g.

Code:
.alt1 .altquote { background: #ff0000; }
.alt2 .altquote { background: #0000ff; }
(Obviously the classes can be changed if you're using something else...)
Reply With Quote
  #3  
Old 04-23-2005, 08:01 PM
HeloHi's Avatar
HeloHi HeloHi is offline
 
Join Date: Feb 2005
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks

That works, in that it alternates the color of the quote box, but it is the same color as the post it is in. I am trying to make the quote box the opposite color. I am sure it is only some small modification I need to make.

here is a sample thread:
http://www.forums.paraplanet.com/showthread.php?t=55

If I can make it to where the colors of the quote boxes are switched, then my goal would be met!
Reply With Quote
  #4  
Old 04-23-2005, 08:04 PM
Telkman Telkman is offline
 
Join Date: Jul 2003
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry, those should be ".alt1.altquote" and ".alt2.altquote".

They went the same colour as the posts because the classes were invalid - if you just add those .'s, one will go bright red, the other bright blue, obviously you'll want to change those to your choice of colours.
Reply With Quote
  #5  
Old 04-23-2005, 08:19 PM
HeloHi's Avatar
HeloHi HeloHi is offline
 
Join Date: Feb 2005
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmmm it doesn't seem to be working...

I changed the:

Code:
.alt1.altquote { background: #dfdfdf; }
.alt2.altquote { background: #f1f1f1; }
by switching the background colors to test it, and it only seems to be using alt2 part for every quote, instead of alternating.
Reply With Quote
  #6  
Old 04-23-2005, 08:26 PM
Telkman Telkman is offline
 
Join Date: Jul 2003
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Try ".alt1 .altquote" and ".alt2 .altquote"

Sorry, I'm not particularly awake!
Reply With Quote
  #7  
Old 04-23-2005, 08:30 PM
HeloHi's Avatar
HeloHi HeloHi is offline
 
Join Date: Feb 2005
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I LOVE YOU

It works flawlessly! Thanks for the help, I really really appreciate it!!!
Reply With Quote
Reply

Thread Tools
Display Modes

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 12:24 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03970 seconds
  • Memory Usage 2,216KB
  • 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
  • (5)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (7)postbit
  • (7)postbit_onlinestatus
  • (7)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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete