Log in

View Full Version : New Posts Today (a list, like a search)


Malice
09-24-2002, 06:49 PM
I was wondering if anyone came up with a "hack" or something of that nature to do the following:

Similar to the View New Posts link but this, will always show the posts that have been posted since midnight.

I believe they have it on UBB. It was a nice feature.

Anyone have any ideas?

Could this be done by a simple search.php string or might there need to be some editing or additions to files made?

Malice

Malice
09-25-2002, 01:24 PM
Any clues anyone?

Logician
09-26-2002, 03:14 PM
If you replicate (copy) between


// ###################### Start get daily #######################
if ($action=="getdaily") {
.
.
.
.
.
.
.
.
.
.
// ###################### Start posts by user x #######################


in search.php into right after that section and in the replica change:

1-

if ($action=="getdaily") {


AS


if ($action=="getmidnight") {


2-
$datesql=" AND thread.lastpost>=".(time() - (24 * 60 *60 * $days));

AS:

$datesql=" AND thread.lastpost>=". (mktime(0,0,0, date("m"), date("d"), date("Y")));

it should work when you call the search.php with "&action=getmidnight" variable..

Himm.. Too complex? :)