Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Beta Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Forum in Focus Details »»
Forum in Focus
Version: 1.00, by Toneboy Toneboy is offline
Developer Last Online: Jun 2015 Show Printable Version Email this Page

Version: 3.0.0 Rating:
Released: 03-02-2004 Last Update: Never Installs: 0
Is in Beta Stage  
No support by the author.

Posting this here, as I believe you're meant to do first off. Plus it could probably be improved a touch. Thought I would share it anyway.

Basically it is for use with portals, as it gives some indication of what each forum is. Handy if people pass by your front page and haven't visited your forums yet, as it gives a description of an individual forum after the title.

Anyway, here's the code:
PHP Code:
<?
// this line needs to be set to point to your config.php file.
include("$DOCUMENT_ROOT/forums/includes/config.php");
 $db=mysql_connect($servername,$dbusername,$dbpassword); 
mysql_select_db($dbname); 

// set admin forum
$adminforum = 1;

// MySql query
$sql =mysql_query("SELECT * FROM forum WHERE forumid != $adminforum AND displayorder != 0 AND threadcount > 1 ORDER BY RAND() LIMIT 1");

 // Loop out of DB & PHP, into HTML
 while ($news = mysql_fetch_array($sql)){

$forumid = $news["forumid"];
$forumname = $news["title"];
$forumdes = $news["description"];
}
mysql_free_result($sql);


echo "<table width=\"100%\" border=\"0\"><tr><td align=\"center\"><font class=\"feed\"><b><a href=\"/forums/forumdisplay.php?f=$forumid\">$forumname</a></b></font></td></tr><tr><td align=\"left\"><font class=\"feed\">$forumdes</font></td></tr></table>";
?>

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 03-03-2004, 09:20 PM
refertech refertech is offline
 
Join Date: May 2002
Location: Atlanta, Georgia
Posts: 161
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Screen Shot please.
Reply With Quote
  #3  
Old 03-03-2004, 09:38 PM
ChrisSy ChrisSy is offline
 
Join Date: Mar 2002
Posts: 109
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i think you meant for this to be in beta hacks?

Edit:\ weird its showing up as 'latest hack' on mainpage
Reply With Quote
  #4  
Old 03-03-2004, 09:52 PM
Kentaurus's Avatar
Kentaurus Kentaurus is offline
 
Join Date: Dec 2001
Posts: 332
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Toneboy
Posting this here, as I believe you're meant to do first off. Plus it could probably be improved a touch. Thought I would share it anyway.

Basically it is for use with portals, as it gives some indication of what each forum is. Handy if people pass by your front page and haven't visited your forums yet, as it gives a description of an individual forum after the title.

Anyway, here's the code:
PHP Code:
<?
// this line needs to be set to point to your config.php file.
include("$DOCUMENT_ROOT/forums/includes/config.php");
 $db=mysql_connect($servername,$dbusername,$dbpassword); 
mysql_select_db($dbname); 

// set admin forum
$adminforum = 1;

// MySql query
$sql =mysql_query("SELECT * FROM forum WHERE forumid != $adminforum AND displayorder != 0 AND threadcount > 1 ORDER BY RAND() LIMIT 1");

 // Loop out of DB & PHP, into HTML
 while ($news = mysql_fetch_array($sql)){

$forumid = $news["forumid"];
$forumname = $news["title"];
$forumdes = $news["description"];
}
mysql_free_result($sql);


echo "<table width=\"100%\" border=\"0\"><tr><td align=\"center\"><font class=\"feed\"><b><a href=\"/forums/forumdisplay.php?f=$forumid\">$forumname</a></b></font></td></tr><tr><td align=\"left\"><font class=\"feed\">$forumdes</font></td></tr></table>";
?>
Some of us have more than I admin forum, adminforum should be a comma separated list and the query should be and forumid not in ($adminforum), or something like that

Also, you should really include global.php to have the standard $DB_site object and to use all the forum usergroup constraints.
Reply With Quote
  #5  
Old 03-03-2004, 11:27 PM
obiwan8472 obiwan8472 is offline
 
Join Date: Sep 2002
Location: UK
Posts: 153
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Screenie shotty please
Reply With Quote
  #6  
Old 03-04-2004, 07:54 AM
LeeCHeSSS's Avatar
LeeCHeSSS LeeCHeSSS is offline
 
Join Date: Dec 2001
Posts: 163
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by obiwan8472
Screenie shotty please
There isn't much to take a screenshot of: this piece of code simply randomly selects one forum on your board and displays a table *ick* with the forumname and its description.

It doesn't use templates, and isn't of much use on its own - it needs to be used in your already existant portal.
Reply With Quote
  #7  
Old 03-05-2004, 04:19 PM
gmarik's Avatar
gmarik gmarik is offline
 
Join Date: May 2002
Location: Mocsow
Posts: 1,288
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Some info and a demo site would be just fine ...
Reply With Quote
Reply


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:06 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04301 seconds
  • Memory Usage 2,261KB
  • Queries Executed 20 (?)
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
  • (2)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (6)postbit
  • (7)postbit_onlinestatus
  • (7)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
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete