vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB5 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=263)
-   -   Alter function of "Today's Posts" to make it "Recent Posts" for 3 days (https://vborg.vbsupport.ru/showthread.php?t=318115)

mdawg 04-04-2015 05:35 PM

Alter function of "Today's Posts" to make it "Recent Posts" for 3 days
 
On my old forum vbulletin 3 I had modified the code in the navbar so that I had another function of "Recent Posts" which went back three days.

Is there a way to modify the code in a vbulletin 5.1.6 forum to make "Today's Posts" go back three days instead of just one, and then alter it's name to "Recent Posts"?

Or, to add a whole new function in addition to "Today's Posts" which is the way I had done it on vbulletin 3.

blind-eddie 04-04-2015 11:53 PM

This is what I use in 3.8.8
Code:

search.php?do=getdaily&days=15


Not sure what the 5.0 code is, sorry. Hopefully this can push you in the right direction.

mdawg 04-05-2015 03:59 PM

What worked is

1) going to Site Builder, Navigation Bar, and choosing the Pencil icon next to its entry. First, changing the name of the module from Today's Posts to Recent Posts.

2) From the target URL the part that says: lastDay
Changing it to lastWeek or lastMonth for longer search periods.

I didn't know how to make it for a period less than a week, but a week is okay.

I changed it to lastWeek, and it works! vb5 is pretty nice because of the Edit Page modular feature.

Mark.B 04-07-2015 08:35 PM

You can replace lastDay with a number of days. Eg: 4


All times are GMT. The time now is 11:04 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.01938 seconds
  • Memory Usage 1,709KB
  • 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
  • (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