vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   the bets way to have the last 10 posts (https://vborg.vbsupport.ru/showthread.php?t=61317)

pablo 02-08-2004 12:37 PM

the bets way to have the last 10 posts
 
on vb2.x someone made a cool script to get the last ten threads that had been posted to. called last10.php or something.

Well i want the same effect on my forum home. It seems that with the external.php included with vb3.x you only get the last new threads, as it it is not updated when someone replies to an existing thread.

I've gone looking around the place @ tonyshawk's one and others. What do people use/recommend ?

thanks,
p

pablo 02-09-2004 03:28 PM

Quote:

Originally Posted by pablo
on vb2.x someone made a cool script to get the last ten threads that had been posted to. called last10.php or something.

Well i want the same effect on my forum home. It seems that with the external.php included with vb3.x you only get the last new threads, as it it is not updated when someone replies to an existing thread.

I've gone looking around the place @ tonyshawk's one and others. What do people use/recommend ?

thanks,
p

anyone ??? *bump*

g-force2k2 02-09-2004 03:58 PM

[sql]SELECT DISTINCT t.threadid, t.title,
p.userid, p.username, p.postid
FROM " . TABLE_PREFIX . "post p
LEFT JOIN " . TABLE_PREFIX . "thread t USING (threadid)
ORDER BY dateline DESC LIMIT 10[/sql]

Perhaps a query like this? Haven't tested it though.

Cheers,
g-forcek2k2

pablo 02-15-2004 10:29 AM

cheers g-forcek2k2,
But how would i make a php file that I could include it just to call this query and order it in some nice fashion.

I must say I am surprised that nobody has released such a hack yet.


All times are GMT. The time now is 03:10 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.01049 seconds
  • Memory Usage 1,712KB
  • 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_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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