![]() |
Expanded Get New Posts - Hours, Minutes and Even Seconds
OK. I'll admit it. The seconds is overkill. Sue me. ;)
This little mod (unfortunately, it can't be a plugin) requires you to edit one file and a template or two. I have included a suggested template edit, but how you use the search links is up to you. It is similar to the getdaily feature of vbulletin, which allows users to search for posts submitted in x number of days. This expansion allows users to search for posts submitted within x hours, x minutes or even x seconds. It also allows users to search for any combination thereof. |
This post reserved for a FAQ
|
Nice!
|
Quote:
Hookname: search_getnew_start PHP Code:
|
OK. I guess I just didn't see the point of repeating the code twice - felt it better to replace the existing.
Amy |
Cool, but it shows "posts from last day" in the header of the search results, regardless of how many days were searched.
|
Quote:
|
Thanks for this, just a little mistake in your get hours, you had 2 4's instead of 4 & 8 :)
anyway for a little more overkill use this, it add's Find all your posts Find all your threads Get all unanswered posts :) Code:
<if condition="$show['searchbuttons']"> |
Thanks for contributing :)
|
Amy have you had this running with RC2?
|
Yes. It's running on my site now.
|
Hi,
are there any updates to this mod? Does it work with Gold? Can it be a plugin? How does it handle the new databasetracking system? Regards, Tobi |
It works with gold, and it can be a plugin if you don't mind repeating the code block. I prefer to optimize it and leave it as a hack for myself.
Amy |
Works like a charm. Another fine hack Amy, Thx!
|
perhaps a file update wothout the typo's would be good
|
Just tried this and despite using the file edit or the hook/plugin I get the same results...
Any option older than 24 hours works fine... Any option 'younger' than 24 hours (i.e. the 15 mins or 1 hour) still displays 24 hours of posts... Any ideas? |
guess not! :(
|
Quote:
That was close but to do that you need to change if from using days. Like I used days2 and changed the navbar to reflect it to use it as a plugin. Becuase by then days will already be set to one if it was less then one. ;) |
why why why
I can't get it working. I should be a box at the new posts with all these options right? Nothing is changed at my side. And I have done everything the receipt tells me to. |
I can't test to see if it is working on your site because you don't allow guests to use search.
Amy |
Sorry - I did the changes in an old design :) Everything is fine now :)
|
For the old version of this, I created a box on the Advanced Search page that allows users to input exactly how many hours, instead of having a pre-determined drop down list. See screenshot. If anyone's interested, I'll work on doing it again.
|
Quote:
any idea why? Tia |
If you don't place the code correctly in the template, that can happen.
|
Okay, I've created a manual input form for the Advanced Search page where a user can put in an exact number of days, hours, and/or minutes to search back.
|
Love this mod! I'm trying to futz with the last search in the modification in this thread, showing all unanswered threads (which works great as is).
What I want is all unanswered threads in all forums except for forum #17, but I just can't seem to add the forumchoice parameter correctly. Any vb search gurus able to help a guy out? here is the existing code: Code:
<tr><td class="vbmenu_option"><a href="search.php?$session[sessionurl]do=process&replyless=1&replylimit=0&dontcache=1">Get Unanswered Posts</a></td></tr> Code:
<tr><td class="vbmenu_option"><a href="search.php?$session[sessionurl]do=process&replyless=1&replylimit=0&forumchoice=[2,3,4]&dontcache=1">Get Unanswered Posts</a></td></tr> OK, found it. This appears to be working: Code:
<tr><td class="vbmenu_option"><a href="search.php?$session[sessionurl]do=process&replyless=1&replylimit=0&forumchoice[]=2&forumchoice[]=4&forumchoice[]=5&forumchoice[]=6&forumchoice[]=7&forumchoice[]=9&forumchoice[]=10&forumchoice[]=11&forumchoice[]=19&forumchoice[]=23&forumchoice[]=24&dontcache=1">Get Unanswered Posts</a></td></tr> |
I dont have new post in my nav bar because its a cousom template but i did find this in the header
Code:
<if condition="$bbuserinfo['userid']"> Code:
<if condition="$show['member']"> |
where can i change langugage of this
|
Thank you Amy, great hack & easy to install.....installed.
and thanks to BaconDelight as well, great lil feature. |
i have problem, 2 times showning 4 hours
|
Yes, it's a typo in the template. Change it.
|
okay, i am, thanks
|
Quote:
i installed this, works great in 3.5.3 version thanks |
What happens with this mod/hack when we need to upgrade? will it have to manually be redo again?
|
yes :)
|
Yeah, but it takes all of 5 seconds to do.
|
Thanks, I've just installed this! :)
|
If I'm using the Legacy (Vertical) Postbit Template setting, where do I need to edit my navbar template at?
I did all the steps correctly and then I changed the navbar template under Navigation Breadcrumb templates/navbar and my button at the top still says NEW POSTS. My version number is 3.5.3 What am I doing wrong? Thanks, Joey |
Make sure you've done the file edits for search.php file.
|
Attached is my search.php file. I believe I have done all the file edits correctly. Can you check it out and let me know if something is wrong?
Thanks for your help, Joey |
All times are GMT. The time now is 04:47 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|