mirror of
https://github.com/e107inc/e107.git
synced 2025-08-06 14:46:56 +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:
@@ -11,8 +11,8 @@
|
||||
| GNU General Public License (http://gnu.org).
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_plugins/download/download_admin.php,v $
|
||||
| $Revision: 1.3 $
|
||||
| $Date: 2009-01-14 22:53:38 $
|
||||
| $Revision: 1.4 $
|
||||
| $Date: 2009-01-14 23:45:33 $
|
||||
| $Author: bugrain $
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
@@ -168,6 +168,7 @@ if (isset($_POST['updateoptions']))
|
||||
$temp['download_sort'] = $_POST['download_sort'];
|
||||
$temp['download_order'] = $_POST['download_order'];
|
||||
$temp['mirror_order'] = $_POST['mirror_order'];
|
||||
$temp['recent_download_days'] = $_POST['recent_download_days'];
|
||||
$temp['agree_flag'] = $_POST['agree_flag'];
|
||||
$temp['download_email'] = $_POST['download_email'];
|
||||
$temp['agree_text'] = $tp->toDB($_POST['agree_text']);
|
||||
@@ -407,6 +408,15 @@ if ($action == "opt")
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class='forumheader3'>
|
||||
".DOWLAN_164."
|
||||
</td>
|
||||
<td class='forumheader3' style='text-align:left'>
|
||||
<input name='recent_download_days' class='tbox' value='".$pref['recent_download_days']."' size='3' maxlength='3'/>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class='forumheader3'>".DOWLAN_151."</td>
|
||||
<td class='forumheader3' style='text-align:left'>". r_userclass("download_reportbroken", $pref['download_reportbroken'])."</td>
|
||||
|
@@ -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;
|
||||
|
@@ -4,8 +4,8 @@
|
||||
| e107 website system - Language File.
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_plugins/download/languages/English/lan_download_admin.php,v $
|
||||
| $Revision: 1.3 $
|
||||
| $Date: 2009-01-14 22:53:38 $
|
||||
| $Revision: 1.4 $
|
||||
| $Date: 2009-01-14 23:45:33 $
|
||||
| $Author: bugrain $
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
@@ -151,4 +151,6 @@ define("DOWLAN_161", "Random");
|
||||
define("DOWLAN_162", "ID");
|
||||
define("DOWLAN_163", "Name");
|
||||
|
||||
define("DOWLAN_164", "Recent downloads age (in days)");
|
||||
|
||||
?>
|
Reference in New Issue
Block a user