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

Reply
 
Thread Tools
Details »»

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

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

I'm looking for a hack that would allow us to post a list of the five most recent threads that have been updated on the front page of our site. We're currently using a PERL script on SitePoint.com that does that for UBB, but we're upgrading to vBulletin in the next week and we want to continue the "Hottest Discussion Topics" box on the front pages of our sites.

Show Your Support

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

Comments
  #2  
Old 08-09-2000, 08:54 AM
Guest
 
Posts: n/a
Default

hi ya matt, as a forum member at sitepoint akka prequel i love that you're moving to vbulletin

here's a few threads concerning similar hacks...

http://www.vbulletin.com/forum/showt...?threadid=1476
http://www.vbulletin.com/forum/showt...p?threadid=249
http://www.vbulletin.com/forum/showt...?threadid=2153
http://www.vbulletin.com/forum/showt...p?threadid=655
Reply With Quote
  #3  
Old 08-09-2000, 09:43 AM
Guest
 
Posts: n/a
Default

well matt i found what i think you want
http://www.vbulletin.com/forum/showt...p?threadid=655

i had problems using it as you will read
Reply With Quote
  #4  
Old 08-09-2000, 10:33 AM
Guest
 
Posts: n/a
Default

OK here is what I have for you.....This will display the last 5 threads that were posted to on your homepage.

Check out the result here:

http://www.extremeforums.com/include/active.inc.php

Place the code below into a file called "active.inc.php"

Code:
<?php
// Set this to the max number of threads to display
$maxthreads = 5;

require("config.php");
$db=mysql_connect($servername,$dbusername,$dbpassword);
mysql_select_db($dbname);
$query = "SELECT * FROM thread ORDER BY lastpost DESC LIMIT $maxthreads";
$resultlatest = mysql_query($query,$db);
while ($latest_array = mysql_fetch_array($resultlatest)) {
echo "<FONT SIZE=\"2\" FACE=\"Verdana, Arial, Helvetica, sans-serif\">&nbsp;°
<A HREF=\"http://www.extremeforums.com/forums/showthread.php?threadid=$latest_array[threadid]\">$latest_array[title]</A></FONT><BR>";
}
 
?>
On your homepage (where you want the list to appear add this code:
Code:
include("/full/path/to/active.inc.php");


Also you can edit the "echo" statement however you like....i just have them appear in a bulleted list with the font face that matches my site

Hope this helps,
~Chris


[Edited by TechTalk on 08-09-2000 at 07:34 AM]
Reply With Quote
  #5  
Old 08-09-2000, 02:06 PM
Guest
 
Posts: n/a
Default

we have a number of hacks that to a variety of variations on this theme on our home page.
Reply With Quote
  #6  
Old 09-04-2000, 04:04 AM
Guest
 
Posts: n/a
Default

Do you have anymore similar hacks, TechTalk? Like a display of the top posters, etc? Other such things I can use on normal PHP pags?
Reply With Quote
  #7  
Old 09-04-2000, 04:08 AM
Guest
 
Posts: n/a
Default

Quote:
Originally posted by TWTCommish
Do you have anymore similar hacks, TechTalk? Like a display of the top posters, etc? Other such things I can use on normal PHP pags?
Yea ive released some others in this forum. Heres some links to get you started:
http://www.vbulletin.com/forum/showt...?threadid=2284
http://www.vbulletin.com/forum/showt...?threadid=2285
http://www.vbulletin.com/forum/showt...?threadid=2286
http://www.vbulletin.com/forum/showt...?threadid=2283

HTH

~Chris
Reply With Quote
  #8  
Old 09-04-2000, 04:12 AM
Guest
 
Posts: n/a
Default

Thanks man!

Got a problem with your original hack though...

I created the active.inc.php file and uploaded it to the forums/admin directory...I then stuck this line in my test.php file:

include("forums/admin/active.inc.php");

I got this error:

Fatal error: Failed opening required 'config.php' (include_path='') in forums/admin/active.inc.php on line 5

Any idea whats wrong?
Reply With Quote
  #9  
Old 09-04-2000, 04:18 AM
Guest
 
Posts: n/a
Default

Quote:
Originally posted by TWTCommish
Thanks man!

Got a problem with your original hack though...

I created the active.inc.php file and uploaded it to the forums/admin directory...I then stuck this line in my test.php file:

include("forums/admin/active.inc.php");

I got this error:

Fatal error: Failed opening required 'config.php' (include_path='') in forums/admin/active.inc.php on line 5

Any idea whats wrong?
Yep. Right before :
Code:
require("config.php");
Add:
Code:
chdir("forums/admin");
That should do it

~Chris
Reply With Quote
  #10  
Old 09-04-2000, 01:30 PM
Guest
 
Posts: n/a
Default

Still no luck.

Here's my active.inc.php file:

Code:
<?php
// Set this to the max number of threads to display
$maxthreads = 5;

chdir("forums/admin"); 
require("config.php");

$db=mysql_connect($servername,$dbusername,$dbpassword);
mysql_select_db($dbname);
$query = "SELECT * FROM thread ORDER BY lastpost DESC LIMIT $maxthreads";
$resultlatest = mysql_query($query,$db);
while ($latest_array = mysql_fetch_array($resultlatest)) {
echo "<FONT SIZE=\"2\" FACE=\"Verdana, Arial, Helvetica, sans-serif\">&nbsp;°
<A HREF=\"http://www.extremeforums.com/forums/showthread.php?threadid=$latest_array[threadid]\">$latest_array[title]</A></FONT><BR>";
}
 
?>
It has been uploaded into the forums/admin directory.

I use this line to call the file: include("forums/admin/active.inc.php");

I get this error: Fatal error: Failed opening required 'config.php' (include_path='') in forums/admin/active.inc.php on line 6

Line 6 is the one requesting config.php - I'm perplexed!
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 10:20 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.04748 seconds
  • Memory Usage 2,271KB
  • 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
  • (5)bbcode_code
  • (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
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete