PDA

View Full Version : forumlist on non vb page


sabret00the
10-07-2003, 02:58 AM
is there an up to date hack for it

one that displays the forums bullet pointed with the forum description too?

sabret00the
10-07-2003, 08:32 AM
*bump hoping a euro hacker will help*

sabret00the
10-07-2003, 06:12 PM
*bumpety bump for the americas*

sabret00the
10-16-2003, 05:14 PM
managed to do this on my own :)

Sylvus
10-16-2003, 05:43 PM
Don't forget to post the code for the rest of us!

Syl...

sabret00the
10-16-2003, 05:55 PM
i should really get to release stuff like this and have an actual hack to my name lol


<?php
// credit to tudedogg, this was based off of his hack, well actually i just changed 1 or 2 things, cleaned the code and that's about it but meh, it didn't work before and i got it working (sabret00the)

$db=mysql_connect($host,$user,$password);
mysql_select_db($database);
$query = "SELECT * FROM forum WHERE threadcount > 0 AND forumid NOT IN (XX,XX,XX) AND parentid NOT IN (XX,XX,XX) ORDER BY parentid, displayorder, parentlist ASC";
$resultlatest = mysql_query($query,$db);
while ($latest_array = mysql_fetch_array($resultlatest)) {
echo "? <a href=\"http://www.yourdomain.com/forums/forumdisplay.php?forumid=$latest_array[forumid]\" class=\"css_class\">$latest_array[title]</a><br>$latest_array[description]<br /><br />";
}
?>


anyway make a php file with that in it, and make sure to include that file into your non-vB page
<?php include(where_ever/whatever.php); ?>

and then make sure you've defined this info at the top of your non-vB page
[php] $host = "localhost"; //DB-Servername
$user= "XXXXXXXXX"; //DB-Username
$password= "XXXXXXXXX"; //DB-Password
$database="XXXXXXXXX"; //vbulletin database name
if you've got more php integration going on in the same file chances are you would've defined all this info, in that case, just edit the forumlist file to get the info using those variables instead :)

this is very much customised to my needs a working example can be found at www.ebslive.com/index.php (http://www.ebslive.com/index.php)

*mods if this qualifies as a hack, please split it and put it in the proper forum