PDA

View Full Version : phpinclude_start is not used? (rotate banner don't work)


pdatotaal
09-24-2004, 02:21 PM
I did find a nice rotate banner hack (http://www.vbulletin.org/forum/showpost.php?p=537016&postcount=6) in forum home works great but not on the portal (not showing)

In phpinclude_start I put something like this:
switch(intval(time() / 2) % 3)
{
case 0:
$banner = 'img1.jpg';
$banner_url = 'www.mysite.com';
break;
case 1:
$banner = 'img2.jpg';
$banner_url = 'www.mysite2.com';
break;
case 2:
$banner = 'img3.jpg';
$banner_url = 'www.mysite3.com';
break;
}

And then as last line in navbar template this:
<div align="center"> <a href="$banner_url" TARGET="_blank" ><img src="$banner" border="0" /></a>
</div>


Is shows on Forum Home but not on the Portal. So what can it be? Does vBadvanced CMPS not using the phpinclude_start? Or something else?

Brian
09-25-2004, 01:38 PM
<a href="$banner_url"><img src="$banner" border="0" /></a>

In that code, add the full url to the folder where your banners are stored before $banner.

Our Sponsors
 

pdatotaal
09-25-2004, 07:09 PM
I have Brian:

$banner = 'http://www.mysite.com/images/alturion.jpg';
$banner_url = 'http://www.alturion.com/';

But in the portal I get broken link.. I forum home it works..

Or you mean something else??

DoKOK
09-25-2004, 11:44 PM
For pdatotaal:

I had the same problem but I switched the banner to show in the header template and it worked fine there.

-------------------------------

For everyone:

I'm using the same thing and I have a problem.

Maybe you guys have a solution for me too.

I want to use a flash banner but I'm not sure how I can do that with this because it doesn't work.

Our Sponsors
 

pdatotaal
09-26-2004, 10:36 AM
I can't use it in the Header, have something else there. Need it between the Navbar and the rest.. So that the problem..

Brian
09-26-2004, 01:11 PM
forum/includes/vba_cmps_include_bottom.php - Look for:

global $vboptions, $vba_options, $vbphrase, $stylevar, $bbuserinfo, $show, $pmbox;


Replace that with:

global $vboptions, $vba_options, $vbphrase, $stylevar, $bbuserinfo, $show, $pmbox, $banner, $banner_url;

And that should fix the problem.

pdatotaal
09-26-2004, 05:33 PM
Thanks Brian, that does the trick! Thanks again for the great support.. I know how it works for the next time;)

DoKOK
09-30-2004, 12:57 PM
Anyone know how I can add FLASH banners?

I mean make of the 3 banners accept flash?