vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Hottest Threads! (https://vborg.vbsupport.ru/showthread.php?t=73722)

Sharif 01-03-2005 08:12 PM

Hottest Threads!
 
Is there any way I can make a mysql query where I can get like the 3 most popular threads on the forum? And list it like this:

- Thread Title (x Posts)
- Thread Title (x Posts)
- Thread Title (x Posts)

?

I am running Vb 3.0.4.

Dean C 01-03-2005 08:39 PM

What do you mean? The three threads on the forum that have the most replies?

Sharif 01-03-2005 09:29 PM

The three most ACTIVE threads! I guess the three with the latest replies will do too.

Dean C 01-03-2005 10:03 PM

By latest how do you mean? What would you define a timespan as latest for? The last day? The last week? The last month? :)

Sharif 01-03-2005 10:53 PM

Latest I mean with the threads that has the most recent posts. Like as soon as I make this post, this thread will have the most recent post... get it?

rake 01-04-2005 08:34 AM

You should look around. It's already been done. Search for "latest threads" or something along that line.

Dean C 01-04-2005 11:12 AM

Ah yes getting the last x posts has been asked many times before. You had me confused for a while there ;) Do a search and ye shall find.

Sharif 01-04-2005 07:03 PM

I did a search a few mins back and it seems no one ever posted a solution for vb3 yet... a lot of questions, no answers.

Link14716 01-04-2005 07:35 PM

The three with the most replies:

[sql]SELECT * FROM thread ORDER BY replycount DESC LIMIT 3[/sql]

The three with the most views:

[sql]SELECT * FROM thread ORDER BY views DESC LIMIT 3[/sql]

The three latest updated threads:

[sql]SELECT * FROM thread ORDER BY lastpost DESC LIMIT 3[/sql]

Sharif 01-04-2005 08:12 PM

Which would you consider to be used to show the most POPULAR? Views or replies?


All times are GMT. The time now is 01:38 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.01101 seconds
  • Memory Usage 1,721KB
  • 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)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