Ejemplo n.º 1
0
JLoader::register('RtiprintModelThirdusergroups', JPATH_COMPONENT . DS . 'models' . DS . 'thirdusergroups.php');
JLoader::register('RtiprintModelThirdusergroup', JPATH_COMPONENT . DS . 'models' . DS . 'thirdusergroup.php');
JLoader::register('RtiprintModelThirdcategories', JPATH_COMPONENT . DS . 'models' . DS . 'thirdcategories.php');
JLoader::register('RtiprintModelThirdcategory', JPATH_COMPONENT . DS . 'models' . DS . 'thirdcategory.php');
JLoader::register('RtiprintModelThirdcontents', JPATH_COMPONENT . DS . 'models' . DS . 'thirdcontents.php');
JLoader::register('RtiprintModelThirdcontent', JPATH_COMPONENT . DS . 'models' . DS . 'thirdcontent.php');
// Handle cross compatibilities
require_once dirname(__FILE__) . DS . 'mvc.php';
// Load the component Dependencies
require_once dirname(__FILE__) . DS . 'helper.php';
// Always use the Javascript framework for UI
JHTML::_("behavior.framework");
// Configure paths
$lang = JFactory::getLanguage();
if ($app->isSite()) {
    $lang->load('com_rtiprint', JPATH_SITE);
    CkJController::addModelPath(JPATH_SITE_RTIPRINT . DS . 'models');
} else {
    $lang->load('com_rtiprint', JPATH_ADMINISTRATOR);
    CkJController::addModelPath(JPATH_ADMIN_RTIPRINT . DS . 'models');
}
// Set the table directory
JTable::addIncludePath(JPATH_ADMIN_RTIPRINT . DS . 'tables');
//Instance JDom
if (!isset($app->dom)) {
    jimport('jdom.dom');
    if (!class_exists('JDom')) {
        JError::raiseError(null, 'JDom plugin is required');
    }
    JDom::getInstance();
}
Ejemplo n.º 2
0
 /**
  * Call the parent display function. Trick for forking overrides.
  *
  * @access	protected
  * @return	void
  *
  * @since	Cook 2.0
  */
 protected function _parentDisplay()
 {
     //Add the fork views path (LILO) instead of FIFO
     array_push($this->paths['view'], JPATH_COMPONENT . DS . 'fork' . DS . 'views');
     parent::display();
 }
Ejemplo n.º 3
0
* @author		MOLEDesign (Morgan Leecy) - http://www.moledesign.biz - morgan@moledesign.biz
* @license		GNU/GPL
*
*             .oooO  Oooo.
*             (   )  (   )
* -------------\ (----) /----------------------------------------------------------- +
*               \_)  (_/
*/
// no direct access
defined('_JEXEC') or die('Restricted access');
if (!defined('DS')) {
    define('DS', DIRECTORY_SEPARATOR);
}
//Copy this line to be able to call the application from outside (Module, Plugin, Third component, ...)
require_once JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_rtiprint' . DS . 'helpers' . DS . 'loader.php';
//Document title
$document = JFactory::getDocument();
$document->titlePrefix = "RT iPrint - ";
$document->titleSuffix = "";
if (defined('JDEBUG') && count($_POST)) {
    $_SESSION['Rtiprint']['$_POST'] = $_POST;
}
$jinput = JFactory::getApplication()->input;
// When this component is called to return a file
// TODO : A better practice is to call it through the View Class
if ($jinput->get('task', null, 'CMD') == 'file') {
    RtiprintClassFile::returnFile('db');
}
$controller = CkJController::getInstance('Rtiprint');
$controller->execute($jinput->get('task', null, 'CMD'));
$controller->redirect();