Thread: Miscellaneous Hacks - Postbit Legacy - Usergroup Backgrounds
View Single Post
  #82  
Old 05-23-2009, 03:01 PM
Fastbird's Avatar
Fastbird Fastbird is offline
 
Join Date: Aug 2005
Posts: 135
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here's my complete header, you will have to find a similar javascript, but you can see how I have set it up. You will need to upload separate javascript files that the code can look to. The banner is setup specifically to make this work. There is a main background image that is just the gradient, no logos or anything. Then we have the left logo, which is clickable and links to the forum home. Then, the javascript rotates the right image based on which image files are in the specific folder. It has to be setup this way because our forum resizes to 95% of the screen on any resolution, if you use one big image, it will stretch past the forum table. Take a look:

Code:
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="144" style="padding-top:0px" background="http://www.ltxtech.com/forums/mid.jpg"><a href="http://ltxtech.com/forums"><img src="http://www.ltxtech.com/leftblog.jpg" width="475" height="145" border="0" /></a></td>
<td align="right" style="padding-top:0px" background="http://www.ltxtech.com/forums/mid.jpg"><a href="http://ltxtech.com/forums/forumdisplay.php?f=86"> <script language="JavaScript">
<!--
function random_imglink(){
var myimages=new Array()
//specify random images below. You can have as many as you wish
myimages[1]="http://ltxtech.com/forums/right.jpg"
myimages[2]="http://ltxtech.com/forums/rightdecember.jpg"
myimages[3]="http://ltxtech.com/forums/springsoul.jpg"
myimages[4]="http://ltxtech.com/forums/ryder2.jpg"
myimages[5]="http://ltxtech.com/forums/larry4.jpg"
myimages[6]="http://ltxtech.com/forums/blownd.jpg"
myimages[7]="http://ltxtech.com/forums/larry4.jpg"
myimages[8]="http://ltxtech.com/forums/pipes.jpg"
myimages[9]="http://ltxtech.com/forums/tbird3.jpg"
myimages[10]="http://ltxtech.com/forums/tbird3.jpg"
myimages[11]="http://ltxtech.com/forums/tbird3.jpg"
myimages[12]="http://ltxtech.com/forums/larry4.jpg"

var ry=Math.floor(Math.random()*myimages.length)
if (ry==0)
ry=1
document.write('<img src="'+myimages[ry]+'" border=0>')
}
random_imglink()
//-->
</script>
</td>
</tr>
</table>
<a name="top"></a>
<table border="0" width="$stylevar[outertablewidth]" cellpadding="0" 

cellspacing="0" align="center">
<if condition="$ad_location['ad_header_logo']">$ad_location
</if>
</table>


<!-- content table -->
$spacer_open

$_phpinclude_output

$ad_location[ad_header_end]
<!-- USC header edit start -->
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
$usc_left
<td valign="top">
<!-- USC header edit end -->
<div align="center">$vbam_location[ltx]</div>
By throwing the current winner in the rotation list 3 times, we increase the chance that his car will be seen more frequently throughout the month. If you need any help setting it up or finding the correct javascript, feel free to send me a PM. I'd be glad to help as best I can. Also note that I have an advertisement mod loaded on my forum and there are a few parameters that show up in the head code. Don't worry about that!
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02040 seconds
  • Memory Usage 1,772KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • 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
  • showpost_complete