The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Custom PHP Sidebar/Block Issues
I created a custom php block that pulls a random image from a directory on my server.
However, I'm having 2 issues. 1. Its pulling 2 images instead of just one. 2. Its placing the images above the header and not in a sidebar/block. |
#2
|
|||
|
|||
Your widget code needs to set $output to the html for your widget instead of using ?> and <?php or echo. Try this:
Code:
$dir = "user-uploads-thumbnails/"; $images = scandir($dir); $i = rand(1, sizeof($images)-5); $output = '<a> <a href="user-uploads/' . $images[$i] . '"> <img src="user-uploads-thumbnails/' . $images[$i] . '" alt="" /> <a/>'; |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|