From efa2b08ce2964d1aaa710630d20379ca06c4bd52 Mon Sep 17 00:00:00 2001 From: rica-carv Date: Sun, 4 Dec 2016 17:10:59 +0000 Subject: [PATCH 1/6] Update download.php --- e107_plugins/download/download.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/e107_plugins/download/download.php b/e107_plugins/download/download.php index 2daaec3b2..03da89448 100644 --- a/e107_plugins/download/download.php +++ b/e107_plugins/download/download.php @@ -51,7 +51,7 @@ if (!e107::isInstalled('download')) if(deftrue('BOOTSTRAP')) { - define("IMAGE_DOWNLOAD", (file_exists(THEME."images/download.png") ? THEME."images/download.png" : e_IMAGE."generic/download.png")); + define("IMAGE_DOWNLOAD", (file_exists(THEME."images/download.png") ? THEME."images/download.png" : 'icon-download.glyph')); define("IMAGE_NEW", (file_exists(THEME."images/new.png") ? THEME."images/new.png" : 'icon-star.glyph')); } else @@ -101,4 +101,4 @@ if (!e107::isInstalled('download')) exit ; -?> \ No newline at end of file +?> From 7a5086d25c70c8fab00c31a96b1d5e65d0ce4256 Mon Sep 17 00:00:00 2001 From: rica-carv Date: Sun, 4 Dec 2016 17:33:03 +0000 Subject: [PATCH 2/6] Update download_class.php --- e107_plugins/download/handlers/download_class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/e107_plugins/download/handlers/download_class.php b/e107_plugins/download/handlers/download_class.php index 6ccb5d8c4..ee8ec64b0 100644 --- a/e107_plugins/download/handlers/download_class.php +++ b/e107_plugins/download/handlers/download_class.php @@ -211,7 +211,7 @@ class download if ($dlcat->down_count == 0) { - return $ns->tablerender(LAN_PLUGIN_DOWNLOAD_NAME, "
".LAN_NO_RECORDS_FOUND."
",'download-categories',true); + return $ns->tablerender(LAN_PLUGIN_DOWNLOAD_NAME, "
":"")."style='text-align:center'>".LAN_NO_RECORDS_FOUND."
",'download-categories',true); } $download_cat_table_string = ""; @@ -1011,4 +1011,4 @@ function sort_download_mirror_order($a, $b) } return ($a[1] < $b[1]) ? -1 : 1; } -?> \ No newline at end of file +?> From fe2b66614f7ec06f1758636ddb8f0aa1e1e7e628 Mon Sep 17 00:00:00 2001 From: rica-carv Date: Sun, 4 Dec 2016 17:33:27 +0000 Subject: [PATCH 3/6] Update download.php --- e107_plugins/download/download.php | 1 + 1 file changed, 1 insertion(+) diff --git a/e107_plugins/download/download.php b/e107_plugins/download/download.php index 03da89448..b5558b3a7 100644 --- a/e107_plugins/download/download.php +++ b/e107_plugins/download/download.php @@ -44,6 +44,7 @@ if (!e107::isInstalled('download')) $dl = new download(); + if(!defined("e_PAGETITLE")) {define("e_PAGETITLE", LAN_PLUGIN_DOWNLOAD_NAME);} if(!defined("USER_WIDTH") && !deftrue('BOOTSTRAP')) { define("USER_WIDTH","width:100%"); } From c03fb2361e5b6b3c8d2a720c14058e752ecfa9bd Mon Sep 17 00:00:00 2001 From: rica-carv Date: Sun, 4 Dec 2016 17:59:24 +0000 Subject: [PATCH 4/6] Update download_class.php --- e107_plugins/download/handlers/download_class.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/e107_plugins/download/handlers/download_class.php b/e107_plugins/download/handlers/download_class.php index ee8ec64b0..66d3a105d 100644 --- a/e107_plugins/download/handlers/download_class.php +++ b/e107_plugins/download/handlers/download_class.php @@ -419,6 +419,7 @@ class download { $template = e107::getTemplate('download','download'); + $DOWNLOAD_LIST_CAPTION = $template['list']['caption']; $DOWNLOAD_LIST_TABLE_START = $template['list']['start']; $DOWNLOAD_LIST_TABLE = $template['list']['item']; $DOWNLOAD_LIST_TABLE_END = $template['list']['end']; @@ -611,7 +612,9 @@ class download $dl_text .= $tp->parseTemplate($this->templateFooter, TRUE, $sc); - $text .= $ns->tablerender(LAN_PLUGIN_DOWNLOAD_NAME, $dl_text, 'download-list', true); + $caption = varset($DOWNLOAD_LIST_CAPTION) ? $tp->parseTemplate($DOWNLOAD_LIST_CAPTION, TRUE, $sc) : LAN_PLUGIN_DOWNLOAD_NAME; + + $text .= $ns->tablerender($caption, $dl_text, 'download-list', true); } if(!isset($DOWNLOAD_LIST_NEXTPREV)) From 8820323444659c6383bc41440a767157c2d0f573 Mon Sep 17 00:00:00 2001 From: rica-carv Date: Sun, 4 Dec 2016 18:03:27 +0000 Subject: [PATCH 5/6] Update download_template.php --- e107_plugins/download/templates/download_template.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/e107_plugins/download/templates/download_template.php b/e107_plugins/download/templates/download_template.php index 62d8b5111..151e71237 100644 --- a/e107_plugins/download/templates/download_template.php +++ b/e107_plugins/download/templates/download_template.php @@ -524,6 +524,8 @@ $DOWNLOAD_TEMPLATE['view']['nextprev'] = ' // ##### ------------------------------------------------------------------------------------------ +//$DOWNLOAD_TEMPLATE['list']['caption'] = "Test custom caption"; + $DOWNLOAD_TEMPLATE['list']['start'] = "
@@ -655,4 +657,4 @@ $DOWNLOAD_TEMPLATE['footer'] = ''; -?> \ No newline at end of file +?> From 5b9126c72eedc98425e4f162e3ad85cd1e34fbfc Mon Sep 17 00:00:00 2001 From: rica-carv Date: Sun, 4 Dec 2016 18:27:58 +0000 Subject: [PATCH 6/6] Update download_class.php --- e107_plugins/download/handlers/download_class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/e107_plugins/download/handlers/download_class.php b/e107_plugins/download/handlers/download_class.php index 66d3a105d..ba259c375 100644 --- a/e107_plugins/download/handlers/download_class.php +++ b/e107_plugins/download/handlers/download_class.php @@ -579,6 +579,8 @@ class download if($filetotal) { + $caption = varset($DOWNLOAD_LIST_CAPTION) ? $tp->parseTemplate($DOWNLOAD_LIST_CAPTION, TRUE, $sc) : LAN_PLUGIN_DOWNLOAD_NAME; + // Only show list if some files in it $dl_text .= $tp->parseTemplate($DOWNLOAD_LIST_TABLE_START, TRUE, $sc); @@ -611,8 +613,6 @@ class download } $dl_text .= $tp->parseTemplate($this->templateFooter, TRUE, $sc); - - $caption = varset($DOWNLOAD_LIST_CAPTION) ? $tp->parseTemplate($DOWNLOAD_LIST_CAPTION, TRUE, $sc) : LAN_PLUGIN_DOWNLOAD_NAME; $text .= $ns->tablerender($caption, $dl_text, 'download-list', true); }