1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-16 11:36:08 +02:00

Idea #1533 Added preference for recent download age in days, use a new shortcode (thanks marj) in template file instead of DOWNLOAD_LIST_NEWICON

This commit is contained in:
bugrain
2009-01-14 23:45:33 +00:00
parent 9d1f56b191
commit 33d7f4db7f
3 changed files with 23 additions and 6 deletions

View File

@@ -11,8 +11,8 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_plugins/download/download_shortcodes.php,v $
| $Revision: 1.1 $
| $Date: 2009-01-13 00:47:13 $
| $Revision: 1.2 $
| $Date: 2009-01-14 23:45:33 $
| $Author: bugrain $
+----------------------------------------------------------------------------+
*/
@@ -70,6 +70,11 @@ global $row;
return (USER && $row['download_datestamp'] > USERLV ? "<img src='".IMAGE_NEW."' alt='' style='vertical-align:middle' />" : "");
SC_END
SC_BEGIN DOWNLOAD_LIST_RECENTICON
global $row, $pref;
// convert "recent_download_days" to seconds
return ($row['download_datestamp'] > time()-($pref['recent_download_days']*86400) ? '<img src="'.IMAGE_NEW.'" alt="" style="vertical-align:middle" />' : '');
SC_END
SC_BEGIN DOWNLOAD_LIST_FILESIZE
global $row, $e107;