当前位置: 首页>>代码示例>>PHP>>正文


PHP JApplicationHelper::parseXMLLangMetaFile方法代码示例

本文整理汇总了PHP中JApplicationHelper::parseXMLLangMetaFile方法的典型用法代码示例。如果您正苦于以下问题:PHP JApplicationHelper::parseXMLLangMetaFile方法的具体用法?PHP JApplicationHelper::parseXMLLangMetaFile怎么用?PHP JApplicationHelper::parseXMLLangMetaFile使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在JApplicationHelper的用法示例。


在下文中一共展示了JApplicationHelper::parseXMLLangMetaFile方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: listslanguagesType

 function listslanguagesType()
 {
     jimport('joomla.filesystem.folder');
     $path = JLanguage::getLanguagePath(JPATH_ROOT);
     $dirs = JFolder::folders($path);
     $this->languages = array();
     foreach ($dirs as $dir) {
         if (strlen($dir) != 5 || $dir == "xx-XX") {
             continue;
         }
         $xmlFiles = JFolder::files($path . DS . $dir, '^([-_A-Za-z]*)\\.xml$');
         $xmlFile = reset($xmlFiles);
         if (empty($xmlFile)) {
             continue;
         }
         $data = JApplicationHelper::parseXMLLangMetaFile($path . DS . $dir . DS . $xmlFile);
         $oneLanguage = new stdClass();
         $oneLanguage->language = strtolower($dir);
         $oneLanguage->name = empty($data['name']) ? $dir : $data['name'];
         $this->languages[] = $oneLanguage;
     }
     if (count($this->languages) < 2) {
         return;
     }
     $this->multipleLang = true;
     $this->choice = array();
     $this->choice[] = JHTML::_('select.option', 'all', JText::_('ACY_ALL'));
     $this->choice[] = JHTML::_('select.option', 'special', JText::_('ACY_CUSTOM'));
     $js = "function updateLanguages(){\n\t\t\tchoice = eval('document.adminForm.choice_languages');\n\t\t\tchoiceValue = 'special';\n\t\t\tfor (var i=0; i < choice.length; i++){\n\t\t\t\t if (choice[i].checked){\n\t\t\t\t\t choiceValue = choice[i].value;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\thiddenVar = document.getElementById('hidden_languages');\n\t\t\tif(choiceValue != 'special'){\n\t\t\t\thiddenVar.value = choiceValue;\n\t\t\t\tdocument.getElementById('div_languages').style.display = 'none';\n\t\t\t}else{\n\t\t\t\tdocument.getElementById('div_languages').style.display = 'block';\n\t\t\t\tspecialVar = eval('document.adminForm.special_languages');\n\t\t\t\tfinalValue = '';\n\t\t\t\tfor (var i=0; i < specialVar.length; i++){\n\t\t\t\t\tif (specialVar[i].checked){\n\t\t\t\t\t\t\t finalValue += specialVar[i].value+',';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\thiddenVar.value = finalValue;\n\t\t\t}\n\n\t\t}";
     $doc = JFactory::getDocument();
     $doc->addScriptDeclaration($js);
 }
开发者ID:utopszkij,项目名称:lmp,代码行数:32,代码来源:listslanguages.php

示例2: config

 public function config($tpl = null)
 {
     hikaserial::setTitle(JText::_(self::name), self::icon, self::ctrl);
     $config = hikaserial::config();
     $this->assignRef('config', $config);
     $popup = hikaserial::get('shop.helper.popup');
     $this->assignRef('popup', $popup);
     $serialstatusType = hikaserial::get('type.serial_status');
     $this->assignRef('serial_status', $serialstatusType);
     $orderstatusType = hikaserial::get('type.order_status');
     $this->assignRef('orderstatusType', $orderstatusType);
     $manage = hikaserial::isAllowed($config->get('acl_config_manage', 'all'));
     $this->assignRef('manage', $manage);
     $toggleClass = hikaserial::get('helper.toggle');
     $languages = array();
     $lg = JFactory::getLanguage();
     $language = $lg->getTag();
     $styleRemind = 'float:right;margin-right:30px;position:relative;';
     $loadLink = $popup->display(JText::_('LOAD_LATEST_LANGUAGE'), 'EDIT_LANGUAGE_FILE', hikaserial::completeLink('config&task=latest&code=' . $language, true), 'loadlatest_language_' . $language, 800, 500, 'onclick="window.document.getElementById(\'hikashop_messages_warning\').style.display = \'none\';"', '', 'link');
     if (!file_exists(HIKASHOP_ROOT . 'language' . DS . $language . DS . $language . '.' . HIKASERIAL_COMPONENT . '.ini')) {
         if ($config->get('errorlanguagemissing', 1)) {
             $noteremind = '<small style="' . $styleRemind . '">' . $toggleClass->delete('hikashop_messages_warning', 'errorlanguagemissing-0', 'config', false, JText::_('DONT_REMIND')) . '</small>';
             hikaserial::display(JText::_('MISSING_LANGUAGE') . ' ' . $loadLink . ' ' . $noteremind, 'warning');
         }
     }
     $edit_image = HIKASHOP_IMAGES . 'icons/icon-16-edit.png';
     $new_image = HIKASHOP_IMAGES . 'icons/icon-16-new.png';
     jimport('joomla.filesystem.folder');
     $path = JLanguage::getLanguagePath(JPATH_ROOT);
     $dirs = JFolder::folders($path);
     foreach ($dirs as $dir) {
         $xmlFiles = JFolder::files($path . DS . $dir, '^([-_A-Za-z]*)\\.xml$');
         $xmlFile = array_pop($xmlFiles);
         if ($xmlFile == 'install.xml') {
             $xmlFile = array_pop($xmlFiles);
         }
         if (empty($xmlFile)) {
             continue;
         }
         $data = JApplicationHelper::parseXMLLangMetaFile($path . DS . $dir . DS . $xmlFile);
         $oneLanguage = new stdClass();
         $oneLanguage->language = $dir;
         $oneLanguage->name = $data['name'];
         $languageFiles = JFolder::files($path . DS . $dir, '^(.*)\\.' . HIKASERIAL_COMPONENT . '\\.ini$');
         $languageFile = reset($languageFiles);
         $linkEdit = hikaserial::completeLink('config&task=language&code=' . $oneLanguage->language, true, false, false);
         if (!empty($languageFile)) {
             $oneLanguage->edit = $popup->display('<img id="image' . $oneLanguage->language . '" src="' . $edit_image . '" alt="' . JText::_('EDIT_LANGUAGE_FILE', true) . '"/>', 'EDIT_LANGUAGE_FILE', $linkEdit, 'edit_language_' . $oneLanguage->language, 800, 500, '', '', 'link');
         } else {
             $oneLanguage->edit = $popup->display('<img id="image' . $oneLanguage->language . '" src="' . $new_image . '" alt="' . JText::_('ADD_LANGUAGE_FILE', true) . '"/>', 'ADD_LANGUAGE_FILE', $linkEdit, 'edit_language_' . $oneLanguage->language, 800, 500, '', '', 'link');
         }
         $languages[] = $oneLanguage;
     }
     $this->assignRef('languages', $languages);
     $this->toolbar = array('|', 'save', 'apply', 'hikacancel', '|', array('name' => 'pophelp', 'target' => 'config'), 'dashboard');
 }
开发者ID:q0821,项目名称:esportshop,代码行数:56,代码来源:view.html.php

示例3: viewLanguages

/**
* Compiles a list of installed languages
*/
function viewLanguages()
{
    global $mainframe, $option;
    // Initialize some variables
    $db =& JFactory::getDBO();
    $client =& JApplicationHelper::getClientInfo(JRequest::getVar('client', '0', '', 'int'));
    $rows = array();
    $limit = $mainframe->getUserStateFromRequest('global.list.limit', 'limit', $mainframe->getCfg('list_limit'), 'int');
    $limitstart = $mainframe->getUserStateFromRequest($option . '.limitstart', 'limitstart', 0, 'int');
    $rowid = 0;
    // Set FTP credentials, if given
    jimport('joomla.client.helper');
    $ftp =& JClientHelper::setCredentialsFromRequest('ftp');
    //load folder filesystem class
    jimport('joomla.filesystem.folder');
    $path = JLanguage::getLanguagePath($client->path);
    $dirs = JFolder::folders($path);
    foreach ($dirs as $dir) {
        $files = JFolder::files($path . DS . $dir, '^([-_A-Za-z]*)\\.xml$');
        foreach ($files as $file) {
            $data = JApplicationHelper::parseXMLLangMetaFile($path . DS . $dir . DS . $file);
            $row = new StdClass();
            $row->id = $rowid;
            $row->language = substr($file, 0, -4);
            if (!is_array($data)) {
                continue;
            }
            foreach ($data as $key => $value) {
                $row->{$key} = $value;
            }
            // if current than set published
            $params = JComponentHelper::getParams('com_languages');
            if ($params->get($client->name, 'en-GB') == $row->language) {
                $row->published = 1;
            } else {
                $row->published = 0;
            }
            $row->checked_out = 0;
            $row->mosname = JString::strtolower(str_replace(" ", "_", $row->name));
            $rows[] = $row;
            $rowid++;
        }
    }
    jimport('joomla.html.pagination');
    $pageNav = new JPagination($rowid, $limitstart, $limit);
    $rows = array_slice($rows, $pageNav->limitstart, $pageNav->limit);
    HTML_languages::showLanguages($rows, $pageNav, $option, $client, $ftp);
}
开发者ID:jicheng17,项目名称:comanova,代码行数:51,代码来源:admin.languages.php

示例4: array

 /**
  * Returns an annotated list of all front-end or back-end languages
  *
  * @param bool $frontend If true returns front-end languages, if false returns back-end languages
  * @return array The annotated languages array
  */
 function &_getAllLanguages($frontend = true)
 {
     static $_feLanguages;
     static $_beLanguages;
     if ($frontend) {
         if (!$_feLanguages) {
             $_feLanguages = array();
             jimport('joomla.filesystem.folder');
             // Get the site languages
             $langBDir = JLanguage::getLanguagePath(JPATH_SITE);
             $langDirs = JFolder::folders($langBDir);
             for ($i = 0; $i < count($langDirs); $i++) {
                 // Try to find VALID languages, by scanning and parsing their XML files
                 $row = array();
                 $row['language'] = $langDirs[$i];
                 $row['basedir'] = $langBDir;
                 $files = JFolder::files($langBDir . DS . $langDirs[$i], '^([-_A-Za-z]*)\\.xml$');
                 foreach ($files as $file) {
                     $data = JApplicationHelper::parseXMLLangMetaFile($langBDir . DS . $langDirs[$i] . DS . $file);
                     // If we didn't get valid data from the xml file, move on...
                     if (!is_array($data)) {
                         continue;
                     }
                     // Populate the row from the xml meta file
                     foreach ($data as $key => $value) {
                         $row[$key] = $value;
                     }
                     $clientVals =& JApplicationHelper::getClientInfo(0);
                     $lang = JComponentHelper::getParams('com_languages');
                     $row['default'] = $lang->get($clientVals->name, 'en-GB') == basename($row['language']);
                 }
                 if (isset($row['default'])) {
                     $_feLanguages[] = $row;
                 }
             }
         }
         return $_feLanguages;
     } else {
         if (!$_beLanguages) {
             $_beLanguages = array();
             jimport('joomla.filesystem.folder');
             // Get the site languages
             $langBDir = JLanguage::getLanguagePath(JPATH_ADMINISTRATOR);
             $langDirs = JFolder::folders($langBDir);
             for ($i = 0; $i < count($langDirs); $i++) {
                 // Try to find VALID languages, by scanning and parsing their XML files
                 $row = array();
                 $row['language'] = $langDirs[$i];
                 $row['basedir'] = $langBDir;
                 $files = JFolder::files($langBDir . DS . $langDirs[$i], '^([-_A-Za-z]*)\\.xml$');
                 foreach ($files as $file) {
                     $data = JApplicationHelper::parseXMLLangMetaFile($langBDir . DS . $langDirs[$i] . DS . $file);
                     // If we didn't get valid data from the xml file, move on...
                     if (!is_array($data)) {
                         continue;
                     }
                     // Populate the row from the xml meta file
                     foreach ($data as $key => $value) {
                         $row[$key] = $value;
                     }
                     $clientVals =& JApplicationHelper::getClientInfo(1);
                     $lang = JComponentHelper::getParams('com_languages');
                     $row['default'] = $lang->get($clientVals->name, 'en-GB') == basename($row['language']);
                 }
                 if (isset($row['default'])) {
                     $_beLanguages[] = $row;
                 }
             }
         }
         return $_beLanguages;
     }
 }
开发者ID:albertobraschi,项目名称:Hab,代码行数:78,代码来源:extfilter.php

示例5: display


//.........这里部分代码省略.........
        $acyrss_order[] = JHTML::_('select.option', 'mailid', JText::_('ACY_ID'));
        $acyrss_order[] = JHTML::_('select.option', 'subject', JText::_('ACY_TITLE'));
        $elements->acyrss_order = JHTML::_('select.genericlist', $acyrss_order, "config[acyrss_order]", 'size="1"', 'value', 'text', $config->get('acyrss_order', 'senddate'));
        $link = 'index.php?option=com_acymailing&amp;tmpl=component&amp;ctrl=email&amp;task=edit&amp;mailid=confirmation';
        $elements->editConfEmail = '<a class="modal" id="confirmemail"  href="' . $link . '" rel="{handler: \'iframe\', size:{x:800, y:500}}"><button class="acymailing_button_grey" onclick="return false">' . JText::_('EDIT_CONF_MAIL') . '</button></a>';
        $link = 'index.php?option=com_acymailing&amp;tmpl=component&amp;ctrl=email&amp;task=edit&amp;mailid=notification_created';
        $elements->edit_notification_created = '<a class="modal" href="' . $link . '" rel="{handler: \'iframe\', size:{x:800, y:500}}"><button class="acymailing_button_grey" onclick="return false">' . JText::_('EDIT_NOTIFICATION_MAIL') . '</button></a>';
        $link = 'index.php?option=com_acymailing&amp;tmpl=component&amp;ctrl=email&amp;task=edit&amp;mailid=notification_refuse';
        $elements->edit_notification_refuse = '<a class="modal" href="' . $link . '" rel="{handler: \'iframe\', size:{x:800, y:500}}"><button class="acymailing_button_grey" onclick="return false">' . JText::_('EDIT_NOTIFICATION_MAIL') . '</button></a>';
        $link = 'index.php?option=com_acymailing&amp;tmpl=component&amp;ctrl=email&amp;task=edit&amp;mailid=notification_unsuball';
        $elements->edit_notification_unsuball = '<a class="modal" href="' . $link . '" rel="{handler: \'iframe\', size:{x:800, y:500}}"><button class="acymailing_button_grey" onclick="return false">' . JText::_('EDIT_NOTIFICATION_MAIL') . '</button></a>';
        $link = 'index.php?option=com_acymailing&amp;tmpl=component&amp;ctrl=email&amp;task=edit&amp;mailid=notification_unsub';
        $elements->edit_notification_unsub = '<a class="modal" href="' . $link . '" rel="{handler: \'iframe\', size:{x:800, y:500}}"><button class="acymailing_button_grey" onclick="return false">' . JText::_('EDIT_NOTIFICATION_MAIL') . '</button></a>';
        $link = 'index.php?option=com_acymailing&amp;tmpl=component&amp;ctrl=email&amp;task=edit&amp;mailid=notification_contact';
        $elements->edit_notification_contact = '<a class="modal" href="' . $link . '" rel="{handler: \'iframe\', size:{x:800, y:500}}"><button class="acymailing_button_grey" onclick="return false">' . JText::_('EDIT_NOTIFICATION_MAIL') . '</button></a>';
        $link = 'index.php?option=com_acymailing&amp;tmpl=component&amp;ctrl=email&amp;task=edit&amp;mailid=notification_contact_menu';
        $elements->edit_notification_contact_menu = '<a class="modal" href="' . $link . '" rel="{handler: \'iframe\', size:{x:800, y:500}}"><button class="acymailing_button_grey" onclick="return false">' . JText::_('EDIT_NOTIFICATION_MAIL') . '</button></a>';
        $link = 'index.php?option=com_acymailing&amp;tmpl=component&amp;ctrl=email&amp;task=edit&amp;mailid=notification_confirm';
        $elements->edit_notification_confirm = '<a class="modal" href="' . $link . '" rel="{handler: \'iframe\', size:{x:800, y:500}}"><button class="acymailing_button_grey" onclick="return false">' . JText::_('EDIT_NOTIFICATION_MAIL') . '</button></a>';
        $link = 'index.php?option=com_acymailing&amp;tmpl=component&amp;ctrl=email&amp;task=edit&amp;mailid=modif';
        $elements->editModifEmail = '<a class="modal" id="modifemail"  href="' . $link . '" rel="{handler: \'iframe\', size:{x:800, y:500}}"><button class="acymailing_button_grey" onclick="return false">' . JText::_('EDIT_NOTIFICATION_MAIL') . '</button></a>';
        $link = 'index.php?option=com_acymailing&amp;tmpl=component&amp;ctrl=cpanel&amp;task=checkDB';
        $elements->checkDB = '<a class="modal" href="' . $link . '" rel="{handler: \'iframe\', size:{x:800, y:500}}"><button class="acymailing_button_grey" onclick="return false">' . JText::_('DATABASE_INTEGRITY') . '</button></a>';
        $js = "function addUnsubReason(){\n\t\t\tvar input = document.createElement('input');\n\t\t\tinput.name = 'unsub_reasons[]';\n\t\t\tinput.style.width = '300px';\n\t\t\tinput.style.margin = '3px 0px';\n\t\t\tinput.type = 'text';\n\t\t\tdocument.getElementById('unsub_reasons').appendChild(input);\n\t\t\tvar br = document.createElement('br');\n\t\t\tdocument.getElementById('unsub_reasons').appendChild(br);\n\t\t}\n\t\tfunction displaySurvey(surveyval){\n\t\t\tif(surveyval == 1){\n\t\t\t\tdocument.getElementById('unsub_reasons_area').style.display = 'block';\n\t\t\t}else{\n\t\t\t\tdocument.getElementById('unsub_reasons_area').style.display = 'none';\n\t\t\t}\n\t\t}\n\t\t";
        $doc->addScriptDeclaration($js);
        $path = JLanguage::getLanguagePath(JPATH_ROOT);
        $dirs = JFolder::folders($path);
        $languages = array();
        foreach ($dirs as $dir) {
            if (strlen($dir) != 5 || $dir == "xx-XX") {
                continue;
            }
            $xmlFiles = JFolder::files($path . DS . $dir, '^([-_A-Za-z]*)\\.xml$');
            $xmlFile = reset($xmlFiles);
            if (empty($xmlFile)) {
                $data = array();
            } else {
                $data = JApplicationHelper::parseXMLLangMetaFile($path . DS . $dir . DS . $xmlFile);
            }
            $oneLanguage = new stdClass();
            $oneLanguage->language = $dir;
            $oneLanguage->name = empty($data['name']) ? $dir : $data['name'];
            $languageFiles = JFolder::files($path . DS . $dir, '^(.*)\\.com_acymailing\\.ini$');
            $languageFile = reset($languageFiles);
            if (!empty($languageFile)) {
                $linkEdit = 'index.php?option=com_acymailing&amp;tmpl=component&amp;ctrl=file&amp;task=language&amp;code=' . $oneLanguage->language;
                $oneLanguage->edit = ' <a class="modal" title="' . JText::_('EDIT_LANGUAGE_FILE', true) . '"  href="' . $linkEdit . '" rel="{handler: \'iframe\', size:{x:800, y:500}}"><i class="acyicon-edit" id="image' . $oneLanguage->language . '"></i></a>';
            } else {
                $linkEdit = 'index.php?option=com_acymailing&amp;tmpl=component&amp;ctrl=file&amp;task=language&amp;code=' . $oneLanguage->language;
                $oneLanguage->edit = ' <a class="modal" title="' . JText::_('ADD_LANGUAGE_FILE', true) . '"  href="' . $linkEdit . '" rel="{handler: \'iframe\', size:{x:800, y:500}}"><i class="acyicon-new" id="image' . $oneLanguage->language . '"></i></a>';
            }
            $languages[] = $oneLanguage;
        }
        $js = "function updateConfirmation(newvalue){";
        $js .= "if(newvalue == 0) {window.document.getElementById('confirmemail').style.display = 'none'; window.document.getElementById('confirm_redirect').disabled = true;}else{window.document.getElementById('confirmemail').style.display = 'inline'; window.document.getElementById('confirm_redirect').disabled = false;}";
        $js .= '}';
        $js .= "function updateModification(newvalue){ if(newvalue != 'none') {window.document.getElementById('modifemail').style.display = 'none';}else{window.document.getElementById('modifemail').style.display = 'inline';}} ";
        $js .= 'window.addEvent(\'load\', function(){ updateModification(\'' . $config->get('allow_modif', 'data') . '\'); updateConfirmation(' . $config->get('require_confirmation', 0) . '); });';
        $doc->addScriptDeclaration($js);
        $elements->require_confirmation = JHTML::_('acyselect.booleanlist', "config[require_confirmation]", 'onclick="updateConfirmation(this.value)"', $config->get('require_confirmation', 0));
        $allowmodif = array();
        $allowmodif[] = JHTML::_('select.option', "none", JText::_('JOOMEXT_NO'));
        $allowmodif[] = JHTML::_('select.option', "data", JText::_('ONLY_SUBSCRIPTION'));
        $allowmodif[] = JHTML::_('select.option', "all", JText::_('JOOMEXT_YES'));
        $elements->allow_modif = JHTML::_('acyselect.radiolist', $allowmodif, "config[allow_modif]", 'size="1" onclick="updateModification(this.value)"', 'value', 'text', $config->get('allow_modif', 'data'));
        if (!ACYMAILING_J16) {
            $db->setQuery("SELECT name,published,id FROM `#__plugins` WHERE `folder` = 'acymailing' AND `element` NOT LIKE 'plg%' ORDER BY published DESC, ordering ASC");
        } else {
            $db->setQuery("SELECT name,enabled as published,extension_id as id FROM `#__extensions` WHERE `state` <> -1 AND `folder` = 'acymailing' AND `type`= 'plugin' AND `element` NOT LIKE 'plg%' ORDER BY enabled DESC, ordering ASC");
        }
        $plugins = $db->loadObjectList();
        if (!ACYMAILING_J16) {
            $db->setQuery("SELECT name,published,id FROM `#__plugins` WHERE (`folder` != 'acymailing' OR `element` LIKE 'plg%') AND (`name` LIKE '%acymailing%' OR `element` LIKE '%acymailing%') ORDER BY published DESC, ordering ASC");
        } else {
            $db->setQuery("SELECT name,enabled as published ,extension_id as id FROM `#__extensions` WHERE `state` <> -1 AND (`folder` != 'acymailing' OR `element` LIKE 'plg%') AND `type` = 'plugin' AND (`name` LIKE '%acymailing%' OR `element` LIKE '%acymailing%') ORDER BY enabled DESC, ordering ASC");
        }
        $integrationplugins = $db->loadObjectList();
        if (ACYMAILING_J16) {
            $db->setQuery("SELECT COUNT(*) FROM #__extensions WHERE `enabled` = 1 AND `state` = -1 AND `type` = 'plugin' AND (`folder` = 'acymailing' OR `name` LIKE '%acymailing%' OR `element` LIKE '%acymailing%')");
            $discoveredPlugins = $db->loadResult();
            if (!empty($discoveredPlugins)) {
                acymailing_display('Some AcyMailing plugins are placed in the Joomla "Discover" feature and will not work, you should install them through the "Discover" menu in the Extension manager.', 'warning');
            }
        }
        $bounceaction = acymailing_get('type.bounceaction');
        $this->assignRef('bounceaction', $bounceaction);
        $this->assignRef('config', $config);
        $this->assignRef('languages', $languages);
        $this->assignRef('elements', $elements);
        $this->assignRef('plugins', $plugins);
        $this->assignRef('integrationplugins', $integrationplugins);
        $tabs = acymailing_get('helper.acytabs');
        $tabs->setOptions(array('useCookie' => true));
        $this->assignRef('tabs', $tabs);
        $this->assignRef('toggleClass', $toggleClass);
        if (!ACYMAILING_J16 and !file_exists(rtrim(JPATH_SITE, DS) . DS . 'plugins' . DS . 'acymailing' . DS . 'tagsubscriber.php') or ACYMAILING_J16 and !file_exists(rtrim(JPATH_SITE, DS) . DS . 'plugins' . DS . 'acymailing' . DS . 'tagsubscriber' . DS . 'tagsubscriber.php')) {
            acymailing_checkPluginsFolders();
        }
        return parent::display($tpl);
    }
开发者ID:sumithMadhushan,项目名称:joomla-project,代码行数:101,代码来源:view.html.php

示例6: getAllLanguages

 function getAllLanguages()
 {
     jimport('joomla.filesystem.folder');
     $path = JLanguage::getLanguagePath(JPATH_ROOT);
     $dirs = JFolder::folders($path);
     $edit_image = HIKASHOP_IMAGES . 'icons/icon-16-edit.png';
     $new_image = HIKASHOP_IMAGES . 'icons/icon-16-new.png';
     $popup = hikashop_get('helper.popup');
     foreach ($dirs as $dir) {
         $xmlFiles = JFolder::files($path . DS . $dir, '^([-_A-Za-z]*)\\.xml$');
         $xmlFile = array_pop($xmlFiles);
         if ($xmlFile == 'install.xml') {
             $xmlFile = array_pop($xmlFiles);
         }
         if (empty($xmlFile)) {
             continue;
         }
         $data = JApplicationHelper::parseXMLLangMetaFile($path . DS . $dir . DS . $xmlFile);
         $oneLanguage = new stdClass();
         $oneLanguage->language = $dir;
         $oneLanguage->name = $data['name'];
         $languageFiles = JFolder::files($path . DS . $dir, '^(.*)\\.com_hikashop\\.ini$');
         $languageFile = reset($languageFiles);
         if (!empty($languageFile)) {
             $oneLanguage->edit = $popup->display('<img id="image' . $oneLanguage->language . '" src="' . $edit_image . '" alt="' . JText::_('EDIT_LANGUAGE_FILE') . '"/>', 'EDIT_LANGUAGE_FILE', 'index.php?option=com_hikashop&amp;tmpl=component&amp;ctrl=config&amp;task=language&amp;code=' . $oneLanguage->language, 'edit_language_' . $oneLanguage->language, 760, 480, '', '', 'link');
         } else {
             $oneLanguage->edit = $popup->display('<img id="image' . $oneLanguage->language . '" src="' . $new_image . '" alt="' . JText::_('ADD_LANGUAGE_FILE') . '"/>', 'ADD_LANGUAGE_FILE', 'index.php?option=com_hikashop&amp;tmpl=component&amp;ctrl=config&amp;task=language&amp;code=' . $oneLanguage->language, 'edit_language_' . $oneLanguage->language, 760, 480, '', '', 'link');
         }
         $languages[] = $oneLanguage;
     }
     return $languages;
 }
开发者ID:q0821,项目名称:esportshop,代码行数:32,代码来源:translation.php

示例7: getData

 /**
  * Method to get Languages item data.
  *
  * @return  array
  *
  * @since   1.6
  */
 public function getData()
 {
     // Fetch language data if not fetched yet.
     if (is_null($this->data)) {
         $this->data = array();
         // Get information.
         $db = $this->getDbo();
         $query = $db->getQuery(true);
         // Select languages installed from the extensions table.
         $query->select($db->quoteName(array('a.element', 'a.client_id', 'a.extension_id')))->from($db->quoteName('#__extensions', 'a'))->where($db->quoteName('a.type') . ' = ' . $db->quote('language'))->where($db->quoteName('state') . ' = 0')->where($db->quoteName('enabled') . ' = 1');
         // For client_id = 1 do we need to check language table also?
         $db->setQuery($query);
         $langlist = $db->loadObjectList();
         // Compute all the languages.
         foreach ($langlist as $lang) {
             $client = JApplicationHelper::getClientInfo($lang->client_id);
             $clientPath = $lang->client_id === 0 ? JPATH_SITE : JPATH_ADMINISTRATOR;
             $info = JApplicationHelper::parseXMLLangMetaFile($clientPath . '/language/' . $lang->element . '/' . $lang->element . '.xml');
             $row = new StdClass();
             $row->language = $lang->element;
             $row->client_id = (int) $lang->client_id;
             $row->extension_id = (int) $lang->extension_id;
             if (!is_array($info)) {
                 continue;
             }
             foreach ($info as $key => $value) {
                 $row->{$key} = $value;
             }
             // Fix wrongly set parentheses in RTL languages
             if (JFactory::getLanguage()->isRtl()) {
                 $row->name = html_entity_decode($row->name . '&#x200E;', ENT_QUOTES, 'UTF-8');
             }
             // If current than set published.
             $params = JComponentHelper::getParams('com_languages');
             if ($params->get($client->name, 'en-GB') == $row->language) {
                 $row->published = 1;
             } else {
                 $row->published = 0;
             }
             $row->checked_out = 0;
             $this->data[] = $row;
         }
     }
     $installedLanguages = array_merge($this->data);
     // Process filters.
     $clientId = (int) $this->getState('client_id');
     $search = $this->getState('filter.search');
     foreach ($installedLanguages as $key => $installedLanguage) {
         // Filter by client id.
         if (in_array($clientId, array(0, 1))) {
             if ($installedLanguage->client_id !== $clientId) {
                 unset($installedLanguages[$key]);
                 continue;
             }
         }
         // Filter by search term.
         if (!empty($search)) {
             if (stripos($installedLanguage->name, $search) === false && stripos($installedLanguage->language, $search) === false) {
                 unset($installedLanguages[$key]);
                 continue;
             }
         }
     }
     // Process ordering.
     $listOrder = $this->getState('list.ordering', 'name');
     $listDirn = $this->getState('list.direction', 'ASC');
     $installedLanguages = ArrayHelper::sortObjects($installedLanguages, $listOrder, strtolower($listDirn) === 'desc' ? -1 : 1, true, true);
     // Process pagination.
     $limit = (int) $this->getState('list.limit', 25);
     // Sets the total for pagination.
     $this->total = count($installedLanguages);
     if ($limit !== 0) {
         $start = (int) $this->getState('list.start', 0);
         return array_slice($installedLanguages, $start, $limit);
     }
     return $installedLanguages;
 }
开发者ID:jwest00724,项目名称:joomla-cms,代码行数:84,代码来源:installed.php

示例8: display


//.........这里部分代码省略.........
     $acyrss_format[] = JHTML::_('select.option', 'rss', 'RSS feed');
     $acyrss_format[] = JHTML::_('select.option', 'atom', 'Atom feed');
     $acyrss_format[] = JHTML::_('select.option', 'both', JText::_('ACY_ALL'));
     $elements->acyrss_format = JHTML::_('select.genericlist', $acyrss_format, "config[acyrss_format]", 'size="1"', 'value', 'text', $config->get('acyrss_format', ''));
     $acyrss_order = array();
     $acyrss_order[] = JHTML::_('select.option', 'senddate', JText::_('SEND_DATE'));
     $acyrss_order[] = JHTML::_('select.option', 'mailid', JText::_('ACY_ID'));
     $acyrss_order[] = JHTML::_('select.option', 'subject', JText::_('ACY_TITLE'));
     $elements->acyrss_order = JHTML::_('select.genericlist', $acyrss_order, "config[acyrss_order]", 'size="1"', 'value', 'text', $config->get('acyrss_order', 'senddate'));
     $link = 'index.php?option=com_acymailing&amp;tmpl=component&amp;ctrl=email&amp;task=edit&amp;mailid=confirmation';
     $elements->editConfEmail = '<a class="modal" id="confirmemail"  href="' . $link . '" rel="{handler: \'iframe\', size:{x:800, y:500}}"><button onclick="return false">' . JText::_('EDIT_CONF_MAIL') . '</button></a>';
     $link = 'index.php?option=com_acymailing&amp;tmpl=component&amp;ctrl=email&amp;task=edit&amp;mailid=notification_created';
     $elements->edit_notification_created = '<a class="modal" href="' . $link . '" rel="{handler: \'iframe\', size:{x:800, y:500}}"><button onclick="return false">' . JText::_('EDIT_NOTIFICATION_MAIL') . '</button></a>';
     $link = 'index.php?option=com_acymailing&amp;tmpl=component&amp;ctrl=email&amp;task=edit&amp;mailid=notification_refuse';
     $elements->edit_notification_refuse = '<a class="modal" href="' . $link . '" rel="{handler: \'iframe\', size:{x:800, y:500}}"><button onclick="return false">' . JText::_('EDIT_NOTIFICATION_MAIL') . '</button></a>';
     $link = 'index.php?option=com_acymailing&amp;tmpl=component&amp;ctrl=email&amp;task=edit&amp;mailid=notification_unsuball';
     $elements->edit_notification_unsuball = '<a class="modal" href="' . $link . '" rel="{handler: \'iframe\', size:{x:800, y:500}}"><button onclick="return false">' . JText::_('EDIT_NOTIFICATION_MAIL') . '</button></a>';
     $link = 'index.php?option=com_acymailing&amp;tmpl=component&amp;ctrl=email&amp;task=edit&amp;mailid=notification_unsub';
     $elements->edit_notification_unsub = '<a class="modal" href="' . $link . '" rel="{handler: \'iframe\', size:{x:800, y:500}}"><button onclick="return false">' . JText::_('EDIT_NOTIFICATION_MAIL') . '</button></a>';
     $link = 'index.php?option=com_acymailing&amp;tmpl=component&amp;ctrl=email&amp;task=edit&amp;mailid=modif';
     $elements->editModifEmail = '<a class="modal" id="modifemail"  href="' . $link . '" rel="{handler: \'iframe\', size:{x:800, y:500}}"><button onclick="return false">' . JText::_('EDIT_NOTIFICATION_MAIL') . '</button></a>';
     $path = JLanguage::getLanguagePath(JPATH_ROOT);
     $dirs = JFolder::folders($path);
     $languages = array();
     foreach ($dirs as $dir) {
         if (strlen($dir) != 5 || $dir == "xx-XX") {
             continue;
         }
         $xmlFiles = JFolder::files($path . DS . $dir, '^([-_A-Za-z]*)\\.xml$');
         $xmlFile = reset($xmlFiles);
         if (empty($xmlFile)) {
             $data = array();
         } else {
             $data = JApplicationHelper::parseXMLLangMetaFile($path . DS . $dir . DS . $xmlFile);
         }
         $oneLanguage = null;
         $oneLanguage->language = $dir;
         $oneLanguage->name = empty($data['name']) ? $dir : $data['name'];
         $languageFiles = JFolder::files($path . DS . $dir, '^(.*)\\.com_acymailing\\.ini$');
         $languageFile = reset($languageFiles);
         if (!empty($languageFile)) {
             $linkEdit = 'index.php?option=com_acymailing&amp;tmpl=component&amp;ctrl=file&amp;task=language&amp;code=' . $oneLanguage->language;
             $oneLanguage->edit = ' <a class="modal" title="' . JText::_('EDIT_LANGUAGE_FILE', true) . '"  href="' . $linkEdit . '" rel="{handler: \'iframe\', size:{x:800, y:500}}"><img id="image' . $oneLanguage->language . '" class="icon16" src="' . ACYMAILING_IMAGES . 'icons/icon-16-edit.png" alt="' . JText::_('EDIT_LANGUAGE_FILE', true) . '"/></a>';
         } else {
             $linkEdit = 'index.php?option=com_acymailing&amp;tmpl=component&amp;ctrl=file&amp;task=language&amp;code=' . $oneLanguage->language;
             $oneLanguage->edit = ' <a class="modal" title="' . JText::_('ADD_LANGUAGE_FILE', true) . '"  href="' . $linkEdit . '" rel="{handler: \'iframe\', size:{x:800, y:500}}"><img id="image' . $oneLanguage->language . '" class="icon16"  src="' . ACYMAILING_IMAGES . 'icons/icon-16-add.png" alt="' . JText::_('ADD_LANGUAGE_FILE', true) . '"/></a>';
         }
         $languages[] = $oneLanguage;
     }
     $js = "function updateConfirmation(newvalue){";
     $js .= "if(newvalue == 0) {window.document.getElementById('confirmemail').style.display = 'none'; window.document.getElementById('confirm_redirect').disabled = true;}else{window.document.getElementById('confirmemail').style.display = 'inline'; window.document.getElementById('confirm_redirect').disabled = false;}";
     $js .= '}';
     $js .= "function updateModification(newvalue){ if(newvalue != 'none') {window.document.getElementById('modifemail').style.display = 'none';}else{window.document.getElementById('modifemail').style.display = 'inline';}} ";
     $js .= 'window.addEvent(\'load\', function(){ updateModification(\'' . $config->get('allow_modif', 'data') . '\'); updateConfirmation(' . $config->get('require_confirmation', 0) . '); });';
     $doc->addScriptDeclaration($js);
     $elements->require_confirmation = JHTML::_('select.booleanlist', "config[require_confirmation]", 'onclick="updateConfirmation(this.value)"', $config->get('require_confirmation', 0));
     $allowmodif = array();
     $allowmodif[] = JHTML::_('select.option', "none", JText::_('JOOMEXT_NO'));
     $allowmodif[] = JHTML::_('select.option', "data", JText::_('ONLY_SUBSCRIPTION'));
     $allowmodif[] = JHTML::_('select.option', "all", JText::_('JOOMEXT_YES'));
     $elements->allow_modif = JHTML::_('select.radiolist', $allowmodif, "config[allow_modif]", 'size="1" onclick="updateModification(this.value)"', 'value', 'text', $config->get('allow_modif', 'data'));
     if (version_compare(JVERSION, '1.6.0', '<')) {
         $db->setQuery("SELECT name,published,id FROM `#__plugins` WHERE `folder` = 'acymailing' AND `element` NOT LIKE 'plg%' ORDER BY published DESC, ordering ASC");
     } else {
         $db->setQuery("SELECT name,enabled as published,extension_id as id FROM `#__extensions` WHERE `folder` = 'acymailing' AND `type`= 'plugin' AND `element` NOT LIKE 'plg%' ORDER BY enabled DESC, ordering ASC");
     }
开发者ID:andreassetiawanhartanto,项目名称:PDKKI,代码行数:67,代码来源:view.html.php

示例9: array

 /**
  * Method to get Languages item data
  *
  * @return	array
  * @since	1.6
  */
 public function &getData()
 {
     if (is_null($this->data)) {
         // Get information
         $path = $this->getPath();
         $client = $this->getClient();
         $langlist = $this->getLanguageList();
         // Compute all the languages
         $data = array();
         foreach ($langlist as $lang) {
             $file = $path . '/' . $lang . '/' . $lang . '.xml';
             $file = file_exists(PATH_APP . $file) ? PATH_APP . $file : PATH_CORE . $file;
             $info = JApplicationHelper::parseXMLLangMetaFile($file);
             $row = new \Hubzero\Base\Object();
             $row->language = $lang;
             if (!is_array($info)) {
                 continue;
             }
             foreach ($info as $key => $value) {
                 $row->{$key} = $value;
             }
             // if current than set published
             $params = Component::params('com_languages');
             if ($params->get($client->name, 'en-GB') == $row->language) {
                 $row->published = 1;
             } else {
                 $row->published = 0;
             }
             $row->checked_out = 0;
             $data[] = $row;
         }
         usort($data, array($this, 'compareLanguages'));
         // Prepare data
         $limit = $this->getState('list.limit');
         $start = $this->getState('list.start');
         $total = $this->getTotal();
         if ($limit == 0) {
             $start = 0;
             $end = $total;
         } else {
             if ($start > $total) {
                 $start = $total - $total % $limit;
             }
             $end = $start + $limit;
             if ($end > $total) {
                 $end = $total;
             }
         }
         // Compute the displayed languages
         $this->data = array();
         for ($i = $start; $i < $end; $i++) {
             $this->data[] =& $data[$i];
         }
     }
     return $this->data;
 }
开发者ID:mined-gatech,项目名称:hubzero-cms,代码行数:62,代码来源:installed.php

示例10: getLanguages

 function getLanguages($client = 0)
 {
     $client = JApplicationHelper::getClientInfo($client);
     $path = JLanguage::getLanguagePath($client->path);
     $dirs = JFolder::folders($path);
     $i = 0;
     $data['name'] = '';
     foreach ($dirs as $dir) {
         $files = JFolder::files($path . DS . $dir, '^([-_A-Za-z]*)\\.xml$');
         foreach ($files as $file) {
             $data = JApplicationHelper::parseXMLLangMetaFile($path . DS . $dir . DS . $file);
             $row = new StdClass();
             $row->id = $i;
             $row->language = substr($file, 0, -4);
             if (!is_array($data)) {
                 continue;
             }
             foreach ($data as $key => $value) {
                 $row->{$key} = $value;
             }
             $rows[] = $row;
         }
         $i++;
     }
     return $rows;
 }
开发者ID:jomsocial,项目名称:JSVoice,代码行数:26,代码来源:emailtemplates.php

示例11: getLanguageCodes

 public static function getLanguageCodes()
 {
     static $langs;
     if (is_array($langs)) {
         return $langs;
     }
     $db = JFactory::getDBO();
     jimport('joomla.version');
     $version = new JVersion();
     if (version_compare($version->getShortVersion(), '1.6', '<')) {
         $langs = array();
         $client =& JApplicationHelper::getClientInfo(0);
         jimport('joomla.filesystem.folder');
         $path = JLanguage::getLanguagePath($client->path);
         $dirs = JFolder::folders($path);
         jimport('joomla.filesystem.folder');
         $path = JLanguage::getLanguagePath($client->path);
         $dirs = JFolder::folders($path);
         foreach ($dirs as $dir) {
             $files = JFolder::files($path . DS . $dir, '^([-_A-Za-z]*)\\.xml$');
             foreach ($files as $file) {
                 $data = JApplicationHelper::parseXMLLangMetaFile($path . DS . $dir . DS . $file);
                 $language = substr($file, 0, -4);
                 if (!is_array($data)) {
                     continue;
                 }
                 // if current than set published
                 $params = JComponentHelper::getParams('com_languages');
                 //if ( $params->get($client->name, 'en-GB') == $language) {
                 $langs[] = $language;
                 //}
             }
         }
         return $langs;
     } else {
         $db->setQuery("Select lang_code From #__languages Where published = 1 Order By ordering");
         $langs = CBCompat::loadColumn();
         return $langs;
     }
 }
开发者ID:ranrolls,项目名称:ras-full-portal,代码行数:40,代码来源:contentbuilder.php

示例12: array

 /**
  * Method to get Languages item data
  *
  * @return array
  */
 public function &getData()
 {
     if (is_null($this->data)) {
         // Get information
         $folders =& $this->_getFolders();
         $path =& $this->_getPath();
         $client =& $this->getClient();
         // Compute all the languages
         $data = array();
         foreach ($folders as $folder) {
             $file = $path . DS . $folder . DS . $folder . '.xml';
             $info =& JApplicationHelper::parseXMLLangMetaFile($file);
             $row = new JObject();
             $row->language = $folder;
             if (!is_array($info)) {
                 continue;
             }
             foreach ($info as $key => $value) {
                 $row->{$key} = $value;
             }
             // if current than set published
             $params =& JComponentHelper::getParams('com_languages');
             if ($params->get($client->name, 'en-GB') == $row->language) {
                 $row->published = 1;
             } else {
                 $row->published = 0;
             }
             $row->checked_out = 0;
             $data[] = $row;
         }
         usort($data, array('LanguagesModelInstalled', '_compareLanguages'));
         // Prepare data
         $limit = $this->getState('list.limit');
         $start = $this->getState('list.start');
         $total = $this->getTotal();
         if ($limit == 0) {
             $start = 0;
             $end = $total;
         } else {
             if ($start > $total) {
                 $start = $total - $total % $limit;
             }
             $end = $start + $limit;
             if ($end > $total) {
                 $end = $total;
             }
         }
         // Compute the displayed languages
         $this->data = array();
         for ($i = $start; $i < $end; $i++) {
             $this->data[] =& $data[$i];
         }
     }
     return $this->data;
 }
开发者ID:joebushi,项目名称:joomla,代码行数:60,代码来源:installed.php

示例13: show_list

 /**
  * Compiles a list of installed languages
  */
 function show_list()
 {
     $option = JRequest::getCmd('option');
     $mainframe = JFactory::getApplication();
     // Initialize some variables
     $db = JFactory::getDBO();
     $client = JApplicationHelper::getClientInfo(JRequest::getVar('client', '0', '', 'int'));
     $rows = array();
     $limit = $mainframe->getUserStateFromRequest('global.list.limit', 'limit', $mainframe->getCfg('list_limit'), 'int');
     $limitstart = $mainframe->getUserStateFromRequest($option . '.limitstart', 'limitstart', 0, 'int');
     //load folder filesystem class
     $path = JLanguage::getLanguagePath($client->path);
     $dirs = JFolder::folders($path);
     $i = 0;
     $data['name'] = '';
     foreach ($dirs as $dir) {
         $files = JFolder::files($path . DS . $dir, '^([-_A-Za-z]*)\\.xml$');
         foreach ($files as $file) {
             $data = JApplicationHelper::parseXMLLangMetaFile($path . DS . $dir . DS . $file);
             $row = new StdClass();
             $row->id = $i;
             $row->language = substr($file, 0, -4);
             if (!is_array($data)) {
                 continue;
             }
             foreach ($data as $key => $value) {
                 $row->{$key} = $value;
             }
             // if current than set published
             $params = JComponentHelper::getParams('com_languages');
             if ($params->get($client->name, 'en-GB') == $row->language) {
                 $row->published = 1;
             } else {
                 $row->published = 0;
             }
             $row->checked_out = 0;
             $row->mosname = JString::strtolower(str_replace(" ", "_", $row->name));
             $rows[] = $row;
         }
         $i++;
     }
     jimport('joomla.html.pagination');
     $pageNav = new JPagination($i, $limitstart, $limit);
     $rows = array_slice($rows, $pageNav->limitstart, $pageNav->limit);
     $this->assignRef('rows', $rows);
     $this->assignRef('page', $pageNav);
     $this->assignRef('client', $client);
 }
开发者ID:jomsocial,项目名称:JSVoice,代码行数:51,代码来源:view.html.php

示例14: display


//.........这里部分代码省略.........
         $informations->website = str_replace('~', 'tildsymb', ACYMAILING_LIVE);
         $informations->component = 'acymailing';
         $informations->cronurl = str_replace('~', 'tildsymb', $elements->cron_url);
         $infos = urlencode(base64_encode(serialize($informations)));
         $urlCron = 'http://www.acyba.com/index.php?option=com_doc&gtask=launcher&task=edit&infos=' . $infos;
         $elements->cron_edit = '<a class="modal" href="' . $urlCron . '" rel="{handler: \'iframe\', size: {x: 800, y: 500}}"><button onclick="return false">' . JText::_('CREATE_CRON') . '</button></a>';
     }
     $link = 'index.php?option=com_acymailing&amp;tmpl=component&amp;ctrl=email&amp;task=edit&amp;mailid=confirmation';
     $elements->editConfEmail = '<a class="modal" id="confirmemail"  href="' . $link . '" rel="{handler: \'iframe\', size: {x: 800, y: 500}}"><button onclick="return false">' . JText::_('EDIT_CONF_MAIL') . '</button></a>';
     $link = 'index.php?option=com_acymailing&amp;tmpl=component&amp;ctrl=email&amp;task=edit&amp;mailid=notification_created';
     $elements->edit_notification_created = '<a class="modal" href="' . $link . '" rel="{handler: \'iframe\', size: {x: 800, y: 500}}"><button onclick="return false">' . JText::_('EDIT_NOTIFICATION_MAIL') . '</button></a>';
     $link = 'index.php?option=com_acymailing&amp;tmpl=component&amp;ctrl=email&amp;task=edit&amp;mailid=notification_refuse';
     $elements->edit_notification_refuse = '<a class="modal" href="' . $link . '" rel="{handler: \'iframe\', size: {x: 800, y: 500}}"><button onclick="return false">' . JText::_('EDIT_NOTIFICATION_MAIL') . '</button></a>';
     $link = 'index.php?option=com_acymailing&amp;tmpl=component&amp;ctrl=email&amp;task=edit&amp;mailid=notification_unsuball';
     $elements->edit_notification_unsuball = '<a class="modal" href="' . $link . '" rel="{handler: \'iframe\', size: {x: 800, y: 500}}"><button onclick="return false">' . JText::_('EDIT_NOTIFICATION_MAIL') . '</button></a>';
     $link = 'index.php?option=com_acymailing&amp;tmpl=component&amp;ctrl=email&amp;task=edit&amp;mailid=notification_unsub';
     $elements->edit_notification_unsub = '<a class="modal" href="' . $link . '" rel="{handler: \'iframe\', size: {x: 800, y: 500}}"><button onclick="return false">' . JText::_('EDIT_NOTIFICATION_MAIL') . '</button></a>';
     $link = 'index.php?option=com_acymailing&amp;tmpl=component&amp;ctrl=email&amp;task=edit&amp;mailid=modif';
     $elements->editModifEmail = '<a class="modal" id="modifemail"  href="' . $link . '" rel="{handler: \'iframe\', size: {x: 800, y: 500}}"><button onclick="return false">' . JText::_('EDIT_NOTIFICATION_MAIL') . '</button></a>';
     if (acymailing::level(3)) {
         $elements->bounce = JHTML::_('select.booleanlist', "config[bounce]", '', $config->get('bounce', 0));
         $connectionType = acymailing::get('type.connection');
         $elements->bounce_connection = $connectionType->display('config[bounce_connection]', $config->get('bounce_connection', 'imap'));
         $elements->bounce_secured = $secured->display("config[bounce_secured]", $config->get('bounce_secured'));
         $elements->bounce_certif = JHTML::_('select.booleanlist', "config[bounce_certif]", '', $config->get('bounce_certif', 0));
         $this->assignRef('emailaction', acymailing::get('type.emailaction'));
         $js = "function updateConfirmation(newvalue){";
         $js .= "if(newvalue == 0) {window.document.getElementById('confirmemail').style.display = 'none'; window.document.getElementById('confirm_redirect').disabled = true;}else{window.document.getElementById('confirmemail').style.display = 'inline'; window.document.getElementById('confirm_redirect').disabled = false;}";
         $js .= '}';
         $js .= "function displayBounceFrequency(newvalue){ if(newvalue == '1') {window.document.getElementById('bouncefrequency').style.display = 'block';}else{window.document.getElementById('bouncefrequency').style.display = 'none';}} ";
         $js .= 'window.addEvent(\'load\', function(){ displayBounceFrequency(\'' . $config->get('auto_bounce', 0) . '\');});';
         $doc =& JFactory::getDocument();
         $doc->addScriptDeclaration($js);
     }
     jimport('joomla.filesystem.folder');
     $path = JLanguage::getLanguagePath(JPATH_ROOT);
     $dirs = JFolder::folders($path);
     foreach ($dirs as $dir) {
         $xmlFiles = JFolder::files($path . DS . $dir, '^([-_A-Za-z]*)\\.xml$');
         $xmlFile = reset($xmlFiles);
         if (empty($xmlFile)) {
             continue;
         }
         $data = JApplicationHelper::parseXMLLangMetaFile($path . DS . $dir . DS . $xmlFile);
         $oneLanguage = null;
         $oneLanguage->language = $dir;
         $oneLanguage->name = $data['name'];
         $languageFiles = JFolder::files($path . DS . $dir, '^(.*)\\.com_acymailing\\.ini$');
         $languageFile = reset($languageFiles);
         if (!empty($languageFile)) {
             $linkEdit = 'index.php?option=com_acymailing&amp;tmpl=component&amp;ctrl=file&amp;task=language&amp;code=' . $oneLanguage->language;
             $oneLanguage->edit = '<a class="modal" title="' . JText::_('EDIT_LANGUAGE_FILE', true) . '"  href="' . $linkEdit . '" rel="{handler: \'iframe\', size: {x: 800, y: 500}}"><img id="image' . $oneLanguage->language . '" src="../images/M_images/edit.png" alt="' . JText::_('EDIT_LANGUAGE_FILE', true) . '"/></a>';
         } else {
             $linkEdit = 'index.php?option=com_acymailing&amp;tmpl=component&amp;ctrl=file&amp;task=language&amp;code=' . $oneLanguage->language;
             $oneLanguage->edit = '<a class="modal" title="' . JText::_('ADD_LANGUAGE_FILE', true) . '"  href="' . $linkEdit . '" rel="{handler: \'iframe\', size: {x: 800, y: 500}}"><img id="image' . $oneLanguage->language . '" src="../images/M_images/new.png" alt="' . JText::_('ADD_LANGUAGE_FILE', true) . '"/></a>';
         }
         $languages[] = $oneLanguage;
     }
     $js = "function updateConfirmation(newvalue){";
     $js .= "if(newvalue == 0) {window.document.getElementById('confirmemail').style.display = 'none'; window.document.getElementById('confirm_redirect').disabled = true;}else{window.document.getElementById('confirmemail').style.display = 'inline'; window.document.getElementById('confirm_redirect').disabled = false;}";
     $js .= '}';
     $js .= "function updateModification(newvalue){ if(newvalue != 'none') {window.document.getElementById('modifemail').style.display = 'none';}else{window.document.getElementById('modifemail').style.display = 'inline';}} ";
     $js .= 'window.addEvent(\'load\', function(){ updateModification(\'' . $config->get('allow_modif', 'data') . '\'); updateConfirmation(' . $config->get('require_confirmation', 0) . '); });';
     $doc =& JFactory::getDocument();
     $doc->addScriptDeclaration($js);
     $elements->require_confirmation = JHTML::_('select.booleanlist', "config[require_confirmation]", 'onclick="updateConfirmation(this.value)"', $config->get('require_confirmation', 0));
     $allowmodif = array();
     $allowmodif[] = JHTML::_('select.option', "none", JText::_('JOOMEXT_NO'));
     $allowmodif[] = JHTML::_('select.option', "data", JText::_('ONLY_SUBSCRIPTION'));
     $allowmodif[] = JHTML::_('select.option', "all", JText::_('JOOMEXT_YES'));
     $elements->allow_modif = JHTML::_('select.radiolist', $allowmodif, "config[allow_modif]", 'size="1" onclick="updateModification(this.value)"', 'value', 'text', $config->get('allow_modif', 'data'));
     $delayType2 = acymailing::get('type.delay');
     $elements->queue_delay = $delayType2->display('config[queue_delay]', $config->get('queue_delay', 0), 2);
     $db->setQuery("SELECT name,published,id FROM `#__plugins` WHERE `folder` = 'acymailing' AND `element` NOT LIKE 'plg%' ORDER BY published DESC, ordering ASC");
     $plugins = $db->loadObjectList();
     $db->setQuery("SELECT name,published,id FROM `#__plugins` WHERE (`folder` != 'acymailing' OR `element` LIKE 'plg%') AND (`name` LIKE '%acymailing%' OR `element` LIKE '%acymailing%') ORDER BY published DESC, ordering ASC");
     $integrationplugins = $db->loadObjectList();
     $this->assignRef('bounceaction', acymailing::get('type.bounceaction'));
     $this->assignRef('config', $config);
     $this->assignRef('languages', $languages);
     $this->assignRef('elements', $elements);
     $this->assignRef('plugins', $plugins);
     $this->assignRef('integrationplugins', $integrationplugins);
     $toggleClass = acymailing::get('helper.toggle');
     jimport('joomla.html.pane');
     $tabs =& JPane::getInstance('tabs');
     $this->assignRef('tabs', $tabs);
     $this->assignRef('toggleClass', $toggleClass);
     if (!file_exists(ACYMAILING_FRONT . 'images' . DS . 'icons' . DS . 'icon-32-apply.png') || !file_exists(ACYMAILING_FRONT . 'images' . DS . 'icons' . DS . 'icon-32-edit.png') and file_exists(rtrim(JPATH_ADMINISTRATOR, DS) . DS . 'templates' . DS . 'khepri' . DS . 'images' . DS . 'toolbar' . DS . 'icon-32-apply.png')) {
         $images = array('icon-32-apply.png', 'icon-32-save.png', 'icon-32-cancel.png', 'icon-32-send.png', 'icon-32-preview.png', 'icon-32-edit.png');
         jimport('joomla.filesystem.file');
         foreach ($images as $oneImage) {
             JFile::copy(rtrim(JPATH_ADMINISTRATOR, DS) . DS . 'templates' . DS . 'khepri' . DS . 'images' . DS . 'toolbar' . DS . $oneImage, ACYMAILING_FRONT . 'images' . DS . 'icons' . DS . $oneImage);
         }
     }
     if (!file_exists(rtrim(JPATH_SITE, DS) . DS . 'plugins' . DS . 'acymailing' . DS . 'tagsubscriber.php')) {
         acymailing::display(JText::sprintf('ERROR_PLUGINS', 'index.php?option=com_acymailing&amp;ctrl=update&amp;task=install'), 'warning');
     }
     return parent::display($tpl);
 }
开发者ID:rlee1962,项目名称:diylegalcenter,代码行数:101,代码来源:view.html.php

示例15: getAllLanguages

/**
* get system language
* 
* @param int $client (0 - site, 1 - admin)
*/
function getAllLanguages($client = 0)
{
    $pattern = '#(.*?)\\(#is';
    $client = JApplicationHelper::getClientInfo($client);
    $rows = array();
    jimport('joomla.filesystem.folder');
    $path = JLanguage::getLanguagePath($client->path);
    $dirs = JFolder::folders($path);
    foreach ($dirs as $dir) {
        $files = JFolder::files($path . '/' . $dir, '^([-_A-Za-z]*)\\.xml$');
        foreach ($files as $file) {
            $data = JApplicationHelper::parseXMLLangMetaFile($path . '/' . $dir . '/' . $file);
            $row = new StdClass();
            $row->descr = $data['name'];
            $row->language = substr($file, 0, -4);
            $row->lang = substr($row->language, 0, 2);
            $row->name = $data['name'];
            preg_match($pattern, $row->name, $matches);
            if (isset($matches[1])) {
                $row->name = trim($matches[1]);
            }
            if (!is_array($data)) {
                continue;
            }
            $rows[] = $row;
        }
    }
    return $rows;
}
开发者ID:JexyRu,项目名称:jshop-updates,代码行数:34,代码来源:functions.php


注:本文中的JApplicationHelper::parseXMLLangMetaFile方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。