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

Reply
 
Thread Tools Display Modes
  #1  
Old 03-31-2007, 06:10 PM
globalstrata globalstrata is offline
 
Join Date: Mar 2004
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Changing background for each header box

Hello,

I am trying to change the background for each header box (each box, may have a different background). I have tried to use an IF statement to read the title of the box and based on that set the background="whatever.gif" inside of a <td> tag. However, for some reason the image is not displaying. Can anyone offer some advice?

Thanks

Gladys
Reply With Quote
  #2  
Old 04-01-2007, 08:03 AM
CyberAlien's Avatar
CyberAlien CyberAlien is offline
 
Join Date: Mar 2002
Posts: 438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

<td style="background-image: url(images/whatever.gif);">
Reply With Quote
  #3  
Old 04-08-2007, 08:00 PM
globalstrata globalstrata is offline
 
Join Date: Mar 2004
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes, but since vBulletin is using a template to display these, I need to find a way to test for the header title and depending on what I find in that header, I can define the background style. For Example

<if TITLE == "Search">
<td style="MyStyle>
</if>

Unfortunately, I do not know the right code to do this test.

thanks,

Gladys
Reply With Quote
  #4  
Old 04-09-2007, 05:04 AM
CyberAlien's Avatar
CyberAlien CyberAlien is offline
 
Join Date: Mar 2002
Posts: 438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you are trying to set different background depending on what forum is shown check $vbulletin->GPC['forumid'] like this:
Code:
<if condition="!$vbulletin->GPC['forumid']">
   default background
<else /><if condition="$vbulletin->GPC['forumid'] == 1">
   background for forum 1
<else /><if condition="$vbulletin->GPC['forumid'] == 2">
  background for forum 2
</if></if></if>
Reply With Quote
  #5  
Old 04-17-2007, 12:58 PM
globalstrata globalstrata is offline
 
Join Date: Mar 2004
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmm.. the <if condition="$vbulletin->GPC['forumid'] == 2"> seems not to be working in my forum. It seems that the If condition is never true so it always does the else.

Also what I originally want to do is change the header color for the Welcome, Search, Control CP, Quick Reply, etc... boxes. Some of these boxes have their own template, so it would be easy to change. See attachment for more clarification.



Sorry I could not explain it better and Thanks for your help!

Gladys
Reply With Quote
  #6  
Old 04-19-2007, 06:59 AM
TheMilkCarton TheMilkCarton is offline
 
Join Date: Jan 2007
Posts: 294
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Those two boxes are completely different tables in the search template, and you have no need for if conditionals.

You simply need to create another "tcat" class, call it "tcat2" and change the background image. Then you just need to change the style for that td to tcat2, etc.

Like so:

Code:
    <td class="tcat2">
            $vbphrase[errors_occured_with_search]:
    </td>
Code:
<td class="tcat3">
        <if condition="$show['searchthread']">$vbphrase[search_thread] - <a href="showthread.php?$session[sessionurl]t=$threadinfo[threadid]">$threadinfo[title]</a><else />$vbphrase[search_forums]</if>
    </td>
the entire tcat CSS looks like this:
HTML Code:
.tcat
{
    background: #162756 url(../../images/gradients/gradient_tcat3.gif) repeat-x top left;
    color: #FFFFFF;
    font: bold 10pt verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif;
    padding:6px;
}
.tcat a:link, .tcat_alink
{
    color: #ffffff;
    text-decoration: none;
}
.tcat a:visited, .tcat_avisited
{
    color: #ffffff;
    text-decoration: none;
}
.tcat a:hover, .tcat a:active, .tcat_ahover
{
    color: #FFFF00;
    text-decoration: underline;
}
So just make a duplicate of that, change all the "tcat" to tcat2, tcat3, whatever, and then change the colors, fonts, and images to your liking. This will of course go inside the Additional CSS Definitions in your style manager.
Reply With Quote
  #7  
Old 04-21-2007, 04:06 PM
globalstrata globalstrata is offline
 
Join Date: Mar 2004
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok. For some reason I am not explaining myself correctly. I am using CMPS. I want to change the header for each of the boxes that I show. So this is what CMPS shows

Code:
LEFT COLUMN      MIDDLE COLUMN        RIGHT COLUMN
BOX 1            BOX 2                BOX 3
BOX 4            BOX 5                                          
BOX 6
BOX 7

For Box 1, I want the background header to be Red
For Box 2, I want the background header to be blue
For Box 3, I want the background header to be Green
For Box 4, I want the background header to be Orange
For Box 5, I want the background header to be Blue
For Box 6, I want the background header to be purple
For box 7, I want the background header to be black

Because the changes to some of these boxes are controlled by a single template, the only way I can see doing this is comparing the text that will be input for each header so I do something like:

If Box Title == Search
header -> Red
If Box Title == Login
header --> green
....

So ... What I need to know is what is the variable that I need to use in order to test for the Box Title so I can do the proper test to display the appropiate background.

Hope this explains it better,

Gladys
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 11:06 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.04817 seconds
  • Memory Usage 2,226KB
  • 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
  • (4)bbcode_code
  • (1)bbcode_html
  • (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