Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives
FAQ Community Calendar Today's Posts Search

 
 
Thread Tools
Details »»

Version: , by (Guest)
Developer Last Online: Jan 1970 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 08-06-2000 Last Update: Never Installs: 0
 
No support by the author.

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\">&nbsp;°
<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.

Comments
  #12  
Old 08-10-2000, 08:20 PM
Guest
 
Posts: n/a
Default

Quote:
Originally posted by rangersfan
eva you could do:

Code:
order by categoryid, displayorder
that will order the forums firstly into the category they belong, then in the order that you have set the forums to display within their category.
ah yes, that's what i am looking for

so what's the include command to do it say on my front non vb page ?

is it

<?php
include ("fileurl");
?>

did i get that right ?
Reply With Quote
  #13  
Old 09-15-2000, 01:43 PM
Guest
 
Posts: n/a
Default

using this code
Code:
<?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\">&nbsp;°
<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 ?
Reply With Quote
  #14  
Old 09-15-2000, 08:10 PM
Guest
 
Posts: n/a
Default

Quote:
Originally posted by eva2000
using this code
Code:
<?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\">&nbsp;°
<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

~Chris
Reply With Quote
  #15  
Old 09-15-2000, 08:21 PM
Guest
 
Posts: n/a
Default

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 ****
Reply With Quote
  #16  
Old 09-15-2000, 08:30 PM
Guest
 
Posts: n/a
Default

Quote:
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

~Chris
Reply With Quote
  #17  
Old 02-15-2002, 07:27 PM
BabyU BabyU is offline
 
Join Date: Nov 2001
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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)) {

Any ideas?
Reply With Quote
  #18  
Old 02-19-2003, 03:47 PM
sabret00the's Avatar
sabret00the sabret00the is offline
 
Join Date: Jan 2003
Location: London
Posts: 5,268
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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>";
}
 
?>
Reply With Quote
  #19  
Old 02-27-2003, 11:36 AM
sabret00the's Avatar
sabret00the sabret00the is offline
 
Join Date: Jan 2003
Location: London
Posts: 5,268
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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>";
}
 
?>
i seem to be getting an error on the line
PHP Code:
while ($latest_array mysql_fetch_array($resultlatest)) { 
help :nervous:
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:57 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05524 seconds
  • Memory Usage 2,288KB
  • Queries Executed 23 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (3)bbcode_code
  • (3)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (8)postbit
  • (3)postbit_onlinestatus
  • (9)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • postbit_imicons
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete