コード例 #1
0
ファイル: mod_fst_test.php プロジェクト: AxelFG/ckbran-inf
 * @author Freestyle Joomla
 * @copyright (C) 2013 Freestyle Joomla
 * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
**/
defined('_JEXEC') or die;
if (!defined("DS")) {
    define('DS', DIRECTORY_SEPARATOR);
}
if (file_exists(JPATH_SITE . DS . 'components' . DS . 'com_fst' . DS . 'helper' . DS . 'helper.php')) {
    require_once JPATH_SITE . DS . 'components' . DS . 'com_fst' . DS . 'helper' . DS . 'j3helper.php';
    require_once JPATH_SITE . DS . 'components' . DS . 'com_fst' . DS . 'helper' . DS . 'helper.php';
    require_once JPATH_SITE . DS . 'components' . DS . 'com_fst' . DS . 'helper' . DS . 'comments.php';
    $css = JRoute::_("index.php?option=com_fst&view=css&layout=default");
    $document = JFactory::getDocument();
    $document->addStyleSheet($css);
    FST_Helper::IncludeJQuery();
    $document->addScript(JURI::base() . 'components/com_fst/assets/js/jquery.autoscroll.js');
    $db = JFactory::getDBO();
    JHTML::_('behavior.modal', 'a.fst_modal');
    //JHTML::_('behavior.mootools');
    $prodid = $params->get('prodid');
    $dispcount = $params->get('dispcount');
    $listtype = $params->get('listtype');
    $maxlength = $params->get('maxlength');
    $showmore = $params->get('show_more');
    $showadd = $params->get('show_add');
    $maxheight = $params->get('maxheight');
    $comments = new FST_Comments("test", $prodid);
    $comments->template = "comments_testmod";
    if (FST_Settings::get('comments_testmod_use_custom')) {
        $comments->template_type = 2;
コード例 #2
0
ファイル: fst.php プロジェクト: AxelFG/ckbran-inf
        return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR'));
    }
}
// if bad version display warning message
if ($ver_files != $ver_inst) {
    $task = JRequest::getVar('task');
    $view = JRequest::getVar('view');
    if ($task != "update" || $view != "backup") {
        JError::raiseWarning(100, JText::sprintf('INCORRECT_VERSION', FSTRoute::x('index.php?option=com_fst&view=backup&task=update')));
    }
    if ($view != "" && $view != "backup") {
        JRequest::setVar('view', '');
    }
}
// if bad version and controller is not fsts dont display
// Create the controller
$controllername = $controller;
$classname = 'FstsController' . $controller;
$controller = new $classname();
$css = JRoute::_(JURI::root() . "index.php?option=com_fst&view=css");
$document = JFactory::getDocument();
$document->addStyleSheet($css);
$document->addStyleSheet(JURI::root() . 'administrator/components/com_fst/assets/css/main.css');
$document->addStyleSheet(JURI::root() . 'components/com_fst/assets/css/popup.css');
$document->addScript(JURI::root() . 'components/com_fst/assets/js/popup.js');
$document->addScript(JURI::root() . 'administrator/components/com_fst/assets/js/translate.js');
FST_Helper::IncludeJQuery(true);
// Perform the Request task
$controller->execute(JRequest::getVar('task'));
// Redirect if set by the controller
$controller->redirect();