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
This modification may not be copied, reproduced or published elsewhere without author's permission.
<?php
$db=mysql_connect($servername,$dbusername,$dbpassword);
mysql_select_db($dbname);
$query = "SELECT * FROM forum WHERE threadcount > 1 AND forumid != 21 AND forumid != 22 AND forumid != 23 AND forumid != 28 AND forumid != 24 AND forumid != 7 AND forumid != 13 AND forumid != 32 AND forumid != 34 AND forumid != 37 AND forumid != 5 AND forumid != 6 AND forumid != 33 AND forumid != 15 AND forumid != 42 ORDER BY categoryid, displayorder, 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://animeboards.net/forums/forumdisplay.php?forumid=$latest_array[forumid]\">$latest_array[title]</A></FONT><BR>";
}
?>
on my frontpage at http://animeboards.net i added 4 new forums of which id = 42 is private
The above code hides the forum correctly, but it doesn't show my 3 other new forums id = 44, 45, 46 ?
<?php
$db=mysql_connect($servername,$dbusername,$dbpassword);
mysql_select_db($dbname);
$query = "SELECT * FROM forum WHERE threadcount > 1 AND forumid != 21 AND forumid != 22 AND forumid != 23 AND forumid != 28 AND forumid != 24 AND forumid != 7 AND forumid != 13 AND forumid != 32 AND forumid != 34 AND forumid != 37 AND forumid != 5 AND forumid != 6 AND forumid != 33 AND forumid != 15 AND forumid != 42 ORDER BY categoryid, displayorder, 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://animeboards.net/forums/forumdisplay.php?forumid=$latest_array[forumid]\">$latest_array[title]</A></FONT><BR>";
}
?>
on my frontpage at http://animeboards.net i added 4 new forums of which id = 42 is private
The above code hides the forum correctly, but it doesn't show my 3 other new forums id = 44, 45, 46 ?
i just upgraded to php4.02/zend
any ideas ?
First use <> instead of != and also you have a clause in there "threadcount > 1 " are you sure the new forums have at least one thread in them? If nto they wont show
hehe yeah the forums didn't have any posts... and the coding mistakes are from me just cut and pasting code from different stuff you guys posted and hoping it would work
now i have to find that submit button.... where is it.. ***scrolls horizontal half way across the screen ****
Originally posted by eva2000 thanks techtalk for coming to my rescue again
hehe yeah the forums didn't have any posts... and the coding mistakes are from me just cut and pasting code from different stuff you guys posted and hoping it would work
now i have to find that submit button.... where is it.. ***scrolls horizontal half way across the screen ****
Glad I could help
As far as the coding.....both ways will work..but I have recently found that <> is more compatible on different systems with different configurations
This hack no longer seems to work with the newer versions of VB. I used it several versions ago and it worked great ... but now I get the following error:
Warning: Supplied argument is not a valid MySQL result resource in /usr/home/babyu/htdocs/forums/categorylist.php on line 7
Best I can figure it is referring to:
while ($latest_array = mysql_fetch_array($resultlatest)) {
does this still work, i got 4 private forums so i'm assuming it would be
PHP Code:
<?php
$db=mysql_connect($servername,$dbusername,$dbpassword);
mysql_select_db($dbname);
$query = "SELECT * FROM forum WHERE threadcount > 0 AND forumid != 16 AND forumid != 17 AND forumid != 18 AND forumid != 20 ORDER BY categoryid, displayorder, title ASC";
$resultlatest = mysql_query($query,$db);
while ($latest_array = mysql_fetch_array($resultlatest)) {
echo "<FONT SIZE=\"1\" FACE=\"Tahoma, Verdana, Arial, Helvetica, sans-serif\"> ?
<A HREF=\"http://www.ebslive.com/forums/forumdisplay.php?forumid=$latest_array[forumid]\">$latest_array[title]</A></FONT><BR>";
}
$db=mysql_connect($servername,$dbusername,$dbpassword);
mysql_select_db($dbname);
$query = "SELECT * FROM forum WHERE threadcount > 0 AND forumid != 16 AND forumid != 17 AND forumid != 18 AND forumid != 20 ORDER BY categoryid, displayorder, title ASC";
$resultlatest = mysql_query($query,$db);
while ($latest_array = mysql_fetch_array($resultlatest)) {
echo "<FONT SIZE=\"1\" FACE=\"Tahoma, Verdana, Arial, Helvetica, sans-serif\"> ?
<A HREF=\"http://www.ebslive.com/forums/forumdisplay.php?forumid=$latest_array[forumid]\">$latest_array[title]</A></FONT><BR>";
}
?>
i seem to be getting an error on the line
PHP Code:
while ($latest_array = mysql_fetch_array($resultlatest)) {