Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Expanded Get New Posts - Hours, Minutes and Even Seconds Details »»
Expanded Get New Posts - Hours, Minutes and Even Seconds
Version: 1.00, by amykhar amykhar is offline
Developer Last Online: Nov 2013 Show Printable Version Email this Page

Version: 3.5.3 Rating:
Released: 06-10-2005 Last Update: 02-02-2006 Installs: 81
Template Edits
Code Changes  
No support by the author.

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.

Show Your Support

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

Comments
  #2  
Old 06-11-2005, 01:37 AM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This post reserved for a FAQ
Reply With Quote
  #3  
Old 06-12-2005, 04:38 AM
.Tim's Avatar
.Tim .Tim is offline
 
Join Date: Jan 2005
Location: Oklahoma City
Posts: 353
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice!
Reply With Quote
  #4  
Old 06-13-2005, 11:30 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by amykhar
This little mod (unfortunately, it can't be a plugin)
Hmm ... are you sure?

Hookname: search_getnew_start
PHP Code:
if ($_REQUEST['do'] == 'getdaily')
{
    
$vbulletin->input->clean_array_gpc('r', array(
        
'hours'     => TYPE_UINT,
        
'minutes'   => TYPE_UINT,
        
'seconds'   => TYPE_UINT
    
));

    if ((
$vbulletin->GPC['days'] < 1) AND(!($vbulletin->GPC['hours']))AND(!($vbulletin->GPC['minutes']))AND(!($vbulletin->GPC['seconds'])))
    {
        
$vbulletin->GPC['days'] = 1;
        
$vbulletin->GPC['hours'] = 0;
        
$vbulletin->GPC['minutes'] = 0;
        
$vbulletin->GPC['seconds'] = 1;
    }
    elseif(
$vbulletin->GPC['days']<1)
    {
        
$vbulletin->GPC['days'] = 0;
    }
    
$datecut TIMENOW - (($vbulletin->GPC['days']*24*60*60) + ($vbulletin->GPC['hours']*60*60) + ($vbulletin->GPC['minutes']*60) + $vbulletin->GPC['seconds']);

Btw: There is a small typo in the instructions: 'seconds' => TYPT_UINT instead of 'seconds' => TYPE_UINT
Reply With Quote
  #5  
Old 06-13-2005, 11:46 PM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OK. I guess I just didn't see the point of repeating the code twice - felt it better to replace the existing.

Amy
Reply With Quote
  #6  
Old 07-01-2005, 07:36 AM
kall's Avatar
kall kall is offline
 
Join Date: Apr 2004
Location: New Zealand
Posts: 2,608
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Cool, but it shows "posts from last day" in the header of the search results, regardless of how many days were searched.
Reply With Quote
  #7  
Old 07-03-2005, 06:27 PM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kall
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"
Reply With Quote
  #8  
Old 07-07-2005, 12:14 PM
Beermonster Beermonster is offline
 
Join Date: Dec 2003
Location: England
Posts: 362
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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']">
		<div class="vbmenu_popup" id="navbar_posts_menu" style="display:none">
			<table cellpadding="4" cellspacing="1" border="0">
<tr><td class="thead">$vbphrase[get_posts_nav]</td></tr>
<tr><td class="vbmenu_option"><a href="search.php?$session[sessionurl]do=getnew" accesskey="2">Get All New Posts</a></td></tr>
<tr><td class="vbmenu_option"><a href="search.php?$session[sessionurl]do=getdaily&minutes=15" accesskey="2">Last 15 Minutes</a></td></tr>
<tr><td class="vbmenu_option"><a href="search.php?$session[sessionurl]do=getdaily&minutes=30" accesskey="2">Last 30 Minutes</a></td></tr>
			
<tr><td class="vbmenu_option"><a href="search.php?$session[sessionurl]do=getdaily&hours=1" accesskey="2">Last Hour</a></td></tr>
<tr><td class="vbmenu_option"><a href="search.php?$session[sessionurl]do=getdaily&hours=2" accesskey="2">2 Hours</a></td></tr>
<tr><td class="vbmenu_option"><a href="search.php?$session[sessionurl]do=getdaily&hours=4" accesskey="2">4 Hours</a></td></tr>
<tr><td class="vbmenu_option"><a href="search.php?$session[sessionurl]do=getdaily&hours=8" accesskey="2">8 Hours</a></td></tr>
<tr><td class="vbmenu_option"><a href="search.php?$session[sessionurl]do=getdaily&hours=12" accesskey="2">12 Hours</a></td></tr>
<tr><td class="vbmenu_option"><a href="search.php?$session[sessionurl]do=getdaily&days=1" accesskey="2">1 Day</a></td></tr>
<tr><td class="vbmenu_option"><a href="search.php?$session[sessionurl]do=getdaily&days=2" accesskey="2">2 Days</a></td></tr>
<tr><td class="vbmenu_option"><a href="search.php?$session[sessionurl]do=getdaily&days=3" accesskey="2">3 Days</a></td></tr>
<tr><td class="vbmenu_option"><a href="search.php?$session[sessionurl]do=getdaily&days=4" accesskey="2">4 Days</a></td></tr>
<tr><td class="vbmenu_option"><a href="search.php?$session[sessionurl]do=process&amp;showposts=0&amp;starteronly=1&amp;exactname=1&amp;searchuser=$bbuserinfo[urlusername]"><phrase 1="$bbuserinfo[username]">Find All Your Threads</phrase></a></td></tr>
<tr><td class="vbmenu_option"><a href="search.php?$session[sessionurl]do=finduser&amp;u=$bbuserinfo[userid]"><phrase 1="$bbuserinfo[username]">Find All Your Posts</phrase></a></td></tr>
<tr><td class="vbmenu_option"><a href="search.php?do=process&replyless=1&replylimit=0&dontcache=1">Get Unanswered Posts</a></td></tr>
			</table>
		</div>
	</if>
Reply With Quote
  #9  
Old 07-07-2005, 12:48 PM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for contributing
Reply With Quote
  #10  
Old 08-25-2005, 11:50 AM
FleaBag's Avatar
FleaBag FleaBag is offline
 
Join Date: Dec 2001
Posts: 1,674
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Amy have you had this running with RC2?
Reply With Quote
Reply


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 06:11 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.05240 seconds
  • Memory Usage 2,319KB
  • Queries Executed 23 (?)
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
  • (1)bbcode_code
  • (1)bbcode_php
  • (2)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
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)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