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 04-30-2008, 02:49 AM
legionofangels's Avatar
legionofangels legionofangels is offline
 
Join Date: Mar 2007
Posts: 485
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Can this be done, or do I need a mod?

Hello,

Planning a new site, if I can acquire some information here first.

Is it possible to make each forum under a category on the main index page, have a different bg, as shown in the graphic:

Rough sketch here of course:

http://img.photobucket.com/albums/v3...666/tester.jpg

Again, very rough, and just meant to show the difference of colors. Can that be done perhaps in the templates, or with an array? Plus, can it be done with images and not just HTML colors?
Reply With Quote
  #2  
Old 04-30-2008, 04:06 PM
davide101 davide101 is offline
 
Join Date: Dec 2005
Posts: 100
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You could use conditionals in the templates based upon the category to insert a background image or color. But this would be a pain if you are always adding or removing forums. Personally, I wouldn't recommend it unless your site is going to be fairly static.
Reply With Quote
  #3  
Old 04-30-2008, 05:24 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Someone was posting about something else and we talked about a plugin that would check:

Code:
 $background = "backgroud".$forumid.jpg;
if (!$background)
  $background = default.jpg;
So basically, you add to your images/whatever/folder/ a bunch of backgrounds with the forumid at the end - ie. background23.jpg for forumid 23, backround14.jpg for forumid 14, etc. If there is no background14 for forumid, then it uses default.jpg instead.

Then in the template, for the row, just add "style="background: url(/images/whatever/folder/$background);" to the row.

(That is probably totally messed up. I can't code just by writing, I am a trial and error person, but perhaps you understand what I'm saying.)
Reply With Quote
  #4  
Old 04-30-2008, 06:18 PM
legionofangels's Avatar
legionofangels legionofangels is offline
 
Join Date: Mar 2007
Posts: 485
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

First of all, no...forums would never change, aside from more being added is all.

Two, Lynne that was exactly what I was thinking. I remember Jake gave me the information for the images in front of our forum categories, with an array based upon forum ID. So I was thinking why can't I do an array with the forum id's and use backgrounds as well.

Reference:

http://www.vbulletin.com/forum/showthread.php?t=114545
Reply With Quote
  #5  
Old 04-30-2008, 07:29 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Using that thread as an example, this is from the template "forumhome_forumbit_level1_nopost" (around the sixth line):
HTML Code:
        <td class="tcat" colspan="<if condition="$vboptions[showmoderatorcolumn]">6<else />5</if>">
            <if condition="$childforumbits">
            <a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumbit_$forumid')"><img id="collapseimg_forumbit_$forumid" src="$stylevar[imgdir_button]/collapse_tcat{$collapseimg_forumid}.gif" alt="" border="0" /></a>
            </if>
            <a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]">$forum[title]</a>
I *think* you could add a style to the td tag like this:

HTML Code:
<if condition="in_array($forum['forumid'], array(X,Y,Z))">
        <td class="tcat" colspan="<if condition="$vboptions[showmoderatorcolumn]">6<else />5</if>" style="background: url(/images/folder/background$forum[forumid].gif) 
repeat-x;">
<else />
        <td class="tcat" colspan="<if condition="$vboptions[showmoderatorcolumn]">6<else />5</if>">
</if>
If that doesn't work, then I would add at the top of the template:
HTML Code:
<style type="text/css">
 td.cat$forum[forumid] {background: url(/images/folder/background$forum[forumid].gif repeat-x;}
</style>
And then for the td tag (along with the conditional from above):
HTML Code:
        <td class="tcat cat$forum[forumid]" colspan="<if condition="$vboptions[showmoderatorcolumn]">6<else />5</if>" >
And, again I'll say you may have to play with it as I'm a trial and error coder.
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 06:36 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.03602 seconds
  • Memory Usage 2,205KB
  • 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
  • (1)bbcode_code
  • (4)bbcode_html
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (5)postbit
  • (5)postbit_onlinestatus
  • (5)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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete