Esempio n. 1
0
 /**
  * Standard display method.
  *
  * @param bool       $cachable   If true, the view output will be cached
  * @param array|bool $urlparams  An array of safe url parameters and their variable types,
  *                               for valid values see {@link JFilterInput::clean()}.
  *
  * @return \JController|void
  */
 public function display($cachable = false, $urlparams = false)
 {
     if (class_exists('g11n')) {
         g11n::loadLanguage('com_easycreator.config');
     }
     JFactory::getApplication()->input->set('view', 'config');
     parent::display($cachable, $urlparams);
 }
Esempio n. 2
0
    //-- 2) Check the libraries folder
    if (!jimport('g11n.language')) {
        //-- 3) Load a dummy language handler -> english only !
        ecrLoadHelper('g11n_dummy');
        ecrScript('g11n_dummy', 'php2js');
    }
}
if (class_exists('g11n')) {
    //-- TEMP@@debug
    if (ECR_DEV_MODE && ECR_DEBUG_LANG) {
        //-- @@DEBUG
        g11n::cleanStorage();
        g11n::setDebug(ECR_DEBUG_LANG);
    }
    //-- Get our special language file
    g11n::loadLanguage();
}
/*
 * Functions
 */
/**
 * Autoloader.
 *
 * @param $className
 *
 * @return mixed
 */
function easy_creator_loader($className)
{
    if (0 !== strpos($className, 'Ecr')) {
        return;
Esempio n. 3
0
    /**
     * Method to install the component.
     *
     * @param $parent
     *
     * @return boolean
     */
    public function install($parent)
    {
        // $parent is the class calling this method
        //    $parent->getParent()->setRedirectURL('index.php?option=ECR_COM_COM_NAME');
        //echo '<p>'.JText::_('ECR_UPPER_COM_COM_NAME_INSTALL_TEXT').'</p>';
        $logo = JURI::root(true) . '/media/com_easycreator/admin/images/ico/icon-128-easycreator.png';
        try {
            if (!jimport('g11n.language')) {
                //-- Get our special language file
                JLoader::import('helpers.g11n_dummy', JPATH_ADMINISTRATOR . '/components/com_easycreator');
                ?>
            <div style="padding: 0.3em; background-color: #ffc;">
                <h3 style="color: red;">EasyCreator is in "English ONLY" mode !</h3>

                <h3 style="color: red;">
                    If you like EasyCreator in your language, just install the g11n language library :
                </h3>

                <h3 style="color: red;">
                    <a href="http://joomlacode.org/gf/project/elkuku/frs/?action=FrsReleaseBrowse&frs_package_id=5915">
                        Download lib_g11n
                    </a>
                </h3>
            </div>
            <?php 
            } else {
                g11n::loadLanguage('com_easycreator');
            }
            //$xml = simplexml_load_file(ECR_XML_LOCATION);
            $xml = simplexml_load_file($parent->getParent()->getPath('manifest'));
            if (false == $xml) {
                JFactory::getApplication()->enqueueMessage(jgettext('Install manifest not found'), 'error');
                return false;
            }
        } catch (Exception $e) {
            JFactory::getApplication()->enqueueMessage($e->getMessage(), 'error');
            return false;
        }
        define('ECR_VERSION', $xml->version);
        require_once JPATH_ADMINISTRATOR . '/components/com_easycreator/helpers/html.php';
        JFactory::getDocument()->addStyleSheet(JURI::root() . 'media/com_easycreator/admin/css/default.css');
        JFactory::getDocument()->addStyleSheet(JURI::root() . 'media/com_easycreator/admin/css/icon.css');
        ?>

    <div>

        <div style="float: right">
            <img
                    src="<?php 
        echo $logo;
        ?>
"
                    alt="EasyCreator Logo" title="EasyCreator Logo"/>
        </div>

        <h1>EasyCreator</h1>
        <?php 
        echo jgettext('EasyCreator is a developer tool.');
        ?>
<br/>
        <?php 
        echo jgettext('It tries to speed up the developing process of custom Joomla! extensions.');
        ?>
<br/>
        <?php 
        echo jgettext('You can create a "frame" for your extension and an installable zip package with just a few "clicks"');
        ?>

        <p>Happy coding,<br/>
            <?php 
        echo sprintf(jgettext('The %s Team.'), '<a href="https://github.com/elkuku/EasyCreator">EasyCreator</a>');
        ?>
        </p>

    </div>

    <h3 style="color: orange;">
        <?php 
        echo jgettext('Please use this extension only in local development environments.');
        ?>
    </h3>
    <p>
        <?php 
        echo sprintf(jgettext('See: <a %s>docs.joomla.org/Setting up your workstation for Joomla! development</a>'), 'href="http://docs.joomla.org/Setting_up_your_workstation_for_Joomla!_development"');
        ?>
    </p>

    <?php 
        ##ECR_MD5CHECK##
        EcrHtml::footer();
    }