mirror of
https://github.com/e107inc/e107.git
synced 2025-08-04 13:47:31 +02:00
Closes #3864 - Added raw option for {DOWNLOAD_CAT_SUB_NAME} and {DOWNLOAD_CAT_SUBSUB_NAME}
This commit is contained in:
@@ -142,13 +142,18 @@ class download_shortcodes extends e_shortcode
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Sub-Category ********************************************************************************
|
// Sub-Category ********************************************************************************
|
||||||
function sc_download_cat_sub_name()
|
function sc_download_cat_sub_name($parm = '')
|
||||||
{
|
{
|
||||||
$tp = e107::getParser();
|
$tp = e107::getParser();
|
||||||
|
|
||||||
$class = 'category-name';
|
$class = 'category-name';
|
||||||
$class .= $this->isNewDownload($this->dlsubrow['d_last']) ? ' new' : '';
|
$class .= $this->isNewDownload($this->dlsubrow['d_last']) ? ' new' : '';
|
||||||
|
|
||||||
|
if($parm == 'raw')
|
||||||
|
{
|
||||||
|
return $tp->toHTML($this->dlsubrow['download_category_name'], FALSE, 'TITLE');
|
||||||
|
}
|
||||||
|
|
||||||
if ($this->dlsubrow['d_count'])
|
if ($this->dlsubrow['d_count'])
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -198,17 +203,23 @@ class download_shortcodes extends e_shortcode
|
|||||||
// Sub-Sub-Category ****************************************************************************
|
// Sub-Sub-Category ****************************************************************************
|
||||||
|
|
||||||
|
|
||||||
function sc_download_cat_subsub_name()
|
function sc_download_cat_subsub_name($parm = '')
|
||||||
{
|
{
|
||||||
|
$tp = e107::getParser();
|
||||||
|
|
||||||
// isNewDownload
|
// isNewDownload
|
||||||
$class = 'category-name';
|
$class = 'category-name';
|
||||||
$class .= $this->isNewDownload($this->dlsubsubrow['d_last']) ? ' new' : '';
|
$class .= $this->isNewDownload($this->dlsubsubrow['d_last']) ? ' new' : '';
|
||||||
|
|
||||||
$tp = e107::getParser();
|
if($parm == 'raw')
|
||||||
|
{
|
||||||
|
return $tp->toHTML($this->dlsubsubrow['download_category_name'], FALSE, 'TITLE');
|
||||||
|
}
|
||||||
|
|
||||||
if ($this->dlsubsubrow['d_count'])
|
if ($this->dlsubsubrow['d_count'])
|
||||||
{
|
{
|
||||||
$url = e107::url('download', 'category', $this->dlsubsubrow); // /list/category', array('id'=>$this->dlsubsubrow['download_category_id'], 'name'=> vartrue($this->dlsubsubrow['download_category_sef'],'--sef-not-set--')));
|
$url = e107::url('download', 'category', $this->dlsubsubrow);
|
||||||
|
// /list/category', array('id'=>$this->dlsubsubrow['download_category_id'], 'name'=> vartrue($this->dlsubsubrow['download_category_sef'],'--sef-not-set--')));
|
||||||
// e_PLUGIN_ABS."download/download.php?action=list&id=".$this->dlsubsubrow['download_category_id']
|
// e_PLUGIN_ABS."download/download.php?action=list&id=".$this->dlsubsubrow['download_category_id']
|
||||||
return "<a class='".$class."' href='".$url."'>".$tp->toHTML($this->dlsubsubrow['download_category_name'], FALSE, 'TITLE')."</a>";
|
return "<a class='".$class."' href='".$url."'>".$tp->toHTML($this->dlsubsubrow['download_category_name'], FALSE, 'TITLE')."</a>";
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user