The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
css code to show random pictures
I have the RedTyger mod set up and its working, I am placing ads down the right side of my forum
My forum is www.runnersrule.com my goal is to get it to look like www.teamspeed.com or www.l4p.com Im torn on the size of my header, its huge, but so are those other sites headers and they seem to do pretty well, i know other factors are involved. anyway, im pulling my hair out with trying to do something pretty basic. when i have 10-15 ads, i a column, down the right side of my site, is there some code i can use to get them to appear randomly so the same ads arent always on the top?? they are just simiple jpg with links, any help would be greatly appreciated. thank you. |
#2
|
|||
|
|||
You can best ask this in the thread of the modification you are using.
|
#3
|
|||
|
|||
its just the standard to code to jpg's to appear randomly, i have them all there i cant get them to appear randomly on page refresh, i know its really basic, but i can figure it out.
having a tough time with this one |
#4
|
|||
|
|||
1) Create a PHP file called "sponsors.php" with the following code and upload it to domain.com/forums. You can add as many links/images to the array as you want, just keep the same format:
Code:
<?php define('LINK_URL', 0); define('IMAGE_URL', 1); $images = array( array(LINK_URL => 'http://www.example.com', IMAGE_URL => 'http://domain.com/forums/images/ads/example_small.jpg'), array(LINK_URL => 'http://www.example2.com', IMAGE_URL => 'http://domain.com/forums/images/ads/example_small2.jpg'), array(LINK_URL => 'http://www.example3.com', IMAGE_URL => 'http://domain.com/forums/images/ads/example_small3.jpg'), ); shuffle($images); foreach($images as $image) { echo '<a href="' . $image[LINK_URL] . '"><img src="' . $image[IMAGE_URL] . '" border="0" /></a><p>'; } ?> Admin CP > Plugins and Products > Add New Plugin 2) Create a new plugin with this info: - Product: vBulletin - Hook Location: global_start - Title: Small Sponsor Images - Plugin PHP Code (edit the include path to yours and note this will not show the images on register.php): Code:
if (THIS_SCRIPT != 'register') { ob_start(); include('/home/username/domain.com/forums/sponsors.php'); $includedphp = ob_get_contents(); ob_end_clean(); } - Plugin is active: Yes 3) Edit your "footer" template and add "$includedphp" where you want the list of images to show up. |
#5
|
|||
|
|||
how do i use it for vb4.1.9
i need it for side blocks |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|