vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Expanded Get New Posts - Hours, Minutes and Even Seconds (https://vborg.vbsupport.ru/showthread.php?t=82872)

bashy 01-30-2006 09:02 PM

cheers Amy, seems to be working great atm :)

Joey805 01-30-2006 09:06 PM

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/sear...tdaily&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 01-30-2006 09:25 PM

Ahhh just got it workin! Missed one thing in the navbar..hehe

Joey805 02-02-2006 04:59 AM

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-02-2006 09:50 AM

You undo your navbar edits and try again.

IrPr 02-06-2006 12:47 AM

Amy u do update ur Hack ?

amykhar 02-06-2006 01:20 AM

Yes. I fixed the typos in the install directions

cmiller1014 02-15-2006 05:16 AM

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 02-15-2006 09:53 AM

I believe Kirby posted how to do it as a hook earlier in the thread.

BaconDelight 02-16-2006 08:12 PM

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:

<table>
<td width=200>
<fieldset class="fieldset" style="margin:0px">
<legend><font color=#FF6640>Show New Posts from the last</font></legend>
<div style="padding:$stylevar[formspacer]px">                       
<FORM ACTION=search.php?>
<input type=hidden name=do value=getdaily>
<INPUT NAME=days2 size=3 maxlength=3><font color=#FFFFFF> days,</font><br />
<INPUT NAME=hours size=3 maxlength=3><font color=#FFFFFF> hours,</font><br />
<INPUT name=minutes size=3 mazlength=2><font color=#FFFFFF> minutes.</font><br />
<br />
<INPUT TYPE=submit Value=Search></form></div>
</fieldset>       
</td>
</table>


Mokster 03-15-2006 07:42 AM

Quote:

Originally Posted by tokenyank
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 03-15-2006 09:52 AM

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 04-08-2006 02:01 PM

Quote:

Originally Posted by BaconDelight
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:

<!-- Begin search in x time hack -->
<div id="postsinx" class="content">
<div style="padding:$stylevar[formspacer]px" class="tcat">
Recent Posts Search
</div>
<div class="panelsurround">
    <div class="panel">

    <fieldset class="fieldset" style="margin:0px">
    <legend>Show New Posts from the last:</legend>
    <div style="padding:$stylevar[formspacer]px">           
    <form action="search.php?">

    <input type="hidden" name="do" value="getdaily" />
    <input type="text" class="bginput" name="days" size="3" maxlength="3" /> days,
    <input type="text" class="bginput" name="hours" size="3" maxlength="3" /> hours,
    <input type="text" class="bginput" name="minutes" size="3" maxlength="2" /> minutes.

    <input type="submit" value="Search"></input></form>
    </div>
    </fieldset>

    </div>
</div>
</div>
<br />
<!-- End search in x time hack -->

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 06-25-2006 07:30 AM

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.

Quote:

<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&amp;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 02-26-2007 11:38 AM

Great! Works fabulously: 3.6.4
Thanx for the sharing ;)

Jacquii.

T.S. 03-19-2007 02:54 PM

Quote:

Originally Posted by tokenyank (Post 802357)
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 04-29-2007 10:42 PM

I want to install this but i have a question ...

The directions state in template add

OK What template and where

DieselMinded 04-30-2007 12:13 AM

Never mind

http://www.vbulletin.com/forum/showthread.php?t=89080

yoyoyoyo 09-10-2007 11:32 PM

works grreat in 3.6.8 also

Pamela 02-29-2008 02:36 AM

Will a fresh install of this for 3.7.0 (Beta 5) work...or does this need to be rewritten for 3.7?

Thanks! :)

dtv100 05-02-2008 08:37 AM

works great in 3.7 Gold also

Anne Lise 05-05-2008 04:04 PM

*** Forget it :) I found the solution.

BigDog56 07-06-2008 05:18 AM

Also on 3.7.2!

PoetJA-1975 07-07-2008 08:26 PM

Thanx again for sharing! Works wonderfully with 3.7.2 ;)

Jacquii.

stwilson 08-20-2008 05:48 AM

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 06-14-2009 11:37 PM

Works great with 3.8.3!

Thanks for the code to make this happen!!

VonDoom 07-21-2009 03:13 AM

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 12-19-2009 11:51 PM

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 12-21-2009 12:07 PM

Quote:

Originally Posted by Jamieinnh (Post 1933785)
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 12-29-2009 11:01 AM

Can this please be changed to be compatibel with the 4.0-version?

JoyB 01-06-2010 04:52 PM

I'd also be interested in installing this Mod when it's compatible with version 4 :)

Pamela 05-11-2010 04:06 PM

Quote:

Originally Posted by JoyB (Post 1948937)
I'd also be interested in installing this Mod when it's compatible with version 4 :)

Me too!!! :)

ChristianAlfred 06-14-2010 08:57 AM

Works great with 4.0

Replace:
Code:

                if ($vbulletin->GPC['days'] < 1)
                {
                        $vbulletin->GPC['days'] = 1;
                }
        $datecut = TIMENOW - (24 * 60 * 60 * $vbulletin->GPC['days']);

With:
Code:

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']);

Only change from the original description.


All times are GMT. The time now is 04:16 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01303 seconds
  • Memory Usage 1,819KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (33)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete