Notifications
Clear all

[Sticky] {Solved} Re: [INFO] Rotating Banner Image

4 Posts
2 Users
0 Reactions
5,002 Views
(@marauder-by-night)
Posts: 33
Eminent Member
Topic starter
 

Oh, I've been looking for something like this... but my header.tpl and varible.php don't look.... well I'll show you.
variable.php:

<?php
$blocks["categories"]["status"] = 2;
$blocks["featured"]["status"] =  '0';
$blocks["info"]["status"] = 2;
$blocks["menu"]["status"] = '1';
$blocks["menu"]["content"] = array (
  0 => 'home',
  1 => 'recent',
  2 => 'authors',
  3 => 'catslink',
  4 => 'titles',
  5 => 'series',
  6 => 'search',
  7 => 'tens',
  8 => 'challenges',
  9 => 'help',
  10 => 'contactus',
  11 => 'login',
  12 => 'logout',
  13 => 'adminarea');
$blocks["menu"]["style"] = 1;
$blocks["login"]["status"] = 1;
$blocks['login']['acctlink'] = 2;
unset($blocks["login"]["template"]);
$blocks["login"]["form"] = 1; // Long form with register and lost password options
$blocks["random"]["status"] = 2;
$blocks["recent"]["status"] = 2;
$blocks['recent']['tpl'] = 0;
$blocks["skinchange"]["status"] = '1';
$blocks["news"]["status"] = 2;
$displayprofile = 1;
?>

I placed $headerpics = array("image1.jpg", "image2.jpg", "image3.jpg", "image4.jpg", "image5.jpg", "image6.jpg"); & $tpl->assignGlobal("headerpic", "$skindir/images/".$headerpics[rand(0, count($headerpics) - 1)]); in variables and of course changed the images to the banners real names.  Then I went on to the header.

As for my header:

<!-- START BLOCK : header -->
<body>
<div id="container">
<div id="menu">
<ul id="menulist">
<li>{home}</li>
<li>{tos}</li>
<li>{rules}</li>   
<li>{help}</li>
<li>{contactus}</li>
<li>{adminarea}</li> 
</ul>
</div>
<div id="banner">
<div id="secondmenu">
<div id="submenu">
<ul id="submenulist">
<li>Browse By:</li>
<li>{recent}</li>
<li>{authors}</li>
<li>{catslink}</li>
<li>{titles}</li>
<li>{series}</li>
<li>{challenges}</li>
<li>{tens}</li> 
<li>{search}</li>
</ul>
</div>
</div>
</div>
<div id="menu">
<ul id="menulist">
{login_content}
</ul>
</div>
<div id="mainpage">
<!-- END BLOCK : header -->

I didn't know where to put the code in this one as I change my banner in the stly.css.  Can this still work for my site?


 
Posted : 09/05/2007 10:50 pm
(@tammy)
Posts: 2577
Member Moderator
 

I split your message off the original post.  It's hard for people to follow the original instructions when others insert questions.  Please start your own thread when you've got questions.

I assume you're putting your banner image in your "banner" div? that's exactly what was shown in the tutorial.

<div id="banner" style='background: url({headerpic}) bottom left no-repeat;'>


 
Posted : 11/05/2007 1:02 pm
(@marauder-by-night)
Posts: 33
Eminent Member
Topic starter
 

I'm sorry... I didn't know and will be more contious of that next time but thank you for replying.  I went back and looked at the tutorial rereading it carefully and succefullly got my pictures to rotate but there is now a > in the background and I get this note: Notice: Undefined variable: draco in /home/snotori1/public_html/work/skins/Draco/variables.php on line 3.

Line 3:

$tpl->assignGlobal("headerpic", "$draco/images/".$headerpics[rand(0, count($headerpics) - 1)]);

I tried to take out the > but of course it just took away all the pictures so I put it back but don't know what is undefined.


 
Posted : 13/05/2007 10:50 pm
(@tammy)
Posts: 2577
Member Moderator
 

It shouldn't be $draco.  It should be $skindir just as the tutorial stated.


 
Posted : 14/05/2007 12:34 am
Share: