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


PHP JEVConfig类代码示例

本文整理汇总了PHP中JEVConfig的典型用法代码示例。如果您正苦于以下问题:PHP JEVConfig类的具体用法?PHP JEVConfig怎么用?PHP JEVConfig使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: bind

 function bind($array, $ignore = array())
 {
     $cfg = JEVConfig::getInstance();
     $array['id'] = isset($array['id']) ? intval($array['id']) : 0;
     parent::bind($array);
     $params = new JRegistry($this->params);
     if (!$params->get("catcolour", false)) {
         $color = array_key_exists("color", $array) ? $array['color'] : "#000000";
         if (!preg_match("/^#[0-9a-f]+\$/i", $color)) {
             $color = "#000000";
         }
         $params->set("catcolor", $color);
     }
     if (!$params->get("admin", false)) {
         $admin = array_key_exists("admin", $array) ? $array['admin'] : 0;
         $params->set("admin", $admin);
     }
     if (!$params->get("overlaps", false)) {
         $overlaps = array_key_exists("overlaps", $array) ? intval($array['overlaps']) : 0;
         $params->set("overlaps", $overlaps);
     }
     if (!$params->get("image", false)) {
         $image = array_key_exists("image", $array) ? intval($array['image']) : "";
         $params->set("image", $image);
     }
     $this->params = (string) $params;
     // Fill in the gaps
     $this->parent_id = array_key_exists("parent_id", $array) ? intval($array['parent_id']) : 1;
     $this->level = array_key_exists("level", $array) ? intval($array['level']) : 1;
     $this->extension = "com_jevents";
     $this->language = "*";
     $this->setLocation(1, 'last-child');
     return true;
 }
开发者ID:hriggs,项目名称:cs-website,代码行数:34,代码来源:categoryClass.php

示例2: getAdjacentYear

 function getAdjacentYear($year, $month, $day, $direction = 1)
 {
     $d1 = JevDate::mktime(0, 0, 0, $month, $day, $year + $direction);
     $day = JevDate::strftime("%d", $d1);
     $year = JevDate::strftime("%Y", $d1);
     $params = JComponentHelper::getParams(JEV_COM_COMPONENT);
     $cfg = JEVConfig::getInstance();
     if (method_exists("JEVHelper", "getMinYear")) {
         $earliestyear = JEVHelper::getMinYear();
         $latestyear = JEVHelper::getMaxYear();
     } else {
         $earliestyear = $params->get("com_earliestyear", 1970);
         $latestyear = $params->get("com_latestyear", 2150);
     }
     if ($year > $latestyear || $year < $earliestyear) {
         return false;
     }
     $month = JevDate::strftime("%m", $d1);
     $task = JRequest::getString('jevtask');
     $Itemid = JEVHelper::getItemid();
     if (isset($Itemid)) {
         $item = "&Itemid={$Itemid}";
     } else {
         $item = "";
     }
     return JRoute::_("index.php?option=" . JEV_COM_COMPONENT . "&task={$task}{$item}&year={$year}&month={$month}&day={$day}");
 }
开发者ID:madcsaba,项目名称:li-de,代码行数:27,代码来源:view.html.php

示例3: listevents

 function listevents()
 {
     list($year, $month, $day) = JEVHelper::getYMD();
     $Itemid = JEVHelper::getItemid();
     // get the view
     $document =& JFactory::getDocument();
     $viewType = $document->getType();
     $cfg =& JEVConfig::getInstance();
     $theme = JEV_CommonFunctions::getJEventsViewName();
     $view = "day";
     $this->addViewPath($this->_basePath . DS . "views" . DS . $theme);
     $this->view =& $this->getView($view, $viewType, $theme, array('base_path' => $this->_basePath, "template_path" => $this->_basePath . DS . "views" . DS . $theme . DS . $view . DS . 'tmpl', "name" => $theme . DS . $view));
     // Set the layout
     $this->view->setLayout('listevents');
     $this->view->assign("Itemid", $Itemid);
     $this->view->assign("month", $month);
     $this->view->assign("day", $day);
     $this->view->assign("year", $year);
     $this->view->assign("task", $this->_task);
     // View caching logic -- simple... are we logged in?
     $cfg =& JEVConfig::getInstance();
     $useCache = intval($cfg->get('com_cache', 0));
     $user =& JFactory::getUser();
     if ($user->get('id') || !$useCache) {
         $this->view->display();
     } else {
         $cache =& JFactory::getCache(JEV_COM_COMPONENT, 'view');
         $cache->get($this->view, 'display');
     }
 }
开发者ID:andreassetiawanhartanto,项目名称:PDKKI,代码行数:30,代码来源:day.php

示例4: getLabel

 protected function getLabel()
 {
     $cfg = JEVConfig::getInstance();
     if ($cfg->get("multicategory", 0)) {
         return parent::getLabel();
     }
     return "";
 }
开发者ID:hriggs,项目名称:cs-website,代码行数:8,代码来源:jeveventprimarycategory.php

示例5: __construct

 /**
  * Controler for the Ical Functions
  * @param array		configuration
  */
 function __construct($config = array())
 {
     parent::__construct($config);
     $this->registerTask('list', 'overview');
     $this->registerDefaultTask("overview");
     $cfg =& JEVConfig::getInstance();
     $this->_debug = $cfg->get('jev_debug', 0);
     $this->dataModel = new JEventsDataModel("JEventsAdminDBModel");
     $this->queryModel = new JEventsDBModel($this->dataModel);
 }
开发者ID:andreassetiawanhartanto,项目名称:PDKKI,代码行数:14,代码来源:icalrepeat.php

示例6: detail

 function detail()
 {
     // Do we have to be logged in to see this event
     $user = JFactory::getUser();
     if (JRequest::getInt("login", 0) && $user->id == 0) {
         $uri = JURI::getInstance();
         $link = $uri->toString();
         $comuser = version_compare(JVERSION, '1.6.0', '>=') ? "com_users" : "com_user";
         $link = 'index.php?option=' . $comuser . '&view=login&return=' . base64_encode($link);
         $link = JRoute::_($link);
         $this->setRedirect($link, JText::_('JEV_LOGIN_TO_VIEW_EVENT'));
         return;
     }
     $evid = JRequest::getInt("rp_id", 0);
     if ($evid == 0) {
         $evid = JRequest::getInt("evid", 0);
         // In this case I do not have a repeat id so I
     }
     // if cancelling from save of copy and edit use the old event id
     if ($evid == 0) {
         $evid = JRequest::getInt("old_evid", 0);
     }
     $pop = intval(JRequest::getVar('pop', 0));
     list($year, $month, $day) = JEVHelper::getYMD();
     $Itemid = JEVHelper::getItemid();
     $uid = urldecode(JRequest::getVar('uid', ""));
     $document =& JFactory::getDocument();
     $viewType = $document->getType();
     $cfg =& JEVConfig::getInstance();
     $theme = JEV_CommonFunctions::getJEventsViewName();
     $view = "icalevent";
     $this->addViewPath($this->_basePath . DS . "views" . DS . $theme);
     $this->view =& $this->getView($view, $viewType, $theme . "View", array('base_path' => $this->_basePath, "template_path" => $this->_basePath . DS . "views" . DS . $theme . DS . $view . DS . 'tmpl', "name" => $theme . DS . $view));
     // Set the layout
     $this->view->setLayout("detail");
     $this->view->assign("Itemid", $Itemid);
     $this->view->assign("month", $month);
     $this->view->assign("day", $day);
     $this->view->assign("year", $year);
     $this->view->assign("task", $this->_task);
     $this->view->assign("pop", $pop);
     $this->view->assign("evid", $evid);
     $this->view->assign("jevtype", "icaldb");
     $this->view->assign("uid", $uid);
     // View caching logic -- simple... are we logged in?
     $cfg =& JEVConfig::getInstance();
     $useCache = intval($cfg->get('com_cache', 0));
     if ($user->get('id') || !$useCache) {
         $this->view->display();
     } else {
         $cache =& JFactory::getCache(JEV_COM_COMPONENT, 'view');
         $cache->get($this->view, 'display');
     }
 }
开发者ID:madseller,项目名称:coperio,代码行数:54,代码来源:icalrepeat.php

示例7: __construct

 /**
  * Controler for the Ical Functions
  * @param array		configuration
  */
 function __construct($config = array())
 {
     parent::__construct($config);
     $this->registerTask('list', 'overview');
     $this->registerDefaultTask("overview");
     $cfg = JEVConfig::getInstance();
     $this->_debug = $cfg->get('jev_debug', 0);
     $this->dataModel = new JEventsDataModel("JEventsAdminDBModel");
     $this->queryModel = new JEventsDBModel($this->dataModel);
     $dispatcher = JDispatcher::getInstance();
     JPluginHelper::importPlugin('finder');
 }
开发者ID:pguilford,项目名称:vcomcc,代码行数:16,代码来源:icalrepeat.php

示例8: getInput

    /**
     * Method to get the field input markup.
     *
     * @return	string	The field input markup.
     * @since	1.6
     */
    protected function getInput()
    {
        $cfg = JEVConfig::getInstance();
        $hideColour = false;
        if ($cfg->get('com_calForceCatColorEventForm', 0) == 1 && !JFactory::getApplication()->isAdmin()) {
            $hideColour = true;
        } else {
            if ($cfg->get('com_calForceCatColorEventForm', 0) == 2) {
                $hideColour = true;
            } else {
                $hideColour = false;
            }
        }
        if (!$hideColour) {
            JLoader::register('JEVHelper', JPATH_SITE . "/components/com_jevents/libraries/helper.php");
            JEVHelper::ConditionalFields($this->element, $this->form->getName());
            ob_start();
            ?>
			<table id="pick1064797275" style="background-color:<?php 
            echo $this->value . ';color:' . JevMapColor($this->value);
            ?>
;border:solid 1px black;">
				<tr>	
					<td  nowrap="nowrap">
						<input type="hidden" id="pick1064797275field" name="color" value="<?php 
            echo $this->value;
            ?>
"/>
						<a id="colorPickButton" href="javascript:void(0)"  onclick="document.getElementById('fred').style.visibility='visible';"	  style="visibility:visible;color:<?php 
            echo JevMapColor($this->value);
            ?>
;font-weight:bold;"><?php 
            echo JText::_('JEV_COLOR_PICKER');
            ?>
</a>
					</td>
					<td>
						<div style="position:relative;z-index:9999;">
							<iframe id="fred" src="<?php 
            echo JURI::root() . "components/" . JEV_COM_COMPONENT . "/libraries/colours.html?id=fred";
            ?>
" class="jev_ev_colour_picker_i"></iframe>
						</div>
					</td>
				</tr>
			</table>
			<?php 
            return ob_get_clean();
        }
        return "";
    }
开发者ID:madcsaba,项目名称:li-de,代码行数:57,代码来源:jeveventcolourpicker.php

示例9: setDescription

 protected function setDescription($desc)
 {
     // TODO - run this through plugins first ?
     $icalformatted = JRequest::getInt("icf", 0);
     if (!$icalformatted) {
         $description = $this->replacetags($desc);
     } else {
         $description = $desc;
     }
     // wraplines	from vCard class
     $cfg =& JEVConfig::getInstance();
     if ($cfg->get("outlook2003icalexport", 0)) {
         return "DESCRIPTION:" . $this->wraplines($description, 76, false);
     } else {
         return "DESCRIPTION;ENCODING=QUOTED-PRINTABLE:" . $this->wraplines($description);
     }
 }
开发者ID:madseller,项目名称:coperio,代码行数:17,代码来源:view.html.php

示例10: DefaultLoadModules

function DefaultLoadModules($view, $position)
{
    $cfg = JEVConfig::getInstance();
    $article = JTable::getInstance('content');
    $article->text = "{loadposition {$position}}";
    $app = JFactory::getApplication();
    $params = JComponentHelper::getParams("com_content");
    JPluginHelper::importPlugin('content');
    $dispatcher = JEventDispatcher::getInstance();
    $results = $dispatcher->trigger('onContentPrepare', array('com_content.article', &$article, &$params, 0));
    if ($article->text == "{loadposition {$position}}") {
        // in case the content plugin is not enabled
        return "";
    } else {
        echo $article->text;
    }
}
开发者ID:hriggs,项目名称:cs-website,代码行数:17,代码来源:defaultloadmodules.php

示例11: listevents

 function listevents()
 {
     $is_event_editor = JEVHelper::isEventCreator();
     $Itemid = JEVHelper::getItemid();
     $user = JFactory::getUser();
     if (!$is_event_editor) {
         $returnlink = JRoute::_('index.php?option=' . JEV_COM_COMPONENT . '&task=month.calendar&Itemid=' . $Itemid, false);
         $this->setRedirect($returnlink, html_entity_decode(JText::_('JEV_NOPERMISSION')));
         $this->redirect();
         return;
     }
     list($year, $month, $day) = JEVHelper::getYMD();
     // Joomla unhelpfully switched limitstart to start when sef is enabled!  includes/router.php line 390
     $limitstart = intval(JRequest::getVar('start', JRequest::getVar('limitstart', 0)));
     $params = JComponentHelper::getParams(JEV_COM_COMPONENT);
     $limit = intval(JFactory::getApplication()->getUserStateFromRequest('jevlistlimit', 'limit', $params->get("com_calEventListRowsPpg", 15)));
     $Itemid = JEVHelper::getItemid();
     $task = $this->_task;
     $params = JComponentHelper::getParams(JEV_COM_COMPONENT);
     $adminuser = $params->get("jevadmin", -1);
     if (JEVHelper::isAdminUser($user) || $user->id == $adminuser) {
         $creator_id = 'ADMIN';
     } else {
         $creator_id = $user->id;
     }
     // get the view
     $document = JFactory::getDocument();
     $viewType = $document->getType();
     $cfg = JEVConfig::getInstance();
     $theme = JEV_CommonFunctions::getJEventsViewName();
     $view = "admin";
     $this->addViewPath($this->_basePath . '/' . "views" . '/' . $theme);
     $this->view = $this->getView($view, $viewType, $theme . "View", array('base_path' => $this->_basePath, "template_path" => $this->_basePath . '/' . "views" . '/' . $theme . '/' . $view . '/' . 'tmpl', "name" => $theme . '/' . $view));
     // Set the layout
     $this->view->setLayout('listevents');
     $this->view->assign("Itemid", $Itemid);
     $this->view->assign("limitstart", $limitstart);
     $this->view->assign("limit", $limit);
     $this->view->assign("month", $month);
     $this->view->assign("day", $day);
     $this->view->assign("year", $year);
     $this->view->assign("task", $task);
     $this->view->assign("creator_id", $creator_id);
     $this->view->display();
 }
开发者ID:poorgeek,项目名称:JEvents,代码行数:45,代码来源:admin.php

示例12: rss

 function rss()
 {
     JRequest::setVar("tmpl", "component");
     // get the view
     $this->view =& $this->getView("modlatest", "feed");
     // Set the layout
     $this->view->setLayout('rss');
     // View caching logic -- simple... are we logged in?
     $cfg =& JEVConfig::getInstance();
     $useCache = intval($cfg->get('com_cache', 0));
     $user =& JFactory::getUser();
     if ($user->get('id') || !$useCache) {
         $this->view->rss();
     } else {
         $cache =& JFactory::getCache(JEV_COM_COMPONENT, 'view');
         $cache->get($this->view, 'rss');
     }
 }
开发者ID:andreassetiawanhartanto,项目名称:PDKKI,代码行数:18,代码来源:modlatest.php

示例13: getInput

 protected function getInput()
 {
     $cfg = JEVConfig::getInstance();
     $hideColour = false;
     if ($cfg->get('com_calForceCatColorEventForm', 0) == 1 && !JFactory::getApplication()->isAdmin()) {
         $hideColour = true;
     } else {
         if ($cfg->get('com_calForceCatColorEventForm', 0) == 2) {
             $hideColour = true;
         } else {
             $hideColour = false;
         }
     }
     if (!$hideColour) {
         return parent::getInput();
     }
     return "";
 }
开发者ID:poorgeek,项目名称:JEvents,代码行数:18,代码来源:jevcolor.php

示例14: DefaultEventsLegend

function DefaultEventsLegend($view)
{
    $cfg =& JEVConfig::getInstance();
    $theme = JEV_CommonFunctions::getJEventsViewName();
    $modpath = JModuleHelper::getLayoutPath('mod_jevents_legend', $theme . DS . "legend");
    if (!file_exists($modpath)) {
        return;
    }
    // load the helper class
    require_once JPATH_SITE . '/modules/mod_jevents_legend/helper.php';
    require_once $modpath;
    $viewclass = ucfirst($theme) . "ModLegendView";
    $module = JModuleHelper::getModule("mod_jevents_legend", false);
    $params = new JParameter($module->params);
    $modview = new $viewclass($params, $module->id);
    echo $modview->displayCalendarLegend("block");
    echo "<br style='clear:both'/>";
}
开发者ID:andreassetiawanhartanto,项目名称:PDKKI,代码行数:18,代码来源:defaulteventslegend.php

示例15: setDescription

 protected function setDescription($desc)
 {
     // TODO - run this through plugins first ?
     // See http://www.jevents.net/forum/viewtopic.php?f=23&t=21939&p=115231#wrap
     // can we use 	X-ALT-DESC;FMTTYPE=text/html: as well as DESCRIPTION
     $icalformatted = JRequest::getInt("icf", 0);
     if (!$icalformatted) {
         $description = $this->replacetags($desc);
     } else {
         $description = $desc;
     }
     // wraplines	from vCard class
     $cfg = JEVConfig::getInstance();
     if ($cfg->get("outlook2003icalexport", 0)) {
         return "DESCRIPTION:" . $this->wraplines($description, 76, false);
     } else {
         return "DESCRIPTION;ENCODING=QUOTED-PRINTABLE:" . $this->wraplines($description);
     }
 }
开发者ID:madcsaba,项目名称:li-de,代码行数:19,代码来源:view.html.php


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