Exemple #1
0
 /**
  * Call hook function
  *
  * @param string $hookname  Hook function name
  * @param array  $args      List of arguments
  *
  * @return mixed  Returns the function result, or FALSE on error.
  */
 function _($hookname, $args = array())
 {
     //load custom hook
     T3Hook::_load();
     //find hook function
     $themes = T3Common::get_active_themes();
     foreach ($themes as $theme) {
         $func = $theme[0] . "_" . $theme[1] . "_" . $hookname;
         if (function_exists($func)) {
             return call_user_func_array($func, $args);
         }
     }
     if (function_exists($hookname)) {
         return call_user_func_array($hookname, $args);
     }
     if (function_exists("T3Hook::{$hookname}")) {
         return call_user_func_array("T3Hook::{$hookname}", $args);
     }
     return false;
 }
Exemple #2
0
<?php 
if (isset($this->article->toc)) {
    ?>
	<?php 
    echo $this->article->toc;
}
echo $this->article->text;
?>
</div>

<?php 
if (intval($this->article->modified) != 0 && $this->params->get('show_modify_date')) {
    ?>
	<p class="modifydate">
		<?php 
    $modified = T3Hook::_('t3_date_format', array($this->article->modified, 'article.modified'));
    if (!$modified) {
        $modified = JHTML::_('date', $this->article->modified, JText::_('DATE_FORMAT_LC2'));
    }
    ?>
	
		<?php 
    echo JText::sprintf('LAST_UPDATED2', $modified);
    ?>
	</p>
<?php 
}
?>

<?php 
if ($this->params->get('show_url') && $this->article->urls) {
            ?>
</a>
			<?php 
        }
        ?>
		</td>
		<?php 
    }
    ?>

		<?php 
    if ($this->params->get('show_date')) {
        ?>
		<td  headers="tableOrdering2">
			<?php 
        $created = T3Hook::_('t3_date_format', array($item->created, 'cat.default.created'));
        if (!$created) {
            $created = $item->created;
        }
        ?>
			<?php 
        echo $created;
        ?>
		</td>
		<?php 
    }
    ?>

		<?php 
    if ($this->params->get('show_author')) {
        ?>
<?php 
if (isset($this->item->toc)) {
    ?>
	<?php 
    echo $this->item->toc;
}
echo $this->item->text;
?>
</div>

<?php 
if (intval($this->item->modified) != 0 && $this->item->params->get('show_modify_date')) {
    ?>
<p class="modifydate">
	<?php 
    $modified = T3Hook::_('t3_date_format', array($this->item->modified, 'frontpage.modified'));
    if (!$modified) {
        $modified = JHTML::_('date', $this->item->modified, JText::_('DATE_FORMAT_LC2'));
    }
    ?>
	<?php 
    echo JText::sprintf('LAST_UPDATED2', $modified);
    ?>
</p>
<?php 
}
?>

<?php 
if ($this->item->params->get('show_url') && $this->item->urls) {
    ?>
Exemple #5
0
 /**
  * Get rendering buffer extension
  *
  * @param $type string
  *            Type of extension
  * @param $name string
  *            Name of extension
  * @param $attribs array
  *            Attributed element
  *
  * @return string Rendered buffer
  */
 function getBuffer($type, $name = '', $attribs = array())
 {
     $_tpl = $this->_tpl;
     switch ($type) {
         case 'hook':
             return T3Hook::_($name);
             break;
         default:
             $buff = $_tpl->getBuffer($type, $name, $attribs);
             // # Fix bug when render custom module
             if ($type == 'module') {
                 $_tpl->setBuffer(null, array('type' => $type, 'name' => $name, 'title' => null));
             }
             return $buff;
             break;
     }
 }
<?php 
if (isset($this->item->toc)) {
    ?>
	<?php 
    echo $this->item->toc;
}
echo $this->item->text;
?>
</div>

<?php 
if (intval($this->item->modified) != 0 && $this->item->params->get('show_modify_date')) {
    ?>
	<p class="modifydate">
		<?php 
    $modified = T3Hook::_('t3_date_format', array($this->item->modified, 'cat.blog.modified'));
    if (!$modified) {
        $modified = JHTML::_('date', $this->item->modified, JText::_('DATE_FORMAT_LC2'));
    }
    ?>
		<?php 
    echo JText::sprintf('LAST_UPDATED2', $modified);
    ?>
	</p>
<?php 
}
?>

<?php 
if ($this->item->params->get('show_readmore') && $this->item->readmore) {
    ?>
Exemple #7
0
 function getBuffer($type, $name = '', $attribs = array())
 {
     $_tpl = $this->_tpl;
     switch ($type) {
         case 'hook':
             return T3Hook::_($name);
             break;
         default:
             return $_tpl->getBuffer($type, $name, $attribs);
             break;
     }
 }