diff --git a/e107_plugins/download/download.php b/e107_plugins/download/download.php index 2daaec3b2..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%"); } @@ -51,7 +52,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 +102,4 @@ if (!e107::isInstalled('download')) exit ; -?> \ No newline at end of file +?> diff --git a/e107_plugins/download/handlers/download_class.php b/e107_plugins/download/handlers/download_class.php index 6ccb5d8c4..ba259c375 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 = ""; @@ -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']; @@ -578,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); @@ -610,8 +613,8 @@ class download } $dl_text .= $tp->parseTemplate($this->templateFooter, TRUE, $sc); - - $text .= $ns->tablerender(LAN_PLUGIN_DOWNLOAD_NAME, $dl_text, 'download-list', true); + + $text .= $ns->tablerender($caption, $dl_text, 'download-list', true); } if(!isset($DOWNLOAD_LIST_NEXTPREV)) @@ -1011,4 +1014,4 @@ function sort_download_mirror_order($a, $b) } return ($a[1] < $b[1]) ? -1 : 1; } -?> \ No newline at end of file +?> 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 +?>