ericgtr
03-11-2006, 01:32 PM
I am not sure if this is possible but I would like to use the hook system if I can for this.
In attachment.php I have this code:
// or doing it once an hour
$query = "INSERT INTO " . TABLE_PREFIX . "attachmentviews (attachmentid)
VALUES ($attachmentinfo[attachmentid])
";
defined('NOSHUTDOWNFUNC') ? $db->query_write($query) : $db->shutdown_query($query);
}
I would like to replace it with this:
// or doing it once an hour
$query = "INSERT INTO " . TABLE_PREFIX . "attachmentviews (attachmentid, timestamp)
VALUES ($attachmentinfo[attachmentid], " . TIMENOW . ")
";
defined('NOSHUTDOWNFUNC') ? $db->query_write($query) : $db->shutdown_query($query);
}
It would be nice if I didn't have to force the user to edit the file for this mod :)
In attachment.php I have this code:
// or doing it once an hour
$query = "INSERT INTO " . TABLE_PREFIX . "attachmentviews (attachmentid)
VALUES ($attachmentinfo[attachmentid])
";
defined('NOSHUTDOWNFUNC') ? $db->query_write($query) : $db->shutdown_query($query);
}
I would like to replace it with this:
// or doing it once an hour
$query = "INSERT INTO " . TABLE_PREFIX . "attachmentviews (attachmentid, timestamp)
VALUES ($attachmentinfo[attachmentid], " . TIMENOW . ")
";
defined('NOSHUTDOWNFUNC') ? $db->query_write($query) : $db->shutdown_query($query);
}
It would be nice if I didn't have to force the user to edit the file for this mod :)