View Full Version : Get New Posts From Last X Hours, Minutes or Seconds
amykhar
12-18-2004, 10:00 PM
This one was requested here:
https://vborg.vbsupport.ru/showthread.php?t=66089
It works in versions 3.0.5, 3.0.6 and 3.0.7. I am reasonably sure it works in earlier versions as well.
What it allows you to do is to get the posts made in the past X number of hours. You set up the links to provide the intervals you desire.
This one is very easy to install, and I have been running it for a while now. It should work just fine for you. It is in beta just to make sure everything is a-ok before newbies start installing it.
No screenshot provided because where you put the links is entirely up to you. It works very nicely with this template mod:
http://www.vbulletintemplates.com/mods/showthread.php?t=6979&highlight=new+posts
d7me4ever
12-19-2004, 04:57 PM
thanx
nice job
trevelyn1015
12-24-2004, 06:19 AM
hmmm...
amykhar
01-06-2005, 01:17 PM
If you want it for minutes or seconds, you can use the code in this post:
https://vborg.vbsupport.ru/showpost.php?p=590794&postcount=17
amykhar
01-07-2005, 12:42 PM
This hack has been checked and installs and works fine in the latest version 3.0.5
Amy
BaconDelight
02-16-2005, 01:55 AM
Great little hack, installed and working.
I created a little form on my advanced search page so that users can input any number of hours (up to 999) and search. I located it on the bottom left in the "Search Options" column. Screenshot and instructions (it only requires editing the search_forum template) are attached.
amykhar
02-16-2005, 01:55 AM
cool :) Thanks for sharing your code.
agiacosa
02-19-2005, 10:17 AM
Bacon,
When I implement your hack, it works, but the rest of the advanced search function doesn't. Any thoughts?
BaconDelight
02-21-2005, 08:39 PM
Oops. Turns out you can't nest forms like that. So to keep that field located where I had it, I'd have to modify search.php more than I care to at the moment. So, because I'm lazy, I've just relocated it outside the main form on the page.
I've attached the new instructions. Basically, don't do step one of my original instructions (or, if you've already done it, undo it by adding style="margin:0px" back into the fieldset tag), move the code from step 2 from where I originally had it to after the </form> tag, above "$footer" and wrap it in <table> and <td> tags to format it to the correct width.
That will have it positioned at the bottom left of the page, below the "save search prefs" drop down, above the time disply. You may need to change font colors as I've done in the attached screeshot. Let me know if you need help with that.
agiacosa
02-26-2005, 10:24 AM
Thank you!
Bulent Tekcan
02-26-2005, 10:34 PM
Can I put the minute ? 15,30 or 45.....
amykhar
02-27-2005, 01:39 AM
Yes. I did the code for minutes as well.
As mentioned in post #4 of this thread, you can find that code here:
https://vborg.vbsupport.ru/showpost.php?p=590794&postcount=17
amykhar
03-09-2005, 01:47 AM
I have updated this hack to include the contents of post 4, which allows you to search for minutes or seconds as well as hours.
I have also provided a link to a template mod that works very well with this hack. You can see it in action on my forums at http://www.eaforums.com/forums/
agiacosa
03-30-2005, 01:03 PM
Great little hack, installed and working.
I created a little form on my advanced search page so that users can input any number of hours (up to 999) and search. I located it on the bottom left in the "Search Options" column. Screenshot and instructions (it only requires editing the search_forum template) are attached.
Hi Baconlight,
Your mod seems to be limited to "getdaily" or just the last 24 hours. Not 999 hours. Is that right?
BaconDelight
03-30-2005, 02:37 PM
Nope, it will search as far back as you put in. My mod really just takes whatever number you give and plugs it into the search url that amykhar gives. As written, it's limited to 999 hours becaue I've only allowed for a 3 digit input. Otherwise, amykhar's hack is written to accept any number of hours.
agiacosa
04-01-2005, 07:56 AM
Bacon,
Please try it here: http://www.aquaticplantcentral.com/forumapc/search.php?
It only returns the last 24 hours no matter what you put in. Perhaps it has something to do with this in your mod?
<input type=hidden name=do value=getdaily>
BaconDelight
04-01-2005, 01:18 PM
No, getdaily is just the function call in search.php. Notice, it appears in amykhar's installation instructions.
Do you perhaps have you forums default thead display cutoff set to 1 day?
agiacosa
04-01-2005, 04:44 PM
No, getdaily is just the function call in search.php. Notice, it appears in amykhar's installation instructions.
Do you perhaps have you forums default thead display cutoff set to 1 day?
Where would I check that?
BaconDelight
04-01-2005, 05:12 PM
AdminCP, I'd be more specific, but my host is down right now. I'll let you know when I can get back into it.
BaconDelight
04-01-2005, 07:55 PM
Nope, that seems to be a red herring. That's a forum setting, not an overall board setting, so it shouldn't be affecting it. And it defaults to 1 month.
Just out of curiosity, if you put in LESS than 24, does it give you the right results, or still 24?
agiacosa
04-02-2005, 10:45 AM
Nope, that seems to be a red herring. That's a forum setting, not an overall board setting, so it shouldn't be affecting it. And it defaults to 1 month.
Just out of curiosity, if you put in LESS than 24, does it give you the right results, or still 24?
Nope, always results in last 24 hours
trevelyn1015
04-16-2005, 03:11 PM
<a href="https://vborg.vbsupport.ru/showthread.php?t=73893" target="_blank">https://vborg.vbsupport.ru/showthread.php?t=73893</a>
Marco van Herwaarden
04-17-2005, 05:31 AM
@Trevelyn
Please don't spam the support thread of other hacks with links to your own hacks, this is considered to be very rude.
Thank you.
amykhar
06-10-2005, 10:15 PM
Announcement: I will be porting this hack to 3.5. It's probably going to be ready this weekend.
BaconDelight
06-11-2005, 12:00 AM
Sweet, thanks amy!
amykhar
06-11-2005, 01:34 AM
Ported:
https://vborg.vbsupport.ru/showthread.php?p=664845#post664845
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.