示例#1
0
 public static function getModel($model, $params = array())
 {
     require_once ST_MODEL_PATH . DIRECTORY_SEPARATOR . 'model.php';
     require_once ST_MODEL_PATH . DIRECTORY_SEPARATOR . $model . DIRECTORY_SEPARATOR . $model . '.php';
     if (!self::$_model) {
         $class = ST_MODEL_PREFIX . $model;
         self::$_model = new $class($params);
     }
     return self::$_model;
 }
示例#2
0
 public function __construct($form = null)
 {
     $folders = JRequest::getVar('folder', array());
     if (count($folders)) {
         $list = array();
         foreach ($folders as $k => $v) {
             $list[$v] = JFolder::files(JPATH_ROOT . '/' . $v, '(.jpg|.jpeg|.gif|.png)$');
         }
         echo '{st-image-load}' . json_encode($list) . '{/st-image-load}';
         die;
     }
     // load saved images
     $saved = JRequest::getVar('loadImage', '');
     if ($saved) {
         require_once dirname(dirname(__FILE__)) . '/stContentShowcase.php';
         $params = stContentShowcase::getModuleParams();
         echo '{st-image-load}' . json_encode($params) . '{/st-image-load}';
         die;
     }
 }
示例#3
0
<?php

/**
 * @copyright	submit-templates.com
 * @license		GNU General Public License version 2 or later;
 */
// no direct access
defined('_JEXEC') or die;
// Include the syndicate functions only once
require_once dirname(__FILE__) . '/defined.php';
require_once dirname(__FILE__) . '/stContentShowcase.php';
$appModule = new stContentShowcase();
$modelName = $params->get('source', 'article');
if ($modelName < 0) {
    return;
}
$model = $appModule->getModel($modelName, $params);
$list = $model->getList();
if (!count($list)) {
    return;
}
require JModuleHelper::getLayoutPath('mod_st_content_showcase', $params->get('layout', 'default'));