The Arcive of vBulletin Modifications Site. |
|
Details »»
|
|||||||||||||||||||||||||
Hey everyone,
Ive been wanting this and noone ever created it so I thru one together. You can see it in action here: http://www.extremeforums.com/include/forumlist.inc.php Here is the code: [code] <?php require("/full/path/to/admin/config.php"); $db=mysql_connect($servername,$dbusername,$dbpassw ord); mysql_select_db($dbname); $query = "SELECT * FROM forum ORDER BY title ASC"; $resultlatest = mysql_query($query,$db); while ($latest_array = mysql_fetch_array($resultlatest)) { echo "<FONT SIZE=\"1\" FACE=\"Verdana, Arial, Helvetica, sans-serif\"> ° <A HREF=\"http://www.extremeforums.com/forums/forumdisplay.php?forumid=$latest_array[forumid]\">$latest_array[title]</A></FONT><BR>"; } ?> [code] You will need to edit the echo statement to reflect your site. Hope someone will use this ~Chris [Edited by TechTalk on 08-10-2000 at 05:34 PM] Show Your Support
|
|||||||||||||||||||||||||
| Comments |
|
#2
|
|||
|
|||
|
Or if you only wanted to display your more popular forums you could change the $query line to something like this:
Code:
$query = "SELECT * FROM forum WHERE threadcount > 50 ORDER BY title ASC"; ~Chris |
|
#3
|
|||
|
|||
|
Since it looks as though some people are checking this one out ill add this. If you dont want to display a private forum in the list then try something like this:
Code:
$query = "SELECT * FROM forum WHERE threadcount > 50 AND forumid != 34 ORDER BY title ASC"; ~Chris |
|
#4
|
|||
|
|||
|
What code does one use to include this inside a vBulletin template. Such as a footer or header file?
How do you use this inside in vBulletin page? |
|
#5
|
|||
|
|||
|
i'll ask again.. what about php include code to a non vbulletin page ?
|
|
#6
|
|||
|
|||
|
Quote:
|
|
#7
|
|||
|
|||
|
okay i think most people have their config.php file in their admin directory and not vb forum directory so "admin/config.php" instead of "config.php" in both threads right
![]() i did it at http://animeboards.net/forums/forumlist.inc.php so how does one include it into a non vbulletin page... i.e. front page at http://animeboards.net ? also is there any way to order them other than alphabetically ? |
|
#8
|
|||
|
|||
|
Just use an include statement on the page at the location that you want to display it.
As long as the page has one of the following extensions which must be recognized by your server: .phtml .php .php3 |
|
#9
|
|||
|
|||
|
eva you could do:
Code:
order by categoryid, displayorder |
|
#10
|
|||
|
|||
|
Does anyone know how to display these code hacks inside a vB template such as a header or footer file? I do not think you can include actual php code inside the templates. The code does not get parsed. What is the mechanism and/or code and how can this be setup?
I am referring to: show forumlist show categorylist etc...... |
![]() |
|
|