1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-01 12:20:44 +02:00

Add supermodifiers to downloads admin

This commit is contained in:
e107steved
2009-01-04 12:52:45 +00:00
parent adce648182
commit 084983de15
2 changed files with 26 additions and 31 deletions

View File

@@ -11,8 +11,8 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/download.php,v $
| $Revision: 1.26 $
| $Date: 2009-01-03 09:40:33 $
| $Revision: 1.27 $
| $Date: 2009-01-04 12:52:45 $
| $Author: e107steved $
|
+----------------------------------------------------------------------------+
@@ -289,7 +289,7 @@ if ($action == "list")
list($download_category_icon, $download_category_icon_empty) = explode(chr(1), $row['parent_icon']);
}
$DOWNLOAD_CAT_MAIN_ICON = ($download_category_icon ? "<img src='".e_IMAGE."icons/".$download_category_icon."' alt='' style='float: left' />" : "&nbsp;");
$DOWNLOAD_CAT_MAIN_NAME = $tp->toHTML($row['parent_name']);
$DOWNLOAD_CAT_MAIN_NAME = $tp->toHTML($row['parent_name'], FALSE, 'USER_TITLE');
$download_cat_table_start = preg_replace("/\{(.*?)\}/e", '$\1', $DOWNLOAD_CAT_TABLE_START);
$DOWNLOAD_CAT_NEWDOWNLOAD_TEXT = "<img src='".IMAGE_NEW."' alt='' style='vertical-align:middle' /> ".LAN_dl_36;
$download_cat_table_end = preg_replace("/\{(.*?)\}/e", '$\1', $DOWNLOAD_CAT_TABLE_END);
@@ -324,8 +324,8 @@ if ($action == "list")
}
$DOWNLOAD_CATEGORY_ICON = ($download_category_icon ? "<img src='".e_IMAGE."icons/".$download_category_icon."' alt='' style='float: left' />" : "&nbsp;");
$DOWNLOAD_CATEGORY = $tp->toHTML($download_category_name,FALSE,"emotes_off, no_make_clickable");
$DOWNLOAD_CATEGORY_DESCRIPTION = $tp -> toHTML($download_category_description, TRUE,'description');
$DOWNLOAD_CATEGORY = $tp->toHTML($download_category_name,FALSE,'USER_TITLE');
$DOWNLOAD_CATEGORY_DESCRIPTION = $tp -> toHTML($download_category_description, TRUE,'DESCRIPTION');
$load_template = 'download_template';
if (!isset($DOWNLOAD_LIST_TABLE)) eval($template_load_core);
@@ -609,7 +609,7 @@ if($action == "mirror")
function parse_download_mirror_table($row, $mirrorstring, $mirrorList)
{
global $pref, $DOWNLOAD_MIRROR, $tp;
global $DOWNLOAD_MIRROR;
list($mirrorHost_id, $mirrorHost_url, $mirrorRequests) = explode(",", $mirrorstring);
extract($mirrorList[$mirrorHost_id]);
@@ -620,12 +620,7 @@ function parse_download_mirror_table($row, $mirrorstring, $mirrorList)
$DOWNLOAD_MIRROR_DESCRIPTION = ($mirror_description ? $mirror_description : "");
$DOWNLOAD_MIRROR_FILESIZE = $e107->parseMemorySize($row['download_filesize']);
$agreetext = '';
if ($pref['agree_flag'])
{
$agreetext = " onclick= \"return confirm('".$tp->toJS($tp->toHTML($pref['agree_text'],FALSE,"parse_sc, defs"))."');\"";
}
$DOWNLOAD_MIRROR_LINK = "<a href='".e_BASE."request.php?mirror.{$row['download_id']}.{$mirrorHost_id}'{$agreetext} title='".LAN_dl_32."'><img src='".IMAGE_DOWNLOAD."' alt='' style='border:0' /></a>";
$DOWNLOAD_MIRROR_LINK = "<a href='".e_BASE."request.php?mirror.{$row['download_id']}.{$mirrorHost_id}' title='".LAN_dl_32."'><img src='".IMAGE_DOWNLOAD."' alt='' style='border:0' /></a>";
$DOWNLOAD_MIRROR_REQUESTS = (ADMIN ? LAN_dl_73.$mirrorRequests : "");
$DOWNLOAD_TOTAL_MIRROR_REQUESTS = (ADMIN ? LAN_dl_74.$mirror_count : "");
@@ -655,7 +650,7 @@ function parse_download_cat_parent_table($row)
list($download_category_icon, $download_category_icon_empty) = explode(chr(1), $download_category_icon);
}
$DOWNLOAD_CAT_MAIN_ICON = ($download_category_icon ? "<img src='".e_IMAGE."icons/".$download_category_icon."' alt='' style='float: left' />" : "&nbsp;");
$DOWNLOAD_CAT_MAIN_NAME = $tp->toHTML($download_category_name,FALSE,"emotes_off, no_make_clickable");
$DOWNLOAD_CAT_MAIN_NAME = $tp->toHTML($download_category_name,FALSE,'USER_TITLE');
$DOWNLOAD_CAT_MAIN_DESCRIPTION = $tp->toHTML($row['download_category_description'],TRUE,'DESCRIPTION');
}
return(preg_replace("/\{(.*?)\}/e", '$\1', $template));
@@ -692,10 +687,10 @@ function parse_download_cat_child_table($row)
$DOWNLOAD_CAT_SUB_ICON = get_cat_icons($row['download_category_icon'],$row['d_count']);
$DOWNLOAD_CAT_SUB_NEW_ICON = check_new_download($row['d_last_subs']);
$dcatname=$tp->toHTML($row['download_category_name'],FALSE,"emotes_off, no_make_clickable");
$dcatname=$tp->toHTML($row['download_category_name'],FALSE,'USER_TITLE');
$DOWNLOAD_CAT_SUB_NAME = ($row['d_count'] ? "<a href='".e_BASE."download.php?list.".$row['download_category_id']."'>".$dcatname."</a>" : $dcatname);
$DOWNLOAD_CAT_SUB_NAME_LINKED = "<a href='".e_BASE."download.php?list.".$row['download_category_id']."'>".$dcatname."</a>";
$DOWNLOAD_CAT_SUB_DESCRIPTION = $tp->toHTML($row['download_category_description'],TRUE,'description');
$DOWNLOAD_CAT_SUB_DESCRIPTION = $tp->toHTML($row['download_category_description'],TRUE,'DESCRIPTION');
$DOWNLOAD_CAT_SUB_COUNT = $row['d_count'];
$DOWNLOAD_CAT_SUB_SIZE = $e107->parseMemorySize($row['d_size']);
$DOWNLOAD_CAT_SUB_DOWNLOADED = intval( $row['d_requests']);
@@ -704,13 +699,13 @@ function parse_download_cat_child_table($row)
foreach($row['subsubcats'] as $subrow)
{
$DOWNLOAD_CAT_SUBSUB_ICON = get_cat_icons($subrow['download_category_icon'],$subrow['d_count']);
$DOWNLOAD_CAT_SUBSUB_DESCRIPTION = $tp->toHTML($subrow['download_category_description'],TRUE,'description');
$DOWNLOAD_CAT_SUBSUB_DESCRIPTION = $tp->toHTML($subrow['download_category_description'],TRUE,'DESCRIPTION');
$DOWNLOAD_CAT_SUBSUB_COUNT = intval($subrow['d_count']);
$DOWNLOAD_CAT_SUBSUB_SIZE = $e107->parseMemorySize($subrow['d_size']);
$DOWNLOAD_CAT_SUBSUB_DOWNLOADED = intval($subrow['d_requests']);
$DOWNLOAD_CAT_SUBSUB_NEW_ICON = check_new_download($subrow['d_last']);
$DOWNLOAD_CAT_SUBSUB_NAME = ($subrow['d_count'] ? "<a href='".e_BASE."download.php?list.".$subrow['download_category_id']."'>".$tp->toHTML($subrow['download_category_name'])."</a>" : $tp->toHTML($subrow['download_category_name'],FALSE,"emotes_off, no_make_clickable"));
$DOWNLOAD_CAT_SUBSUB_NAME = ($subrow['d_count'] ? "<a href='".e_BASE."download.php?list.".$subrow['download_category_id']."'>".$tp->toHTML($subrow['download_category_name'], FALSE, 'USER_TITLE')."</a>" : $tp->toHTML($subrow['download_category_name'],FALSE,'USER_TITLE'));
$DOWNLOAD_CAT_SUBSUB .= preg_replace("/\{(.*?)\}/e", '$\1', $DOWNLOAD_CAT_SUBSUB_TABLE);
}
@@ -723,7 +718,7 @@ function parse_download_list_table($row)
// ***** $agreetext may not need to be global
global $download_shortcodes,$tp,$current_row,$DOWNLOAD_LIST_TABLE, $rater, $pref, $gen, $agreetext;
$agreetext = $tp->toHTML($pref['agree_text'],TRUE,"parse_sc");
$agreetext = $tp->toHTML($pref['agree_text'],TRUE,'DESCRIPTION');
$current_row = ($current_row) ? 0 : 1; // Alternating CSS for each row.(backwards compatible)
$template = ($current_row == 1) ? $DOWNLOAD_LIST_TABLE : str_replace("forumheader3","forumheader3 forumheader3_alt",$DOWNLOAD_LIST_TABLE);

View File

@@ -11,8 +11,8 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_files/shortcode/batch/download_shortcodes.php,v $
| $Revision: 1.16 $
| $Date: 2008-12-08 21:15:57 $
| $Revision: 1.17 $
| $Date: 2009-01-04 12:52:45 $
| $Author: e107steved $
+----------------------------------------------------------------------------+
*/
@@ -23,21 +23,21 @@ $download_shortcodes = $tp -> e_sc -> parse_scbatch(__FILE__);
SC_BEGIN DOWNLOAD_LIST_NAME
global $row,$tp,$pref;
if($parm == "nolink"){
return $tp->toHTML($row['download_name'],TRUE,"no_hook");
return $tp->toHTML($row['download_name'],TRUE,'LINKTEXT');
}
if($parm == "request"){
$agreetext = $tp->toJS($tp->toHTML($pref['agree_text'],FALSE,"parse_sc, defs"));
$agreetext = $tp->toJS($tp->toHTML($pref['agree_text'],FALSE,'DESCRIPTION'));
if($row['download_mirror_type']){
$text = ($pref['agree_flag'] ? "<a href='".e_BASE."download.php?mirror.".$row['download_id']."' onclick= \"return confirm('{$agreetext}');\">" : "<a href='".e_BASE."download.php?mirror.".$row['download_id']."' title='".LAN_dl_32."'>");
}else{
$text = ($pref['agree_flag'] ? "<a href='".e_BASE."request.php?".$row['download_id']."' onclick= \"return confirm('{$agreetext}');\">" : "<a href='".e_BASE."request.php?".$row['download_id']."' title='".LAN_dl_32."'>");
}
$text .= $tp->toHTML($row['download_name'])."</a>";
$text .= $tp->toHTML($row['download_name'], FALSE, 'USER_TITLE')."</a>";
return $text;
}
return "<a href='".e_BASE."download.php?view.".$row['download_id']."'>".$tp->toHTML($row['download_name'],TRUE,"no_hook")."</a>";
return "<a href='".e_BASE."download.php?view.".$row['download_id']."'>".$tp->toHTML($row['download_name'],TRUE,'LINKTEXT')."</a>";
SC_END
@@ -115,7 +115,7 @@ SC_END
SC_BEGIN DOWNLOAD_LIST_LINK
global $tp,$row,$pref;
$agreetext = $tp->toJS($tp->toHTML($pref['agree_text'],FALSE,"parse_sc, defs"));
$agreetext = $tp->toJS($tp->toHTML($pref['agree_text'],FALSE,'DESCRIPTION'));
if($row['download_mirror_type']){
return ($pref['agree_flag'] ? "<a href='".e_BASE."download.php?mirror.".$row['download_id']."' onclick= \"return confirm('{$agreetext}');\">" : "<a href='".e_BASE."download.php?mirror.".$row['download_id']."' >");
}else{
@@ -159,7 +159,7 @@ SC_END
SC_BEGIN DOWNLOAD_CATEGORY_DESCRIPTION
global $tp,$dl;
$text = $tp -> toHTML($dl['download_category_description'], TRUE,'description');
$text = $tp -> toHTML($dl['download_category_description'], TRUE,'DESCRIPTION');
if($parm){
return substr($text,0,$parm);
}else{
@@ -181,7 +181,7 @@ SC_END
SC_BEGIN DOWNLOAD_VIEW_NAME_LINKED
global $pref,$dl,$tp;
if ($pref['agree_flag'] == 1) {
return "<a href='".e_BASE."request.php?".$dl['download_id']."' onclick= \"return confirm('".$tp->toJS($tp->toHTML($pref['agree_text'],FALSE,"parse_sc, defs"))."');\" title='".LAN_dl_46."'>".$dl['download_name']."</a>";
return "<a href='".e_BASE."request.php?".$dl['download_id']."' onclick= \"return confirm('".$tp->toJS($tp->toHTML($pref['agree_text'],FALSE,'DESCRIPTION'))."');\" title='".LAN_dl_46."'>".$dl['download_name']."</a>";
} else {
return "<a href='".e_BASE."request.php?".$dl['download_id']."' title='".LAN_dl_46."'>".$dl['download_name']."</a>";
}
@@ -195,12 +195,12 @@ SC_END
SC_BEGIN DOWNLOAD_VIEW_AUTHOREMAIL
global $tp,$dl;
return ($dl['download_author_email']) ? $tp -> toHTML($dl['download_author_email'], TRUE) : "";
return ($dl['download_author_email']) ? $tp -> toHTML($dl['download_author_email'], TRUE, 'LINKTEXT') : "";
SC_END
SC_BEGIN DOWNLOAD_VIEW_AUTHORWEBSITE
global $tp,$dl;
return ($dl['download_author_website']) ? $tp -> toHTML($dl['download_author_website'], TRUE) : "";
return ($dl['download_author_website']) ? $tp -> toHTML($dl['download_author_website'], TRUE,'LINKTEXT') : "";
SC_END
@@ -208,7 +208,7 @@ SC_END
SC_BEGIN DOWNLOAD_VIEW_DESCRIPTION
global $tp, $dl;
$maxlen = ($parm ? intval($parm) : 0);
$text = ($dl['download_description'] ? $tp->toHTML($dl['download_description'], TRUE, 'description') : "");
$text = ($dl['download_description'] ? $tp->toHTML($dl['download_description'], TRUE, 'DESCRIPTION') : "");
if($maxlen){
return substr($text, 0, $maxlen);
}else{
@@ -258,7 +258,7 @@ SC_END
SC_BEGIN DOWNLOAD_VIEW_LINK
global $pref,$dl,$tp;
if ($pref['agree_flag'] == 1) {
$dnld_link = "<a href='".e_BASE."request.php?".$dl['download_id']."' onclick= \"return confirm('".$tp->toJS($tp->toHTML($pref['agree_text'],FALSE,"parse_sc, defs"))."');\">";
$dnld_link = "<a href='".e_BASE."request.php?".$dl['download_id']."' onclick= \"return confirm('".$tp->toJS($tp->toHTML($pref['agree_text'],FALSE,'DESCRIPTION'))."');\">";
} else {
$dnld_link = "<a href='".e_BASE."request.php?".$dl['download_id']."'>";
}