Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases

Reply
 
Thread Tools
Add a Separate Page to your Forum to search Last XX Days Details »»
Add a Separate Page to your Forum to search Last XX Days
Version: 1.00, by indiamike indiamike is offline
Developer Last Online: Aug 2006 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 04-26-2002 Last Update: Never Installs: 17
 
No support by the author.

This is a simple hack.
What is does is adds a new page to your forum to allow the user to view posts by the last xx number of days. What's different in this hack is that we don't replace the "get daily function" (which has been the big hurdle with this type of hack).

This only adds a new php page that can be linked to from anywhere in the forum to search by the last xx days.

Very simple to do and install time is about 10 minutes and should work with all later versions of vb.

Here is a working online example -Day Search .

In my version it just creates a text link to the day search page the we create (from instructions) where the user can search from the last xx days. Simple and easy enough.

Credits go to c-pr0mpt and the search days hack by Vincent "MW" Chan who created two hacks which I modified into one to suit my needs.

***pretty easy hack just requires some php pages to be changed and a few template changes****

Mike

ps...instructions are in html format

please note- this hack has been updated on May 4, 2003 to include suggestions in the threads below

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 04-29-2002, 07:29 PM
julius julius is offline
 
Join Date: Nov 2001
Posts: 80
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Good hack, thank you, I have already installed it!
Reply With Quote
  #13  
Old 04-29-2002, 08:35 PM
Scrooge Scrooge is offline
 
Join Date: Nov 2001
Posts: 40
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is it possible to exclude forums that a regular search would find? I have Usenet Groups on my site but would like this hack to just show results from my regular forums.
Reply With Quote
  #14  
Old 04-29-2002, 08:52 PM
indiamike's Avatar
indiamike indiamike is offline
 
Join Date: Oct 2001
Location: New Jersey, India
Posts: 124
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Scrooge
Is it possible to exclude forums that a regular search would find? I have Usenet Groups on my site but would like this hack to just show results from my regular forums.
Doubtful, since this hack basically just copies your present search.php, unless someone has come up with a way of excluding usenet groups from the search function, which last time I checked no one has. So this may not work well with Usenet groups.

Hope this helps.

Mike
Reply With Quote
  #15  
Old 06-14-2002, 11:54 AM
Ordovicium's Avatar
Ordovicium Ordovicium is offline
 
Join Date: Oct 2001
Posts: 64
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanx!!!
Nice Hack
Reply With Quote
  #16  
Old 06-14-2002, 12:33 PM
Birdie501's Avatar
Birdie501 Birdie501 is offline
 
Join Date: Dec 2001
Location: Germany
Posts: 272
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi,
nice hack! Is it possible to have a field in User CP where the user can define how many days he normally wanted to show?
Maybe there could be a dropdown field with 1-x days and one called "variable". if this is choosen the user can enter the value in the template.???

Thanks.
Reply With Quote
  #17  
Old 06-14-2002, 12:41 PM
-=dm=- -=dm=- is offline
 
Join Date: Nov 2001
Posts: 189
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanx indiamike looks great.
btw nice forum

going to install this one
Reply With Quote
  #18  
Old 04-20-2003, 10:46 AM
Rand M Rand M is offline
 
Join Date: Oct 2002
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks IndiaMike , just what my (ab)users have been asking for.
Reply With Quote
  #19  
Old 05-01-2003, 11:48 PM
jschefdog jschefdog is offline
 
Join Date: May 2002
Location: Sunnyvale, CA.
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for the great hack, this is exactly what I was looking for. I can't believe that they still haven't added this feature to the standard vbulletin, even in the v3 beta.

I made a few tweaks to the searchinfo template code that you may want to change in the original. I think the following lines have the text in the wrong place. The "To search for all..." text does not appear in the same size or color as the other search page tables.
Code:
<td bgcolor="#1D6AA0"><b>To search for all posts by xx days click below</b>
<smallfont color="#EEEEFF"></smallfont></td>
I think this should be:
Code:
<td bgcolor="#1D6AA0"><smallfont color="#EEEEFF"><b>To search for all posts by xx days click below</b>
</smallfont></td>
Also, at least on my server, it was not necessary to specify the full URL for the daysearch.php file. The following was sufficient.
Code:
<a href="daysearch.php">
This change will eliminate the need for people to modify this line.
Reply With Quote
  #20  
Old 05-02-2003, 08:38 AM
indiamike's Avatar
indiamike indiamike is offline
 
Join Date: Oct 2001
Location: New Jersey, India
Posts: 124
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for updating some of the hack. It's a way old hack (over a year now) so any additions or corrections are welcome. I will update the file in a few days.

It's such a simpler hack but I still find myself using it after all this time.

Cheers
Mike
Reply With Quote
  #21  
Old 05-02-2003, 07:58 PM
jschefdog jschefdog is offline
 
Join Date: May 2002
Location: Sunnyvale, CA.
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Glad to see you're still following this thread. Thanks for making the hack available. I think people will keep using it until the developers add this feature to the standard vbulletin, which it seems they have no interest in adding to v3 at this time.

Of course, shortly after adding this hack, someone asked if there was a way to sort the results. After some tinkering, I figured out how to do this. You need to modify an additional line in the search2.php file as follows. Find the following line in the "Start Get Daily" section of search2.php:
Code:
eval("standardredirect(\"".gettemplate("redirect_search")."\",\"search.php?s=$session[sessionhash]&action=showresults
&getnew=true&searchid=$searchid\");");
Change it to:
Code:
eval("standardredirect(\"".gettemplate("redirect_search")."\",\"search.php?s=$session[sessionhash]&action=showresults
&getnew=true&searchid=$searchid&sortby=".addslashes($sortby)."&sortorder=".addslashes($sortorder)."\");");
Then use the attached text file for the "lastxxdays" template.

Feel free to add these changes to the hack if you want.
Reply With Quote
Reply

Thread Tools

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


All times are GMT. The time now is 11:40 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.12370 seconds
  • Memory Usage 2,303KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (5)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete