View Full Version : Random Banner Plugin Hook Location
zooki
10-29-2006, 06:53 AM
Hello, im trying to implement a rotating banner on my Website, i want to display it on VBa CMPS as well as in my Forums, the ads will be located at the bottom of my nav bar.
I can get it to work, but i have trouble finding the correct hook location for it to work on both the cmps front and in the forums.
It doesnt Work in the Navbar, but it works if i place the code in the Header, then the hook works on CMPS and On Forum.
Please help!
Brian
10-30-2006, 11:46 AM
Can you post the code that you're trying to add to your navbar template?
zooki
10-30-2006, 06:57 PM
sure thing.....
I have following as a plugin, its pretty long so i condensed it. Basically it has 5 different kinds of Ads and banners which rotate:
$random_number = rand(1, 5);
$random_banner[1] = '<center><b><script> GOOGLE PRODUCT </script></center>';
...
$random_banner[5] = 'More of the same';
--------------------------------------
Then in the Navbar, at the bottom i add following code:
$random_banner[$random_number]
- This works in the Forums..... I dont know how to get it to work on the CMPS page. It works on CMPS page if i add it to the bottom of the Header. But, it doesnt look at all good if i do that, it looks better if i can get it to work at end of the navbar template.
Thanks so much for your help Brian.
Brian
10-31-2006, 11:52 AM
Admin CP => vBa CMPS => Default Settings => Portal Output Global Variables
Try adding this to that setting:
random_banner
random_number
zooki
11-10-2006, 06:22 PM
Admin CP => vBa CMPS => Default Settings => Portal Output Global Variables
Try adding this to that setting:
random_banner
random_number
Thanks so much Brian!! that did the trick ;)
P.s sorry for late reply.
confus
03-10-2007, 05:12 AM
glad this thread exists, spent time trying to find the problem, worked in header but not navbar, almost made this same thread
thanks
csoft32
03-14-2007, 06:01 AM
<script language="javascript">
hinh=new Array
hinh=["banner.jpg","banner1.jpg","banner2.jpg","bann er3. jpg","banner4.jpg"];
i=0
function chuyenhinh()
{
h.filters.blendTrans.apply();
document.h.src="banner/"+hinh[i]
h.filters.blendTrans.play();
i++;
if (i>4)
i=0;
setTimeout("chuyenhinh()", 5*1000);
}
</script>
Notes :
<body onload=chuyenhinh()>
*: banner.jpg","banner1.jpg","banner2.jpg","banner3.j pg","banner4.jpg
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.