vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   How do I alternate quote box color? (https://vborg.vbsupport.ru/showthread.php?t=80439)

HeloHi 04-23-2005 05:21 PM

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?

Telkman 04-23-2005 07:45 PM

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

HeloHi 04-23-2005 08:01 PM

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!

Telkman 04-23-2005 08:04 PM

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.

HeloHi 04-23-2005 08:19 PM

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.

Telkman 04-23-2005 08:26 PM

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

Sorry, I'm not particularly awake!

HeloHi 04-23-2005 08:30 PM

I LOVE YOU :p

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


All times are GMT. The time now is 07:14 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.00962 seconds
  • Memory Usage 1,729KB
  • 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
  • (5)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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