Exemplo n.º 1
0
 /**
  * Function used by TypoScript "parseFunc" to process links in the bodytext.
  * Extracts the link and shows it in plain text in a parathesis next to the link text. If link was relative the site URL was prepended.
  *
  * @param    string $content : Empty, ignore.
  * @param    array  $conf    : TypoScript parameters
  *
  * @return    string        Processed output.
  * @see parseBody()
  */
 function atag_to_http($content, $conf)
 {
     $this->conf = $conf;
     $theLink = trim($this->cObj->parameters['href']);
     if (strtolower(substr($theLink, 0, 7)) == 'mailto:') {
         $theLink = substr($theLink, 7);
     }
     return $this->cObj->getCurrentVal() . ' ( ' . $theLink . ' )';
 }
 /**
  * User function (called from TypoScript) for generating a code listing (used in parsefunc)
  *
  * @param	string		$content Empty, ignore.
  * @param	array		$conf TypoScript parameters
  *
  * @return	string		Processed output.
  */
 public function typocode($content, $conf)
 {
     // Nothing is really done here...
     $this->conf = $conf;
     $this->siteUrl = $conf['siteUrl'];
     return $this->cObj->getCurrentVal();
 }