vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Latest XX unanswered topics. (https://vborg.vbsupport.ru/showthread.php?t=29456)

Cloughie 10-03-2001 01:29 PM

Exaclty as seen on progresstalk.com

Anyone have this hack or is there one?

I have searched btw :D

Admin 10-03-2001 01:50 PM

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.

Cloughie 10-03-2001 02:12 PM

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

Thanks again!

Cloughie 10-03-2001 03:15 PM

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>";
}

?>


Cloughie 10-03-2001 03:17 PM

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

Admin 10-03-2001 03:23 PM

LOL, I am so dumb. :p
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)

Cloughie 10-03-2001 03:40 PM

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??

Cloughie 10-03-2001 03:41 PM

my fault.. I am stupid..

I copied the php include from the topposters one..

D'oh I feel stupid now ha ha

Cloughie 10-03-2001 03:42 PM

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?

Cloughie 10-03-2001 04:30 PM

sorted it../

Removed the require global from the php file..


All times are GMT. The time now is 02:07 AM.

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.01040 seconds
  • Memory Usage 1,752KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete