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


PHP JEVHelper::loadLanguage方法代码示例

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


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

示例1: ajax

    function ajax()
    {
        $modid = intval(JRequest::getVar('modid', 0));
        if ($modid <= 0) {
            echo "<script>alert('bad mod id');</script>";
            return;
        }
        // load language constants
        JEVHelper::loadLanguage('modcal');
        list($year, $month, $day) = JEVHelper::getYMD();
        $user = JFactory::getUser();
        $query = "SELECT id, params" . "\n FROM #__modules AS m" . "\n WHERE m.published = 1" . "\n AND m.id = " . $modid . "\n AND m.access  " . (version_compare(JVERSION, '1.6.0', '>=') ? ' IN (' . JEVHelper::getAid($user, 'string') . ')' : ' <=  ' . JEVHelper::getAid($user)) . "\n AND m.client_id != 1";
        $db =& JFactory::getDBO();
        $db->setQuery($query);
        $modules = $db->loadObjectList();
        if (count($modules) <= 0) {
            if (!$modid <= 0) {
                echo "<script>alert('bad mod id');</script>";
                return;
            }
        }
        $params = new JParameter($modules[0]->params);
        $cfg =& JEVConfig::getInstance();
        $theme = JEV_CommonFunctions::getJEventsViewName();
        $theme = $params->get("com_calViewName", $theme);
        $modtheme = $params->get("com_calViewName", $theme);
        if ($modtheme == "") {
            $modtheme = $theme;
        }
        $theme = $modtheme;
        //require(JModuleHelper::getLayoutPath('mod_jevents_cal',$theme.DS."calendar"));
        require_once JPATH_SITE . '/modules/mod_jevents_cal/helper.php';
        $jevhelper = new modJeventsCalHelper();
        $viewclass = $jevhelper->getViewClass($theme, 'mod_jevents_cal', $theme . DS . "calendar", $params);
        $modview = new $viewclass($params, $modid);
        ?>
		<script type="text/javascript">
		var doitdone = false;
		function doit(){
			if (doitdone) return;
			doitdone = true;
			var sillydiv=document.getElementById('silly');
			parent.navLoaded(sillydiv,<?php 
        echo $modid;
        ?>
);
		}
		window.onload=doit;
		</script>
		<?php 
        echo "<div id='silly'>";
        echo $modview->getAjaxCal($modid, $month, $year);
        echo "</div>";
        ?>
		<script type="text/javascript">
		doit();
		</script>
		<?php 
    }
开发者ID:madseller,项目名称:coperio,代码行数:59,代码来源:modcal.php

示例2: modJeventsLegendHelper

 function modJeventsLegendHelper()
 {
     // setup for all required function and classes
     $file = JPATH_SITE . '/components/com_jevents/mod.defines.php';
     if (file_exists($file)) {
         include_once $file;
         include_once JEV_LIBS . "/modfunctions.php";
     } else {
         die("JEvents Calendar\n<br />This module needs the JEvents component");
     }
     // load language constants
     JEVHelper::loadLanguage('modcal');
 }
开发者ID:madcsaba,项目名称:li-de,代码行数:13,代码来源:helper.php

示例3: modJeventsLatestHelper

 function modJeventsLatestHelper()
 {
     // setup for all required function and classes
     $file = JPATH_SITE . '/components/com_jevents/mod.defines.php';
     if (file_exists($file)) {
         include_once $file;
         include_once JPATH_SITE . "/components/com_jevents/libraries/modfunctions.php";
     } else {
         die(JText::_('JEV_LATEST_NEEDS_COMPONENT'));
     }
     // load language constants
     JEVHelper::loadLanguage('modlatest');
 }
开发者ID:brojask,项目名称:colegio-abogados-joomla,代码行数:13,代码来源:helper.php

示例4: ajax

    function ajax()
    {
        $modid = intval(JRequest::getVar('modid', 0));
        if ($modid <= 0) {
            echo "<script>alert('bad mod id');</script>";
            return;
        }
        // load language constants
        JEVHelper::loadLanguage('modcal');
        list($year, $month, $day) = JEVHelper::getYMD();
        $user = JFactory::getUser();
        $query = "SELECT id, params" . "\n FROM #__modules AS m" . "\n WHERE m.published = 1" . "\n AND m.id = " . $modid . "\n AND m.access IN (" . JEVHelper::getAid($user, 'string') . ")" . "\n AND m.client_id != 1";
        $db = JFactory::getDBO();
        $db->setQuery($query);
        $modules = $db->loadObjectList();
        if (count($modules) <= 0) {
            if (!$modid <= 0) {
                echo "<script>alert('bad mod id');</script>";
                return;
            }
        }
        $params = new JRegistry($modules[0]->params);
        $cfg = JEVConfig::getInstance();
        $theme = JEV_CommonFunctions::getJEventsViewName();
        $comptheme = $params->get("com_calViewName", "global");
        $theme = $comptheme == "global" ? $theme : $comptheme;
        $modtheme = $params->get("com_calViewName", $theme);
        if ($modtheme == "" || $modtheme == "global") {
            $modtheme = $theme;
        }
        $theme = $modtheme;
        //require(JModuleHelper::getLayoutPath('mod_jevents_cal',$theme.'/'."calendar"));
        require_once JPATH_SITE . '/modules/mod_jevents_cal/helper.php';
        $jevhelper = new modJeventsCalHelper();
        $viewclass = $jevhelper->getViewClass($theme, 'mod_jevents_cal', $theme . '/' . "calendar", $params);
        $modview = new $viewclass($params, $modid);
        $modview->jevlayout = $theme;
        $content = $modview->getAjaxCal($modid, $month, $year);
        $content = str_replace("<script style='text/javascript'>xyz=1;", "XYZ", $content);
        $content = str_replace("zyx=1;</script>", "ZYX", $content);
        preg_match("/XYZ(.*)ZYX/s", $content, $match);
        $script = "";
        if (isset($match[1])) {
            $script = $match[1];
            $content = str_replace($match[0], "", $content);
        }
        $json = array("data" => $content, "modid" => $modid, "script" => $script);
        ob_end_clean();
        ob_end_flush();
        if (JRequest::getCmd("callback", 0)) {
            echo JRequest::getCmd("callback", 0) . "(" . json_encode($json), ");";
            exit;
        } else {
            if (JRequest::getInt("json") == 1) {
                echo json_encode($json);
                exit;
            } else {
                ?>
		<script type="text/javascript">
		var doitdone = false;
		function doit(){
			if (doitdone) return;
			doitdone = true;
			var sillydiv=document.getElementById('silly');
			parent.navLoaded(sillydiv,<?php 
                echo $modid;
                ?>
);
		}
		window.onload=doit;
		</script>
		<?php 
                echo "<div id='silly'>";
                echo $modview->getAjaxCal($modid, $month, $year);
                echo "</div>";
                ?>
		<script type="text/javascript">
		doit();
		</script>
		<?php 
            }
        }
    }
开发者ID:poorgeek,项目名称:JEvents,代码行数:83,代码来源:modcal.php

示例5: getEvents

 function getEvents(&$params)
 {
     // Reuse existing language file from JomSocial
     $language = JFactory::getLanguage();
     $language->load('com_jevents', JPATH_ROOT);
     $query_start_date = null;
     $query_end_date = null;
     if ($params->get('time_range') == 'time_span' || $params->get('rangespan') != 'all_events') {
         $query_start_date = $params->get('startmin');
         $startMax = $params->get('startmax', false);
         if ($startMax !== false) {
             $query_end_date = $startMax;
         }
     }
     // setup for all required function and classes
     $file = JPATH_SITE . '/components/com_jevents/mod.defines.php';
     if (file_exists($file)) {
         include_once $file;
         include_once JEV_LIBS . "/modfunctions.php";
     } else {
         die("JEvents Calendar\n<br />This module needs the JEvents component");
     }
     // load language constants
     JEVHelper::loadLanguage('modlatest');
     $datamodel = new JEventsDataModel();
     $showrepeats = $params->get('jevents_norepeats', 0) == 0 ? true : false;
     //$myItemid = $this->datamodel->setupModuleCatids($this->modparams);
     //$catout	= $this->datamodel->getCatidsOutLink(true);
     $params->set('catid0', $params->get('jevents_category', 0));
     $myItemid = $datamodel->setupModuleCatids($params);
     $catout = $datamodel->getCatidsOutLink(true);
     $reg =& JevRegistry::getInstance("jevents");
     $reg->setReference("jevents.datamodel", $datamodel);
     if (!empty($query_start_date)) {
         $rstartdate = new RokMiniEvents_Date($query_start_date);
         if ($params->get('jevents_past', 0) == 0 && $rstartdate->toUnix() < time()) {
             $rstartdate = new RokMiniEvents_Date(time());
         }
         $dates_start = $rstartdate->toISO8601();
     } else {
         if ($params->get('jevents_past', 0) == 0) {
             $rstartdate = new RokMiniEvents_Date(time());
             $dates_start = $rstartdate->toISO8601();
         } else {
             $dates_start = date('Y-m-d\\T23:59:59', strtotime("-1 month"));
         }
     }
     if (empty($query_end_date)) {
         $dates_end = date('Y-m-d\\T23:59:59', strtotime("+1 year"));
     } else {
         $dates_end = $query_end_date;
     }
     $rows = $datamodel->queryModel->listIcalEventsByRange($dates_start, $dates_end, 0, 0, $showrepeats);
     $events = array();
     $total_count = 1;
     $total_max = $params->get('jevents_total', 10);
     foreach ($rows as $row) {
         if ($params->get('jevents_links') != 'link_no') {
             if ($params->get('jevents_links') == 'event_internal' || $params->get('jevents_links') == 'event_external') {
                 $link = array('internal' => $params->get('jevents_links') == 'event_internal' ? true : false, 'link' => self::getCalendarLink($myItemid, $catout, TRUE, $row->_eventid));
             } else {
                 $link = array('internal' => $params->get('jevents_links') == 'link_internal' ? true : false, 'link' => self::getCalendarLink($myItemid, $catout));
             }
         } else {
             $link = false;
         }
         $event = new RokMiniEvents_Event($row->_unixstarttime, $row->_unixendtime, $row->_title, $row->_content, $link);
         $events[] = $event;
         $total_count++;
         if ($total_count > $total_max) {
             break;
         }
     }
     return $events;
 }
开发者ID:atikahmed,项目名称:joomla-probid,代码行数:75,代码来源:jevents.php

示例6: defined

<?php

/**
 * JEvents Component for Joomla 1.5.x
 *
 * @version     $Id: adminqueries.php 2429 2011-08-09 09:41:06Z geraintedwards $
 * @package     JEvents
 * @copyright   Copyright (C)  2008-2009 GWE Systems Ltd, 2006-2008 JEvents Project Group
 * @license     GNU/GPLv2, see http://www.gnu.org/licenses/gpl-2.0.html
 * @link        http://www.jevents.net
 */
defined('_JEXEC') or die('Restricted access');
// load language constants
JEVHelper::loadLanguage('admin');
class JEventsAdminDBModel extends JEventsDBModel
{
    /**
     * gets raw vevent (not a rpt) usually for editing purposes
     * 
     *
     * @param int $agid vevent id
     * @return stdClass details of vevent selected
     */
    function getVEventById($agid)
    {
        $db =& JFactory::getDBO();
        $user =& JFactory::getUser();
        // force state value to event state!
        $query = "SELECT ev.*,rr.*, det.*, ev.state as state" . "\n FROM #__jevents_vevent as ev" . "\n LEFT JOIN #__jevents_vevdetail as det ON det.evdet_id = ev.detail_id" . "\n LEFT JOIN #__jevents_rrule as rr ON rr.eventid = ev.ev_id" . "\n WHERE ev.catid IN(" . $this->accessibleCategoryList() . ")" . "\n AND ev.ev_id = '{$agid}'" . "\n AND ev.access  " . (version_compare(JVERSION, '1.6.0', '>=') ? ' IN (' . JEVHelper::getAid($user) . ')' : ' <=  ' . JEVHelper::getAid($user));
        $db->setQuery($query);
        $rows = $db->loadObjectList();
开发者ID:andreassetiawanhartanto,项目名称:PDKKI,代码行数:31,代码来源:adminqueries.php

示例7: defined

<?php

/**
 * JEvents Component for Joomla 1.5.x
 *
 * @version     $Id: dbmodel.php 3575 2012-05-01 14:06:28Z geraintedwards $
 * @package     JEvents
 * @copyright   Copyright (C) 2008-2009 GWE Systems Ltd, 2006-2008 JEvents Project Group
 * @license     GNU/GPLv2, see http://www.gnu.org/licenses/gpl-2.0.html
 * @link        http://www.jevents.net
 */
defined('_JEXEC') or die('Restricted access');
// load language constants
JEVHelper::loadLanguage('front');
class JEventsDBModel
{
    var $cfg = null;
    var $datamodel = null;
    var $legacyEvents = null;
    function JEventsDBModel(&$datamodel)
    {
        $this->cfg =& JEVConfig::getInstance();
        // TODO - remove legacy code
        $this->legacyEvents = 0;
        $this->datamodel =& $datamodel;
        $params = JComponentHelper::getParams(JEV_COM_COMPONENT);
        if (!JVersion::isCompatible("1.6.0")) {
            // Multi-category events only supported in Joomla 2.5 + so disable elsewhere
            $params->set('multicategory', 0);
        }
    }
开发者ID:madseller,项目名称:coperio,代码行数:31,代码来源:dbmodel.php

示例8: rss

 function rss($tpl = null)
 {
     $modid = intval(JRequest::getVar('modid', 0));
     if ($modid < 0) {
         $modid = 0;
     }
     $cfg =& JEVConfig::getInstance();
     $db =& JFactory::getDBO();
     // setup for all required function and classes
     $file = JPATH_SITE . '/components/com_jevents/mod.defines.php';
     include_once $file;
     // load language constants
     JEVHelper::loadLanguage('modlatest');
     // Check document type
     $doc =& JFactory::getDocument();
     if ($doc->getType() != 'feed') {
         JError::raiseError('E999', 'Fatal error, document type: "' . $doc->getType() . '" not supported.');
     }
     if ($modid > 0) {
         $user = JFactory::getUser();
         $query = "SELECT id, params" . "\n FROM #__modules AS m" . "\n WHERE m.published = 1" . "\n AND m.id = " . $modid . "\n AND m.access  " . (version_compare(JVERSION, '1.6.0', '>=') ? ' IN (' . JEVHelper::getAid($user, 'string') . ')' : ' <=  ' . JEVHelper::getAid($user)) . "\n AND m.client_id != 1";
         $db =& JFactory::getDBO();
         $db->setQuery($query);
         $modules = $db->loadObjectList();
         if (count($modules) <= 0) {
             // fake module parameter
             $params = new JParameter('');
         } else {
             $params = new JParameter($modules[0]->params);
         }
     } else {
         $params = JComponentHelper::getParams(JEV_COM_COMPONENT);
     }
     // parameter intialization
     $info['link'] = str_replace('&', '&amp;', JURI::root(true));
     $info['imagelink'] = str_replace('&', '&amp;', JURI::root());
     $info['base'] = str_replace('&', '&amp;', JURI::root());
     $info['cache'] = $cfg->get('com_rss_cache', 1);
     $info['cache_time'] = $cfg->get('com_rss_cache_time', 3600);
     $info['count'] = $cfg->get('com_rss_count', 5);
     $info['title'] = $cfg->get('com_rss_title', 'Powered by JEvents!');
     $info['description'] = $cfg->get('com_rss_description', 'JEvents Syndication for Joomla');
     // get rss title from module param if requested and defined
     $t_title = $params->get('modlatest_rss_title', null);
     if ($params->get('modlatest_useLocalParam', 0) == 1 && !empty($t_title)) {
         $info['title'] = $t_title;
     }
     // get rss description from module param if requested and defined
     $t_description = $params->get('modlatest_rss_description', null);
     if ($params->get('modlatest_useLocalParam', 0) == 1 && !empty($t_description)) {
         $info['description'] = $t_description;
     }
     $info['image_url'] = htmlspecialchars($cfg->get('com_rss_logo', JURI::root() . 'administrator/components/' . JEV_COM_COMPONENT . '/assets/images/logo.gif'));
     if ($info['image_url'] == "") {
         $info['image_url'] = htmlspecialchars(JURI::root() . 'administrator/components/' . JEV_COM_COMPONENT . '/assets/images/logo.gif');
     }
     $info['image_alt'] = $info['title'];
     $info['limit_text'] = $cfg->get('com_rss_limit_text', 1);
     $info['text_length'] = $cfg->get('com_rss_text_length', 20);
     // include the appropraite VIEW - this should be based on config and/or URL?
     $cfg =& JEVConfig::getInstance();
     $theme = JEV_CommonFunctions::getJEventsViewName();
     $viewclass = ucfirst($theme) . "ModLatestView";
     jimport('joomla.application.module.helper');
     require_once JModuleHelper::getLayoutPath('mod_jevents_latest', $theme . DS . "latest");
     $jeventCalObject = new $viewclass($params, $modid);
     $jeventCalObject->getLatestEventsData($info["count"]);
     $this->set("eventsByRelDay", $jeventCalObject->eventsByRelDay);
     $this->set("info", $info);
     $this->set("modparams", $params);
     $this->set("jeventCalObject", $jeventCalObject);
     parent::displaytemplate($tpl);
 }
开发者ID:brojask,项目名称:colegio-abogados-joomla,代码行数:73,代码来源:view.feed.php

示例9: defined

defined('_JEXEC') or die('Restricted access');
// CHECK EVENTS COMPONENT
$file = JPATH_SITE . '/components/com_jevents/mod.defines.php';
if (file_exists($file)) {
    include_once $file;
    include_once JEV_LIBS . "/modfunctions.php";
} else {
    die("JEvents Layout Switcher\n<br />This module needs the JEvents component");
}
// record what is running - used by the filters
$registry = JRegistry::getInstance("jevents");
$registry->set("jevents.activeprocess", "mod_jevents_switchview");
$registry->set("jevents.moduleid", $module->id);
$registry->set("jevents.moduleparams", $params);
// load language constants
JEVHelper::loadLanguage('modswitchview');
// existing values
$cfg = JEVConfig::getInstance();
// priority of view setting is url, cookie, config,
$jEventsView = $cfg->get('com_calViewName', "default");
$cur_view = JEV_CommonFunctions::getJEventsViewName();
// paramaters
$preview_height = $params->get('preview_height', 90);
$preview_width = $params->get('preview_width', 140);
$show_preview = $params->get('show_preview', 1);
// get views names from template directory
$darray = array();
foreach (JEV_CommonFunctions::getJEventsViewList() as $viewfile) {
    $darray[] = JHTML::_('select.option', $viewfile, $viewfile);
}
sort($darray);
开发者ID:madcsaba,项目名称:li-de,代码行数:31,代码来源:mod_jevents_switchview.php


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