Register Members List Search Today's Posts Mark Forums Read

Reply
 
Article Options
last 48 hours search
whodah
Join Date: Feb 2004
Posts: 77

by whodah whodah is offline 02 May 2005

what this hack does: shows the last 48 hours worth of posts
difficulty to install (scale of 1 to 10, 10 being the hardest): 3
files to mod: 1
templates to mod: 1

i take no responsibility if this breaks your forums. this probably violates the vB warranty due to a file modification. u break it, u buy it, yaddi yaddi. don't do this hack... having said that...

so the 'New Posts' link doesn't always work... u sign on, u leave w/out reading all the messages, come back, some are marked as read and don't show up on 'New Posts'... things of that nature.

so on our old forum, pnphpbb, i added a search function to show just the last 48 hours of posts.

once we migrated to vB, this had to be the feature i got the most PM's on that my peeps missed!!!

ok, so it's a very easy hack. probably violates a vB warranty, so u break it, u buy it. i take no responsibility, yaddi yaddi..

here we go!

file: forums/search.php
find:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

insert the 'elseif' statement right between the if and else as such (or just replace it w/ this code):

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

you are done. if you now visit:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

it will show u the last 48 hours worth of posts.

(it should be pretty obvious how to modify it to show the last 7 days or whatever u want. we like 48 hours...)

so now, we added a link to that next to 'New Posts' on our NavBar...

to do this, edit your 'navbar' template. for those that dont' know how:
  • log on to your appliance admin: www.yourdomain.com/forums/admincp
  • click 'Styles & Templates' on the left, then 'Style Manager'.
  • on the right hand menu, drop down to 'Edit Templates' and choose 'Go'.
  • double click 'Navigation / Breadcrumb Templates'
  • double click 'navbar'

somewhere in here, add a link to your new search function. in our case, we put it next to 'New Posts'. to do this, find:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

afterwards add:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

enjoy!

Who Dah?
Views: 2151
Reply With Quote
Comments
  #2  
Old 02 May 2005, 15:58
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Real name: Zachery Woods
whoa.. try

search.php?do=getdaily&days=2
__________________
Looking for ImpEx?
Reply With Quote
  #3  
Old 02 May 2005, 16:27
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Real name: Paul M
Originally Posted by Zachery
whoa.. try

search.php?do=getdaily&days=2
Just what I was going to say ....
__________________
Former vBulletin.org Staff Member


Cable Forum
Please do not PM me about custom work - I no longer undertake any.
Note: I will not answer support questions via e-mail or PM - please use the relevant thread or forum.
Reply With Quote
  #4  
Old 02 May 2005, 16:51
whodah whodah is offline
 
Join Date: Feb 2004
(in joking voice)

i don't want to play w/ u anymore...

:P

oh man - i seriously overlooked this functionality... i'll remove the hack, heh!

oh, and thx btw!

Last edited by whodah; 02 May 2005 at 16:57. Reason: Automerged Doublepost
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Article Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


New To Site? Need Help?

All times are GMT. The time now is 07:31.

Layout Options | Width: Wide Color: