vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Return X amount of new posts regardless of date (https://vborg.vbsupport.ru/showthread.php?t=268740)

Scalemotorcars 08-18-2011 11:22 PM

Return X amount of new posts regardless of date
 
Maybe Im not looking in the wrong place. All Im looking for is the code to return x amount of new posts regardless of date.

So a basic link that could return say 50 or 100 of the latest posts.

Thanks....:D

nerbert 08-19-2011 04:14 AM

I think this will do it:

Options > General Settings > Database Read Marking Limit = 100

Options > Message Searching Options > Maximum Search Results to Return = 100

Whatever you set for the second setting will affect all types of searches.

Scalemotorcars 08-19-2011 12:28 PM

Thanks but that's not what Im looking for.

That limited the results to that number when someone does a regular search. Im looking for a link that simply returns the last 50 or 100 posts regardless of time frame and without using the search box.

Kind of like the Whats New in the navbar but for a set amount of posts rather then since your last visit.

Mooff 08-19-2011 05:10 PM

i haven't looked up the database table names and field names, so that code below won't work out of the box. But something very similar to that should work:

SELECT
*
FROM
posts
WHERE
parentid > 0
ORDER BY
dateline DESC LIMIT 100

(parentid - or whatever it is actually called in the database excludes threads).

No time to start phpmyadmin in order to check the real names, sorry. Hope that code helps anyway.

Scalemotorcars 08-19-2011 06:40 PM

Thanks Mooff:up:

The only problem is that I havent a clue how to turn that into a clickable button. Can someone decode this for me .:o


All times are GMT. The time now is 11:47 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.00962 seconds
  • Memory Usage 1,708KB
  • 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)post_thanks_navbar_search
  • (1)printthread
  • (5)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