vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   top5.thread.stats (https://vborg.vbsupport.ru/showthread.php?t=32179)

squawell 11-13-2001 01:17 AM

thanks NanoEntity!!:D

it's a great hack ~~

Sweet Evil 11-13-2001 07:39 AM

Quote:

Originally posted by TheComputerGuy
like this isnt his Hack...

I agree, I got this long ago and it was not done by him... :mad:

wolfe 06-27-2002 05:18 PM

is there anyway of making it so it don't show posts from certain forum like posts in the Admin forum etc so others can see titles of posts from certain forums :D

Chris M 06-27-2002 08:19 PM

Add some sql queries to the code to exclude certain forums...

Satan

almightyone 06-27-2002 09:26 PM

yeah ill help ya a bit further then sayong run some queries
goto the index php
find the first
// Top 5 Thread Replys

then look where it says $pop
mske the line look this way
Code:

$pop = $DB_site->query('SELECT title,threadid,lastpost,lastposter,views FROM thread WHERE forumid<>='XX' AND forumid<>='X' AND forumid<>='XX'ORDER BY lastpost DESC LIMIT 5');
simply remove the extras if you only need one or add more if desired

SHoeSTeR 07-16-2002 09:22 PM

I get this error:
Fatal error: Call to undefined function: phperror_reporting() in /home/mtgshoe/public_html/forums/index.php on line 1

i'm using version 2.2.5

lifesourcerec 07-24-2002 03:10 AM

What would the sql query be to exclude only 1 forum?

lifesourcerec 07-24-2002 03:19 AM

Quote:

Originally posted by almightyone
yeah ill help ya a bit further then sayong run some queries
goto the index php
find the first
// Top 5 Thread Replys

then look where it says $pop
mske the line look this way
Code:

$pop = $DB_site->query('SELECT title,threadid,lastpost,lastposter,views FROM thread WHERE forumid<>='XX' AND forumid<>='X' AND forumid<>='XX'ORDER BY lastpost DESC LIMIT 5');
simply remove the extras if you only need one or add more if desired

is it forumid<>'(forum id number) or do you need a "=" between <> and '(forum id number)'?

countryboy713 07-24-2002 04:33 AM

Here's a minor adjustment that a friend did up for me.

Its to cut off the last 5 replies if Theyre too long for your setup.
(I have a thin welcome panel and long thread titles wrap around and look like crap)



Code:

// Top 5 Thread Replys
 $pop = $DB_site->query('SELECT title,threadid,lastpost,lastposter,views FROM thread ORDER BY lastpost DESC LIMIT 5');
 while ($poptop = mysql_fetch_array($pop)):
      ++$poptopnbsp;

          $thelength=25;
          $thetitle=$poptop[title];
      if(strlen($poptop[title]) > $thelength) {
          $thetitle=substr($poptop[title], 0, $thelength)."...";
      }




      $popthread .= "? <a href=showthread.php?s=$session[sessionhash]&threadid=$poptop[threadid] title=\"$poptop[title]\">$thetitle</a><br>";
      $poplastposter .= "$poptop[lastposter]<br>";
      $popviews .= "$poptop[views] ?<br>";

 endwhile;
 // Top 5 Thread Replys

$thelength= being the number of characters you want to show. This also shows the full title when a user hovers over the thread title.


Im not sure what's different since I didnt do it, so just copy that over your current code starting with the //Top5 replys and ending with it too.


Oh, this is in the index.php in case you didnt know lol.

lifesourcerec 07-30-2002 04:20 PM

Quote:

Originally posted by almightyone
yeah ill help ya a bit further then sayong run some queries
goto the index php
find the first
// Top 5 Thread Replys

then look where it says $pop
mske the line look this way
Code:

$pop = $DB_site->query('SELECT title,threadid,lastpost,lastposter,views FROM thread WHERE forumid<>='XX' AND forumid<>='X' AND forumid<>='XX'ORDER BY lastpost DESC LIMIT 5');
simply remove the extras if you only need one or add more if desired

When doing that I get:

Quote:

Parse error: parse error, unexpected T_LNUMBER


All times are GMT. The time now is 05:02 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.01048 seconds
  • Memory Usage 1,739KB
  • 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
  • (4)bbcode_code_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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