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

Andy R 06-11-2002 04:15 AM

What about listing all forums except hidden (moderators) forum?

Can that be done by uncommenting the $whereforum line & excluding a certain froum?

Logician 06-11-2002 10:10 AM

Quote:

Originally posted by organic-hosting
What about listing all forums except hidden (moderators) forum?

Can that be done by uncommenting the $whereforum line & excluding a certain froum?

Replace:

$allthreads=$DB_site->query("SELECT threadid,title FROM thread WHERE replycount='0' $whereforum ORDER BY dateline LIMIT $threadnum");

AS:

$allthreads=$DB_site->query("SELECT threadid,title FROM thread WHERE replycount='0' AND (forumid=X OR forumid=Y OR forumid=Z) ORDER BY dateline LIMIT $threadnum");

(Replace X,Y,Z and if you need to add more forums use "OR forumid=N" format)

MalaK_3araby 08-09-2002 11:16 AM

Thanks all.

how would i modify this to specify the forumid in the url?
i.e: http://yoursite/vb/new.php?&forumid=3

Logician 08-21-2002 07:08 AM

Quote:

Originally posted by MalaK_3araby
Thanks all.

how would i modify this to specify the forumid in the url?
i.e: http://yoursite/vb/new.php?&forumid=3

Replace:

$whereforum="";

AS:

$whereforum="AND forumid='".$forumid."'";

However this may not be a good idea if your users are allowed to use this script since they can access hidden forums with this method..

Automated 01-16-2003 12:35 PM

SOrry i dont follow this, could someone please put it simply for me? I am quite lost :(

Thanks
Matthew

Automated 01-17-2003 11:46 AM

Please............... Someone

Smoothie 01-18-2003 04:24 AM

May I offer an alternative? This is the one I use, works great.
https://vborg.vbsupport.ru/showthrea...=virgin+topics


All times are GMT. The time now is 03:09 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.01202 seconds
  • Memory Usage 1,766KB
  • 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
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (17)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete