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)
-   -   Isolating the Alternating colors (https://vborg.vbsupport.ru/showthread.php?t=117105)

lightnb 05-30-2006 05:31 AM

Isolating the Alternating colors
 
Is it possible to issolate the alternate color one and two, on a per page basis?

If I make them look good on forum, home, then the posts look ugly (and are sometimes unreadable), and vise versa.

Unless there's a trick here I'm missing?

smacklan 05-30-2006 11:16 AM

I would say it's possible, you would have to edit several templates and use the extra css settings to define what you want to appear in each of those table cells.

Sean S 05-30-2006 01:32 PM

Yes the only way to do this is what smacklan mentioned, you have to edit the templates. However, if you don't want the alternating row colors at all, just set the background colors of both to the same color and then you will have to edit less templates.

lightnb 05-30-2006 04:38 PM

I'd like to use graphics on them, so on the forum home, they could be gradients, but in the actuall post, it's a solid color to make the text more readable.

Sean S 05-31-2006 09:56 PM

yes in that case you will have to eidt the templates, templates that you want to look into are the forumhome, and postbit or postbit_legacy depending on the postbit style you have set for your forums.

Adrian Schneider 06-01-2006 02:26 AM

Just redefine them conditionally in the headinclude template...
Code:

<if condition="THIS_SCRIPT == 'someScript'">
<style type="text/css">
<!--
.alt1 {
    background: #000 url('someGradient.gif');
}
.alt2 {
    background: #000 url('someOtherGradient.gif');
}
-->
</style>
</if>


lightnb 06-01-2006 03:01 AM

Quote:

Originally Posted by SirAdrian
Just redefine them conditionally in the headinclude template...
Code:

<if condition="THIS_SCRIPT == 'someScript'">
<style type="text/css">
<!--
.alt1 {
    background: #000 url('someGradient.gif');
}
.alt2 {
    background: #000 url('someOtherGradient.gif');
}
-->
</style>
</if>


Thanks. :) Could you give an example of what 'somescript' might be? are those templates or PHP files?

Adrian Schneider 06-01-2006 03:13 AM

PHP files. You can check what THIS_SCRIPT is set to at the top of each PHP file. Note that it is a constant, not a variable.

You could also do the opposite (well, same thing really): set just "showthread" to a plain color, and in the adminCP, set the alt1/alt2 to gradients. There are only a few other places where actual posts are shown...

lightnb 06-02-2006 07:01 AM

Could I just add a CSS definition for .forum_home_alt1 in the Admin CP, and then change the class in the Forum_Home template?

Sean S 06-02-2006 04:07 PM

yes you can.


All times are GMT. The time now is 10:57 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.01039 seconds
  • Memory Usage 1,727KB
  • 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_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete