Joined: Jan 2003
Posts: 263
Member
Member
Joined: Jan 2003
Posts: 263
On the bottom of the main index you see "View recent messages"
I would like to add or change one in "Past 3 hours".
Where can I change this ?
Attachments
Joined: Sep 2003
Posts: 488
Code Monkey
Code Monkey
Joined: Sep 2003
Posts: 488
1) In dosearch.php...
CHANGE THIS:
if ($Old == "1day") {<br /> $time = $time -86400;<br /> } TO THIS:
if ($Old == "1day") {<br /> $time = $time -86400;<br /> }<br /> elseif ($Old == "3hours") {<br /> $time = $time -10800;<br /> } 2) In ubbthreads.tmpl (templates folder)...
CHANGE THIS:
<a href="{$config['phpurl']}/dosearch.php?Cat=$Cat&Forum=All_Forums&Words=&Match=Entire+Phrase&Old=1day&Limit=25"><br />{$ubbt_lang['PAST24']}<br /></a> TO THIS:
<a href="{$config['phpurl']}/dosearch.php?Cat=$Cat&Forum=All_Forums&Words=&Match=Entire+Phrase&Old=3hours&Limit=25"><br />{$ubbt_lang['PAST3']}<br /></a><br /><br /><br /><a href="{$config['phpurl']}/dosearch.php?Cat=$Cat&Forum=All_Forums&Words=&Match=Entire+Phrase&Old=1day&Limit=25"><br />{$ubbt_lang['PAST24']}<br /></a> 3) In ubbthreads.php (language folder)
CHANGE THIS:
$ubbt_lang['PAST24'] = "Past 24 hours"; TO THIS:
$ubbt_lang['PAST3'] = "Past 3 hours";<br />$ubbt_lang['PAST24'] = "Past 24 hours"; :-)
Joined: Jan 2003
Posts: 263
Member
Member
Joined: Jan 2003
Posts: 263
Great ! Thanks a lot Twisty
Joined: Jun 2000
Posts: 190
Enthusiast
Enthusiast
Joined: Jun 2000
Posts: 190
Just a small correction.... the first file to be modified is not "dosearch.php", but rather "dosearchlatest.php".
Artificial Intelligence is no match for natural stupidity!
Joined: Sep 2003
Posts: 488
Code Monkey
Code Monkey
Joined: Sep 2003
Posts: 488
It depends on the version being used actually. For me it's dosearch.php :-) I guess people will have to adjust as req'd. Thanks for the reminder though.
Joined: Jan 2003
Posts: 263
Member
Member
Joined: Jan 2003
Posts: 263
Hmmmm, I was too early...
Now I'm trying to make the above change, but I can't find the first lines:
if ($Old == "1day") { $time = $time -86400; } I'm using version 6.4.1 with dosearch.php
Joined: Sep 2003
Posts: 488
Code Monkey
Code Monkey
Joined: Sep 2003
Posts: 488
I'm using v6.3.2, so I really can't help any more since I don't have the script for your version. I would tend to think that the aforementioned line *should* be somewhat similar though. Try searching for '86400' to see if it shows up :-) At least you know what the basic method of adding it will be even if the code is slightly different.
Joined: Jan 2003
Posts: 263
Member
Member
Joined: Jan 2003
Posts: 263
Ok, I just did the following:
Changed this in ubbthreads.tmpl:
<a href="{$config['phpurl']}/dosearch.php?Cat=$Cat&Forum=All_Forums&Words=&daterange=1&newertype=d&newerval=1&Limit=25"><br />{$ubbt_lang['PAST24']}<br /></a><br /><br /> ...to this:
<a href="{$config['phpurl']}/dosearch.php?Cat=$Cat&Forum=All_Forums&Words=&daterange=1&newertype=d&newerval=0.125&Limit=25"><br />{$ubbt_lang['PAST3']}<br /></a><br /><br /><br /><br /><a href="{$config['phpurl']}/dosearch.php?Cat=$Cat&Forum=All_Forums&Words=&daterange=1&newertype=d&newerval=1&Limit=25"><br />{$ubbt_lang['PAST24']}<br /></a><br /><br /><br /> + the change in the language folder
Seems to work fine!
Joined: Sep 2003
Posts: 488
Code Monkey
Code Monkey
Joined: Sep 2003
Posts: 488
"newerval=1"
That's interesting, apparently this was all changed around in 6.4 then. No wonder you couldn't find it
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Yeah, the search was reworked in 6.4. Make sure you use the new links, forums that didn't update their templates (and had old search links) were really slowed down due to searches through the old links.
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Posts:
87
Joined: December 2001
Forums63
Topics37,575
Posts293,931
Members13,823
Most Online6,139Sep 21st, 2024
Currently Online
Topics Created
Posts Made
Users Online
Birthdays