Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 10-03-2001, 01:29 PM
Cloughie Cloughie is offline
 
Join Date: Nov 2001
Posts: 55
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Exaclty as seen on progresstalk.com

Anyone have this hack or is there one?

I have searched btw
Reply With Quote
  #2  
Old 10-03-2001, 01:50 PM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What would you like to order this by?
i.e Top XX latest threads with no reply?

That is quite easy to do:
PHP Code:
<?php
error_reporting
(7);

require(
"./global.php");

$whereforum="";
// if you would like to select threads only from one forum,
// uncomment the following line and replace 1 with the ID
// of that forum.
// $whereforum="AND forumid='1'";

// how many threads would like to display?
$threadnum="10";

// path to your vBulletin? (no trailing slash please)
$pathtovb="http://www";

$threadlist="";

$allthreads=$DB_site->query("SELECT threadid,title FROM thread WHERE replycount='0' $whereforum ORDER BY dateline LIMIT $threadnum");
while (
$thread=$DB_site->fetch_array($allthreads)) {
  if (
$threadlist!="")
    
$threadlist.="<br>";
  
$threadlist.="<a href=\"$pathtovb/showthread.php?threadid=$thread[threadid]\">$thread[title]</a>";
}

?>
Pretty adjustable to your needs methinks.

Just upload to your forum's folder, and include using SSI.
Reply With Quote
  #3  
Old 10-03-2001, 02:12 PM
Cloughie Cloughie is offline
 
Join Date: Nov 2001
Posts: 55
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you very much Firefly! I am gonna try this soon

Thanks again!
Reply With Quote
  #4  
Old 10-03-2001, 03:15 PM
Cloughie Cloughie is offline
 
Join Date: Nov 2001
Posts: 55
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hey I put in the code and called it new.php

I then tried to run http://www.wannabebigforums.com/new.php to test it before I incuded it in the forums and got a blank screen

Heres my php file..

Code:
<?php

error_reporting(7);

require("./global.php");

$whereforum="";
// if you would like to select threads only from one forum,
// uncomment the following line and replace 1 with the ID
// of that forum.
// $whereforum="AND forumid='1'";

// how many threads would like to display?
$threadnum="10";

// path to your vBulletin? (no trailing slash please)
$pathtovb="http://www.wannabebigforums.com";

$threadlist="";

$allthreads=$DB_site->query("SELECT threadid,title FROM thread WHERE replycount='0' $whereforum ORDER BY dateline LIMIT $threadnum");
while ($thread=$DB_site->fetch_array($allthreads)) {
  if ($threadlist!="")
    $threadlist.="<br>";
  $threadlist.="<a href=\"$pathtovb/showthread.php?threadid=$thread[threadid]\">$thread[title]</a>";
}

?>
Reply With Quote
  #5  
Old 10-03-2001, 03:17 PM
Cloughie Cloughie is offline
 
Join Date: Nov 2001
Posts: 55
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

also out of curiousity how hard is it to make it the last XX threads in the last 24 hours?

That might save some old unanswered posts showing up?

Just wondered, may chose to keep it like it is
Reply With Quote
  #6  
Old 10-03-2001, 03:23 PM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

LOL, I am so dumb.
Forgot to echo the stuff.

PHP Code:
<?php

error_reporting
(7);

require(
"./global.php");

$whereforum="";
// if you would like to select threads only from one forum,
// uncomment the following line and replace 1 with the ID
// of that forum.
// $whereforum="AND forumid='1'";

// how many threads would like to display?
$threadnum="10";

// path to your vBulletin? (no trailing slash please)
$pathtovb="http://www.wannabebigforums.com";

// timeframe? (in hours)
$hours="24";

$threadlist="";

$datecut=time()-($hours*60*60);
$allthreads=$DB_site->query("SELECT threadid,title FROM thread WHERE replycount='0' AND dateline>='$datecut$whereforum ORDER BY dateline LIMIT $threadnum");
while (
$thread=$DB_site->fetch_array($allthreads)) {
  if (
$threadlist!="")
    
$threadlist.="<br>";
  
$threadlist.="<a href=\"$pathtovb/showthread.php?threadid=$thread[threadid]\">$thread[title]</a>";
}

echo 
"$threadlist";

?>
(include last 24 hours)
Reply With Quote
  #7  
Old 10-03-2001, 03:40 PM
Cloughie Cloughie is offline
 
Join Date: Nov 2001
Posts: 55
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

would this interfere with tubedogs top xx posters?

Its just I get the new.php working fine..

So I add this to phpinclude..

ob_start();
require("/home/wbbforum/www/topposters.php");
$noreplytopic = ob_get_contents();
ob_end_clean();

I then use $noreplytopic in one of my templates and it shows the top XX posters ???? So I had top xx posters twice??
Reply With Quote
  #8  
Old 10-03-2001, 03:41 PM
Cloughie Cloughie is offline
 
Join Date: Nov 2001
Posts: 55
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

my fault.. I am stupid..

I copied the php include from the topposters one..

D'oh I feel stupid now ha ha
Reply With Quote
  #9  
Old 10-03-2001, 03:42 PM
Cloughie Cloughie is offline
 
Join Date: Nov 2001
Posts: 55
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok I changed it to new.php

I then got this,..

Fatal error: Cannot redeclare stripslashesarray() in /home/wbbforum/public_html/global.php on line 10

Any ideas?
Reply With Quote
  #10  
Old 10-03-2001, 04:30 PM
Cloughie Cloughie is offline
 
Join Date: Nov 2001
Posts: 55
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

sorted it../

Removed the require global from the php file..
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:40 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.07526 seconds
  • Memory Usage 2,269KB
  • Queries Executed 11 (?)
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
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_code
  • (2)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)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
  • (10)postbit
  • (10)postbit_onlinestatus
  • (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
  • postbit_imicons
  • 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