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)
-   -   rotating header help (https://vborg.vbsupport.ru/showthread.php?t=168023)

iulianh 01-17-2008 04:27 PM

rotating header help
 
Ok , i have tryed the tutorials i have found here on how to make my header rotate but they didn`t work . On my website i have an php script that rotates my headers, i have 6 .

The code is :

Code:

<?php
$total = "6";
$file_type = ".jpg";
$image_folder = "images/headers";
$start = "1";
$random = mt_rand($start, $total);
$image_name = $random . $file_type;
echo "<td background=\"$image_folder/$image_name\" /></td>";
?>

and my header code is :

Code:

<TABLE bgcolor="#eeeeee" width="702" height="228" align="center" cellpadding="0" cellspacing="0" style="border-left: 3px #707070 solid; border-right: 3px #707070 solid;">
  <TR>
        <?php include('random-header.php'); ?>
  </TR>
  </TABLE>

How can i add my script to the forums ? Need some quick help please . Go to www.tiestofans.com to see what i am talking about .

Thanks in advance ,
Iulian

SEOvB 01-17-2008 07:09 PM

You can't put php in the templates, You'll need to add your code to a plugin, and then call it from there.

Here is a easy way to do it, http://www.vbulletin.com/forum/showthread.php?t=170826

iulianh 01-17-2008 08:10 PM

uhm, yeah i have tryed that but still not showing the images :(

Xipher 01-18-2008 09:20 AM

Try using an iframe that calls for the php file. I did that for my banner rotator on my site, and it works fine. You can use php in vb, just have to be tricky about how you do it =)


All times are GMT. The time now is 07:11 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.01060 seconds
  • Memory Usage 1,712KB
  • 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)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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