mirror of
https://github.com/e107inc/e107.git
synced 2025-08-02 20:57:26 +02:00
toFile() - needs to be completed.
This commit is contained in:
@@ -685,6 +685,10 @@ class cpage_shortcodes extends e_shortcode
|
|||||||
return ($raw) ? $value : $tp->toDate($value);
|
return ($raw) ? $value : $tp->toDate($value);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case "file":
|
||||||
|
return ($raw) ? $tp->toFile($value, array('raw'=>1)) : $tp->toFile($value);
|
||||||
|
break;
|
||||||
|
|
||||||
case "url":
|
case "url":
|
||||||
case "email":
|
case "email":
|
||||||
return ($raw) ? $value : $tp->toHtml($value);
|
return ($raw) ? $value : $tp->toHtml($value);
|
||||||
|
@@ -3669,9 +3669,16 @@ class e_parser
|
|||||||
* @param $text
|
* @param $text
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function toFile($text)
|
public function toFile($text, $parm=array())
|
||||||
{
|
{
|
||||||
|
$link = e_HTTP."request.php?".str_replace('{e_MEDIA_FILE}', '',$text);
|
||||||
|
|
||||||
|
if(!empty($parm['raw']))
|
||||||
|
{
|
||||||
|
return $link;
|
||||||
|
}
|
||||||
|
|
||||||
|
return "<a href='".$link."'>-attachment-</a>"; //TODO Add pref for this.
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user