View Full Version : Expanded Get New Posts - Hours, Minutes and Even Seconds
amykhar
11 Jun 2005, 02:32
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.
amykhar
11 Jun 2005, 02:37
This post reserved for a FAQ
Andreas
14 Jun 2005, 00:30
This little mod (unfortunately, it can't be a plugin)
Hmm ... are you sure?
Hookname: search_getnew_start
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Btw: There is a small typo in the instructions: 'seconds' => TYPT_UINT instead of 'seconds' => TYPE_UINT :)
amykhar
14 Jun 2005, 00:46
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.
amykhar
03 Jul 2005, 19:27
Cool, but it shows "posts from last day" in the header of the search results, regardless of how many days were searched.
All you have to do is change the posts_from_last_day phrase to something more appropriate. The phrasing would be up to you. I changed mine to "Updated Posts"
Beermonster
07 Jul 2005, 13:14
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:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
amykhar
07 Jul 2005, 13:48
Thanks for contributing :)
FleaBag
25 Aug 2005, 12:50
Amy have you had this running with RC2?
amykhar
25 Aug 2005, 13:39
Yes. It's running on my site now.
Cheertobi
10 Oct 2005, 09:11
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
amykhar
10 Oct 2005, 18:24
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
Sooner95
10 Oct 2005, 19:36
Works like a charm. Another fine hack Amy, Thx!
perhaps a file update wothout the typo's would be good
tokenyank
22 Oct 2005, 23:02
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?
tokenyank
26 Oct 2005, 23:39
guess not! :(
eXtremeTim
27 Oct 2005, 21:49
Hmm ... are you sure?
Hookname: search_getnew_start
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Btw: There is a small typo in the instructions: 'seconds' => TYPT_UINT instead of 'seconds' => TYPE_UINT :)
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. ;)
Anne Lise
29 Oct 2005, 18:41
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.
amykhar
29 Oct 2005, 18:52
I can't test to see if it is working on your site because you don't allow guests to use search.
Amy
Anne Lise
29 Oct 2005, 18:59
Sorry - I did the changes in an old design :) Everything is fine now :)
BaconDelight
11 Nov 2005, 22:23
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.
redspider
12 Nov 2005, 10:59
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:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
for some reason after the search the drop menu dont work any more I have to go back to forum main to search again thats how it only work for me .
any idea why?
Tia
amykhar
12 Nov 2005, 14:50
If you don't place the code correctly in the template, that can happen.
BaconDelight
12 Nov 2005, 20:14
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.
aciurczak
15 Nov 2005, 06:48
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:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
What I have tried is this:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
I was going to add all forums but #17, but the search.php seems to not use the forumchoice parameter.
OK, found it. This appears to be working:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
djjeffa
19 Nov 2005, 21:29
I dont have new post in my nav bar because its a cousom template but i did find this in the header
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
when i replace it with this
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
i get quick lincks 2 times in a row and adn i dont have any newpost buttons lol andy ideals how to get this work.
croportal
28 Nov 2005, 19:12
where can i change langugage of this
icemann
29 Nov 2005, 12:18
Thank you Amy, great hack & easy to install.....installed.
and thanks to BaconDelight as well, great lil feature.
croportal
04 Dec 2005, 22:03
i have problem, 2 times showning 4 hours
amykhar
04 Dec 2005, 22:33
Yes, it's a typo in the template. Change it.
croportal
04 Dec 2005, 22:37
okay, i am, thanks
croportal
13 Jan 2006, 16:26
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:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
i installed this, works great in 3.5.3 version
thanks
Big_Ern
18 Jan 2006, 00:39
What happens with this mod/hack when we need to upgrade? will it have to manually be redo again?
croportal
18 Jan 2006, 01:25
yes :)
amykhar
18 Jan 2006, 11:00
Yeah, but it takes all of 5 seconds to do.
Thanks, I've just installed this! :)
Joey805
30 Jan 2006, 09:22
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.
Joey805
30 Jan 2006, 21:18
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
cheers Amy, seems to be working great atm :)
Joey805
30 Jan 2006, 22:06
I am pretty sure my search.php is correct because i can use this url and it works correctly to pull up posts modified in the last hour: http://www.domainname.com/forum/search.php?do=getdaily&hours=1
I think the problem is with the code in the template because I dont even get the drop down menu showing the choices of times.
I tried this 3 times and still cant get it working? Does me running the Legacy (Vertical) Postbit Template setting have anything to do with this?
Thanks,
Joey
Joey805
30 Jan 2006, 22:25
Ahhh just got it workin! Missed one thing in the navbar..hehe
Joey805
02 Feb 2006, 05:59
OK, I just ran into a little glitch when using this. Whenever I click on QUICK LINKS and then TODAYS POST I get two Nav Bars and also double arrows next to the drop down menus.
Attached is a screen shot of this. How do I fix it?
amykhar
02 Feb 2006, 10:50
You undo your navbar edits and try again.
Amy u do update ur Hack ?
amykhar
06 Feb 2006, 02:20
Yes. I fixed the typos in the install directions
cmiller1014
15 Feb 2006, 06:16
Amy,
Does this only require a file edit because of the minutes, and seconds thing? How would I do it as a hook? I want no file edits, i dont care how resource intensive it is.
Thanks!
amykhar
15 Feb 2006, 10:53
I believe Kirby posted how to do it as a hook earlier in the thread.
BaconDelight
16 Feb 2006, 21:12
As with the 3.0 version, I've added a form at the bottom of my advanced search page so users can easily search for exactly how far back they want. (I've omitted seconds because, well, who needs it? But if you want it, just add the line in there, same format as days, hours, and minutes). Note, I'm using "days2" as the variable for days. Adjust as necessary for your installation.
Just put the following code above "$footer" in your seach_forums template (adjust font colors to fit your board, of course).
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Mokster
15 Mar 2006, 08:42
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?
I'm having similar problem...
i'm using the hook and then copying the drop down menu instructions....3.5.4
amykhar
15 Mar 2006, 10:52
I do not know. It may be a server issue, but I cannot even verify the problem because you do not have it enabled for guests. In fact, nobody who has claimed the problem has had a site I can actually see it happen on.
GrantHorizons
08 Apr 2006, 15:01
As with the 3.0 version, I've added a form at the bottom of my advanced search page so users can easily search for exactly how far back they want. (I've omitted seconds because, well, who needs it? But if you want it, just add the line in there, same format as days, hours, and minutes). Note, I'm using "days2" as the variable for days. Adjust as necessary for your installation.
Just put the following code above "$footer" in your seach_forums template (adjust font colors to fit your board, of course).
I liked this idea and ran with it a little.
didn't like the look, so made it into a horizontal bar above Search Forums search box (Advanced search).
Template: search_forums id:963
Add the following, no other changes needed for this:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Class="content" is my own, puts a grey line around the whole box, but the rest is standard vbulletin. Not perfect, but works and looks fine. And no tables!
It's also valid xhtml transitional code.
Hope you like it!
I'm also about to use Amy's posts in x hack.
Grant
Heidrich
25 Jun 2006, 08:30
I'm new to vBulletin and i like it very much. I used Snitz Forums before this forum. On those forums i liked the active topics very much. So i installed this mod. How editing my template did lead to the result i wanted.
This is the code of my Template header the piece that is the line of the navbar.
<table border="0" width="$stylevar[outertablewidth]" cellpadding="0" cellspacing="0" align="center">
<tr>
<td class="navbg" width="1%"><img src="$stylevar[imgdir_misc]/navspace.gif" alt="" border="0" /></td>
<td class="navbg"><a href="cmps_index.php"><img src="$stylevar[imgdir_misc]/home.gif" border="0" alt="Home" /></a><img src="$stylevar[imgdir_misc]/navbar.gif" border="0" alt="" /><if condition="$show['member']"><a href="usercp.php?$session[sessionurl]"><img src="$stylevar[imgdir_misc]/usercp.gif" border="0" alt="User CP" /></a><img src="$stylevar[imgdir_misc]/navbar.gif" border="0" alt="" /></if><if condition="$show['registerbutton']"><a href="register.php?$session[sessionurl]"><img src="$stylevar[imgdir_misc]/register.gif" border="0" alt="Register" /></a><img src="$stylevar[imgdir_misc]/navbar.gif" border="0" alt="" /></if><a href="faq.php?$session[sessionurl]" accesskey="5"><img src="$stylevar[imgdir_misc]/faq.gif" border="0" alt="F.A.Q." /></a><img src="$stylevar[imgdir_misc]/navbar.gif" border="0" alt="" /><a href="memberlist.php?$session[sessionurl]"><img src="$stylevar[imgdir_misc]/members.gif" border="0" alt="Member List" /></a><if condition="$show['member']"><img src="$stylevar[imgdir_misc]/navbar.gif" border="0" alt="" /><a href="calendar.php?$session[sessionurl]"><img src="$stylevar[imgdir_misc]/cal.gif" border="0" alt="Calendar" /></a><img src="$stylevar[imgdir_misc]/navbar.gif" border="0" alt="" /></if><if condition="$show['member']"><a href="search.php?$session[sessionurl]" accesskey="2" id="navbar_posts" class="vbmenu_control"><img src="$stylevar[imgdir_misc]/newp.gif" border="0" alt="New Posts" /></a><script type="text/javascript"> vbmenu_register("navbar_posts");</script><img src="$stylevar[imgdir_misc]/navbar.gif" border="0" alt="" /><a href="search.php?$session[sessionurl]" accesskey="4"><img src="$stylevar[imgdir_misc]/search.gif" border="0" alt="Search" /></a><img src="$stylevar[imgdir_misc]/navbar.gif" border="0" alt="" /><a href="login.php?$session[sessionurl]do=logout&u=$bbuserinfo[userid]" onclick="return log_out()"><img src="$stylevar[imgdir_misc]/logout.gif" border="0" alt="Log Out" /></a></if></td>
</tr>
</table>
Can someone please help me with this.:cross-eyed:
PoetJA-1975
26 Feb 2007, 12:38
Great! Works fabulously: 3.6.4
Thanx for the sharing ;)
Jacquii.
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?
I have this same issue.
DieselMinded
29 Apr 2007, 23:42
I want to install this but i have a question ...
The directions state in template add
http://www.yoursite.com/forum/search.php?do=getdaily&hours=4 (4 hours)
http://www.yoursite.com/forum/search.php?do=getdaily&hours=8 (8 hours)
http://www.yoursite.com/forum/search.php?do=getdaily&minutes=15 (15 minutes)
OK What template and where
DieselMinded
30 Apr 2007, 01:13
Never mind
http://www.vbulletin.com/forum/showthread.php?t=89080
yoyoyoyo
11 Sep 2007, 00:32
works grreat in 3.6.8 also
Will a fresh install of this for 3.7.0 (Beta 5) work...or does this need to be rewritten for 3.7?
Thanks! :)
works great in 3.7 Gold also
Anne Lise
05 May 2008, 17:04
*** Forget it :) I found the solution.
BigDog56
06 Jul 2008, 06:18
Also on 3.7.2!
PoetJA-1975
07 Jul 2008, 21:26
Thanx again for sharing! Works wonderfully with 3.7.2 ;)
Jacquii.
stwilson
20 Aug 2008, 06:48
Anyone have suggestions on how to change the search results to have them sorted by forum (alphabetical) first and then by date within each forum?
Jamieinnh
15 Jun 2009, 00:37
Works great with 3.8.3!
Thanks for the code to make this happen!!
VonDoom
21 Jul 2009, 04:13
A+ stuff Installed and confirmed working on 3.8.2
ive looked at alot of alternatives and this is the best as far as i can tell. Thank you for an oldie but a goodie. ;)
Editing the PHP file wasnt a biggie as it only adds functionality. hard to believe vB is getting ready to launch 4.0 and this isnt standard as of 3.8.3
Jamieinnh
20 Dec 2009, 00:51
I wanted to let the developer know that I love this mod and hope they port it to the new vb 4.0 suite.
My users absolutely love this mod!
GrantHorizons
21 Dec 2009, 13:07
I wanted to let the developer know that I love this mod and hope they port it to the new vb 4.0 suite.
My users absolutely love this mod!
I'll second that! VB4 version please! :D
Anne Lise
29 Dec 2009, 12:01
Can this please be changed to be compatibel with the 4.0-version?
I'd also be interested in installing this Mod when it's compatible with version 4 :)
vBulletin® v3.6.12, Copyright ©2000-2010, Jelsoft Enterprises Ltd.