
Announcement
Collapse
No announcement yet.
Random Logo
Collapse
X
-
Step 1.
Create a directory with the logo's and name them
1.gif, 2.gif, 3.gif, etc.
Step 2.
Create a file called logo.php with this content.
PHP Code:<?php
Header("Content-type: image/gif");
Header("Cache-Control: no-cache, must-revalidate");
srand((double)microtime()*1000000);
$nr = rand(1, 8);
$fn = fopen("$nr.gif","r");
fpassthru($fn);
?>
Step 3.
Modify the header template and replace the img code source with :
<img src="logo.php" border="0" />
That should work, check out:
http://www.vBulletin.nl/files/sig for a demo
-
Originally posted by RichTJ99what should the directory be called?
TIA
You can put everything in images/random/ and the index.php too. (not the index one from vb)
Then in your header template <img src="images/random/index.php" />
Comment
-
Thanks Floris, it works great.
Just wondering, is there a way to have a different header show up on certain forums without doing the "parent/child" thing? We have a few forums that we would like a different logo/header displayed but at the same time we have multiple styles so the whole "parent/child" thing doesn't seem like it would work. Right now we have a different logo folder set up for each style.
TIA
Comment
-
Is there maybe a way to incorporate the code from this old thread into the php file above?
Thanks for your time
Comment
-
You can use conditionals in the template to use different code for different forums.
<if condition="$forumid == '5'"><img src="logo1.php" border="0" /><else /><img src="logo2.php" border="0" /></if>
This way it shows a default logo for all - random one - and only a differnet one for forumid 5.
Comment
-
ok, what am I doing wrong?
Code:<td width="469" height="137" align="left" valign="top"><if condition="$forumid == '39'><img src="tren_z/logo/6rr.jpg" width="469" height="137" alt="" /><else /><img src="tren_z/logo/logo.php" width="469" height="137" alt="" /></if></td>
Comment

Comment