Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #11  
Old 02-19-2011, 11:22 PM
Milargo's Avatar
Milargo Milargo is offline
 
Join Date: Feb 2011
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How I found the piece of code that I pasted in the forumbit_level2_post, I stumbled upon this thread. However I have no idea how to use it. I did the basics, replaced the coding as instructed then edited this bit of the code:
HTML Code:
images/forumbackgrounds/{vb:raw forum.forumid}.gif
So it pointed(?) to my image for forum 1:
HTML Code:
images/forumbackgrounds/25.gif
Quote:
Very odd. Both of them are calling 25.gif and yet they are forumid 2 and 3. But, you don't have a 2.gif or 3.gif, so nothing is going to show for either of them. Why do you have an image for 25.gif if you have no forumid 25?
Okay, I just copy and pasted the code, so I have two sitting beside one another. Pointing to two different images, labeled 2 and 3 (Like the forum IDs):
HTML Code:
<div style="border-right: 1px solid rgb(204, 204, 204); height: 70px; background: url(&quot;images/forumbackgrounds/2.gif&quot;) no-repeat scroll right bottom rgb(255, 255, 255);" class="foruminfo td">
And:
HTML Code:
<div style="border-right: 1px solid rgb(204, 204, 204); height: 70px; background: url(&quot;images/forumbackgrounds/3.gif&quot;) no-repeat scroll right bottom rgb(255, 255, 255);" class="foruminfo td">
But that didn't work, now I have two images squeezed together in each forum.

Sorry if I'm missing something really basic here, I have absolutely no experience when it comes to things like coding. Everyone has to start somewhere I suppose.
Reply With Quote
  #12  
Old 02-20-2011, 03:08 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You should have this in the code:
images/forumbackgrounds/{vb:raw forum.forumid}.gif

Not this:
images/forumbackgrounds/25.gif
or this:
images/forumbackgrounds/2.gif
or this:
images/forumbackgrounds/3.gif

The forumid needs to be a variable that changes for each forumid.
Reply With Quote
  #13  
Old 02-20-2011, 03:26 AM
Milargo's Avatar
Milargo Milargo is offline
 
Join Date: Feb 2011
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I can't thank you enough,

Now I understand. I had no idea that having "{vb:raw forum.forumid}" instead of the actual image name could work. Let alone make it read the image file names and decide which one to use based on the matching forum ID, tricky concept.

I've learned a lot, plus my forum's looking snazzier than ever.

Thanks again!
Reply With Quote
  #14  
Old 02-20-2011, 04:02 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You've done a very nice job with the look of your forums on your site!
Reply With Quote
  #15  
Old 02-21-2011, 05:17 AM
Milargo's Avatar
Milargo Milargo is offline
 
Join Date: Feb 2011
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lynne View Post
You've done a very nice job with the look of your forums on your site!
Thanks! I'm glad to see I'm heading in the right direction.

Though I do have another question.

I would like each of my forums to have a customized header image. I did some searching and most of the results I found were for previous versions of vBulletin, or the solutions were ineffective, e.g. creating multiple styles. All of which poses a problem for me (vB 4 user, and the lighter the better), this solution seemed to make the most sense. Even though it was posted back in '06.

It wasn't really clear (not enough for a green-sleeve anyway) exactly where I needed to put the code, what to replace etc.

I thought I'd give it a try anyhow, I navigated over to "Style Manager", and in the drop-down box of my installed template, and under template options clicked "Edit Template" and in the left hand box I scrolled down until I found "header", after selecting I clicked edit

Inside, I replaced:
HTML Code:
<img src="{vb:stylevar titleimage}" alt="{vb:rawphrase x_powered_by_vbulletin, {vb:raw vboptions.bbtitle}}" />
With:
HTML Code:
<img src="./images/logo/logo-$foruminfo[forumid].jpg" />
Then, in the images directory via FTP I created a new folder labeled "logo", and uploaded my header image with the forum ID "logo 2.jpg" I also tried "logo2.jpg, logo-2.jpg and 2.jpg" none of this worked, instead my header disappeared completely.

Any help on this would be greatly appreciated.
Reply With Quote
  #16  
Old 02-21-2011, 03:23 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I don't think $foruminfo[forumid] is a valid variable in the header template - nor do you have the format correct. Try something like this:
HTML Code:
<img src="./images/logo/logo-{vb:raw GLOBALS.foruminfo.forumid}.jpg" alt="" />
Reply With Quote
  #17  
Old 02-22-2011, 02:23 AM
Milargo's Avatar
Milargo Milargo is offline
 
Join Date: Feb 2011
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Wunderbar! That works perfectly, now I can have relevant headers for my forum. The only problem is, all pages (except my forum categories) have no header.

I replaced:
HTML Code:
"<img src="{vb:stylevar titleimage}" alt="{vb:rawphrase x_powered_by_vbulletin, {vb:raw vboptions.bbtitle}}" />
With:
HTML Code:
<img src="./images/logo/logo-{vb:raw GLOBALS.foruminfo.forumid}.jpg" alt="" />
Reply With Quote
  #18  
Old 02-22-2011, 03:11 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You can try just GLOBALS.forumid . Or, threads may need GLOBALS.threadinfo.forumid
Reply With Quote
  #19  
Old 02-23-2011, 10:07 AM
Milargo's Avatar
Milargo Milargo is offline
 
Join Date: Feb 2011
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No dice, still displays two headers. Though, I think I actually prefer it this way.

Found a way to incorporate it into the design. (Apologies for the late response)

How can I add a background image to my footer, similar to the footer used in The Admin Zone?
[link].
Reply With Quote
  #20  
Old 02-23-2011, 04:43 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You have the bottom part of your site using class "below_body" . So, just write some CSS to add a background to that class:
Code:
.below_body {background: whatever;}
http://www.w3schools.com/css/css_background.asp
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 02:29 AM.


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.04379 seconds
  • Memory Usage 2,269KB
  • 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
  • (9)bbcode_html
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete