The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
How do I 'make' a plug in ?
Sorry I did not grasp how vbulletin works yet. On the top of my forum ( next to the logo ) at http://my.lifeinitaly.com I want to add a piece of php code that selects 4 / 5 random images. I hove the code and it works : you can see the images here http://my.lifeinitaly.com/images.php ( the code is below ) - I need then to add something to the header template but what and how ? I could not find any instruction on how to built a plugin <?php $host = 'localhost'; $dbUser = ''; $dbPass = ''; $db = 'photopost'; mysql_connect("$host", "$dbUser", "$dbPass") or die(mysql_error()); mysql_select_db("$db") or die(mysql_error()); $result = mysql_query("SELECT id,cat,bigimage,width,height FROM pp_photos WHERE storecat = '0' and width > height ORDER BY rand() LIMIT 6" ) or die(mysql_error()); $imgs1=''; while($row = mysql_fetch_array( $result )) { $imgs1 = $imgs1 . "<a href=\"/photopost/showphoto.php?photo=" . $row['id'] . "\"><img width=105 height=75 src=\"/photopost/data/" . $row['cat'] . "/thumbs/" . $row['bigimage'] . "\" border=\"0\"></a>"; } print $imgs1; ?> |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|