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


PHP JemHelper类代码示例

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


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

示例1: display

 /**
  * Creates the output for the Venue view
  */
 function display($tpl = null)
 {
     $settings = JemHelper::config();
     $settings2 = JemHelper::globalattribs();
     $app = JFactory::getApplication();
     $jinput = JFactory::getApplication()->input;
     if ($settings2->get('global_show_ical_icon', '0') == 1) {
         // Get data from the model
         $model = $this->getModel();
         $model->setLimit($settings->ical_max_items);
         $model->setLimitstart(0);
         $rows = $model->getItems();
         $venueid = $jinput->getInt('id');
         // initiate new CALENDAR
         $vcal = JemHelper::getCalendarTool();
         // $vcal->setProperty('unique_id', 'category'.$catid.'@'.$mainframe->getCfg('sitename'));
         $vcal->setConfig("filename", "venue" . $venueid . ".ics");
         foreach ($rows as $row) {
             JemHelper::icalAddEvent($vcal, $row, $rows);
         }
         // generate and redirect output to user browser
         $vcal->returnCalendar();
     } else {
         return;
     }
 }
开发者ID:JKoelman,项目名称:JEM-3,代码行数:29,代码来源:view.raw.php

示例2: getUpdatedata

	/**
	 * Retrieval of update-data
	 */
	function getUpdatedata()
	{
		$installedversion	= JemHelper::getParam(1,'version',1,'com_jem');
		$updateFile			= "http://www.joomlaeventmanager.net/updatecheck/update.xml";
		$checkFile			= self::CheckFile($updateFile);
		$updatedata 		= new stdClass();

		if ($checkFile) {
			$xml = simplexml_load_file($updateFile);

			//version to check, not visible in table
			$updatedata->version 			= $xml->version;

			//in table
			$updatedata->versiondetail		= $xml->versiondetail;
			$updatedata->date				= JEMOutput::formatdate($xml->date);
			$updatedata->info 				= $xml->info;
			$updatedata->download 			= $xml->download;
			$updatedata->notes				= $xml->notes;
			$updatedata->changes 			= explode(';', $xml->changes);
			$updatedata->failed 			= 0;
			$updatedata->installedversion	= $installedversion;
			$updatedata->current			= version_compare($installedversion, $updatedata->version);
		} else {
			$updatedata->failed 			= 1;
			$updatedata->installedversion	= $installedversion;
		}

		return $updatedata;
	}
开发者ID:BillVGN,项目名称:PortalPRP,代码行数:33,代码来源:updatecheck.php

示例3: display

	/**
	 * Creates the output for the Eventslist view
	 */
	function display($tpl = null)
	{
		$settings 	= JemHelper::config();
		$settings2	= JemHelper::globalattribs();

		if ($settings2->get('global_show_ical_icon','0')==1) {
			// Get data from the model
			$model = $this->getModel();
			$model->setLimit($settings->ical_max_items);
			$model->setLimitstart(0);
			$rows = $model->getItems();

			// initiate new CALENDAR
			$vcal = JemHelper::getCalendarTool();
			$vcal->setConfig("filename", "events.ics");

			if (!empty($rows)) {
				foreach ($rows as $row) {
					JemHelper::icalAddEvent($vcal, $row);
				}
			}

			// generate and redirect output to user browser
			$vcal->returnCalendar();
		} else {
			return;
		}
	}
开发者ID:BillVGN,项目名称:PortalPRP,代码行数:31,代码来源:view.raw.php

示例4: populateState

 /**
  * Method to auto-populate the model state.
  *
  * Note. Calling getState in this method will result in recursion.
  */
 protected function populateState($ordering = null, $direction = null)
 {
     $app = JFactory::getApplication();
     $jemsettings = JemHelper::config();
     # it's needed to set the parent option
     parent::populateState('a.dates', 'asc');
 }
开发者ID:JKoelman,项目名称:JEM-3,代码行数:12,代码来源:attendees.php

示例5: display

 public function display($tpl = null)
 {
     $document = JFactory::getDocument();
     $db = JFactory::getDBO();
     $app = JFactory::getApplication();
     $jinput = JFactory::getApplication()->input;
     $itemid = $jinput->getInt('id', 0) . ':' . $jinput->getInt('Itemid', 0);
     $filter_order = $app->getUserStateFromRequest('com_jem.categoryelement.filter_order', 'filter_order', 'c.ordering', 'cmd');
     $filter_order_Dir = $app->getUserStateFromRequest('com_jem.categoryelement.filter_order_Dir', 'filter_order_Dir', '', 'word');
     $filter_state = $app->getUserStateFromRequest('com_jem.categoryelement.' . $itemid . '.filter_state', 'filter_state', '', 'string');
     $search = $app->getUserStateFromRequest('com_jem.categoryelement.' . $itemid . '.filter_search', 'filter_search', '', 'string');
     $search = $db->escape(trim(JString::strtolower($search)));
     // prepare document
     $document->setTitle(JText::_('COM_JEM_SELECT_CATEGORY'));
     // Load css
     JemHelper::loadCss('backend');
     // Get data from the model
     $rows = $this->get('Data');
     $pagination = $this->get('Pagination');
     // publish/unpublished filter
     $lists['state'] = JHtml::_('grid.state', $filter_state);
     // table ordering
     $lists['order_Dir'] = $filter_order_Dir;
     $lists['order'] = $filter_order;
     // search filter
     $lists['search'] = $search;
     // assign data to template
     $this->lists = $lists;
     $this->filter_state = $filter_state;
     $this->rows = $rows;
     $this->pagination = $pagination;
     parent::display($tpl);
 }
开发者ID:JKoelman,项目名称:JEM-3,代码行数:33,代码来源:view.html.php

示例6: prepareDocument

	/**
	 * Prepares the document.
	 */
	protected function prepareDocument() {
		$app 		= JFactory::getApplication();
		$menus		= $app->getMenu();
		$menu 		= $menus->getActive();
		$print		= $app->input->getBool('print', false);

		if ($print) {
			JemHelper::loadCss('print');
			$this->document->setMetaData('robots', 'noindex, nofollow');
		}

		if ($menu) {
			$this->params->def('page_heading', $this->params->get('page_title', $menu->title));
		} else {
			// TODO
			$this->params->def('page_heading', JText::_('COM_JEM_DEFAULT_PAGE_TITLE_DAY'));
		}

		$title = $this->params->get('page_title', '');

		if (empty($title)) {
			$title = $app->getCfg('sitename');
		} elseif ($app->getCfg('sitename_pagetitles', 0) == 1) {
			$title = JText::sprintf('JPAGETITLE', $app->getCfg('sitename'), $title);
		} elseif ($app->getCfg('sitename_pagetitles', 0) == 2) {
			$title = JText::sprintf('JPAGETITLE', $title, $app->getCfg('sitename'));
		}
		$this->document->setTitle($title);

		// TODO: Metadata
		$this->document->setMetadata('keywords', $this->params->get('page_title'));
	}
开发者ID:BillVGN,项目名称:PortalPRP,代码行数:35,代码来源:view.class.php

示例7: getGroups

 /**
  * Method to get the time zone field option groups.
  *
  * @return  array  The field option objects as a nested array in groups.
  */
 protected function getGroups()
 {
     $settings = JemHelper::globalattribs();
     $globalTz = $settings->get('global_timezone');
     $groups = array();
     $keyField = !empty($this->keyField) ? $this->keyField : 'id';
     $keyValue = $this->form->getValue($keyField);
     $view = $this->element['view'];
     // If the timezone is not set use the server setting.
     if (strlen($this->value) == 0 && empty($keyValue)) {
         # we didn't select A timezone so we'll take a look at the server setting.
         # are we in settings-view?
         if ($view == 'venue') {
             # check if there is a setting filled
             if ($globalTz) {
                 $this->value = $globalTz;
             } else {
                 # there is no global value so check the the server setting
                 $serverTz = JFactory::getConfig()->get('offset');
                 # UTC is seen as Abidjan and that's not something we want
                 if ($serverTz == 'UTC') {
                     $serverTz = 'Europe/Berlin';
                     // for the moment it's been set to this
                 }
                 $this->value = $serverTz;
             }
         }
     }
     // Get the list of time zones from the server.
     $zones = DateTimeZone::listIdentifiers();
     // Build the group lists.
     foreach ($zones as $zone) {
         // Time zones not in a group we will ignore.
         if (strpos($zone, '/') === false) {
             continue;
         }
         // Get the group/locale from the timezone.
         list($group, $locale) = explode('/', $zone, 2);
         // Only use known groups.
         if (in_array($group, self::$zones)) {
             // Initialize the group if necessary.
             if (!isset($groups[$group])) {
                 $groups[$group] = array();
             }
             // Only add options where a locale exists.
             if (!empty($locale)) {
                 $groups[$group][$zone] = JHtml::_('select.option', $zone, str_replace('_', ' ', $locale), 'value', 'text', false);
             }
         }
     }
     // Sort the group lists.
     ksort($groups);
     foreach ($groups as &$location) {
         sort($location);
     }
     // Merge any additional groups in the XML definition.
     $groups = array_merge(parent::getGroups(), $groups);
     return $groups;
 }
开发者ID:JKoelman,项目名称:JEM-3,代码行数:64,代码来源:timezone.php

示例8: display

    /**
     * Creates the Calendar View
     */
    function display($tpl = null)
    {
        $app = JFactory::getApplication();
        //initialize variables
        $menu = $app->getMenu();
        $menuitem = $menu->getActive();
        $jemsettings = JemHelper::config();
        $params = $app->getParams();
        $settings = JemHelper::globalattribs();
        // Load css
        JemHelper::loadCss('calendar');
        JemHelper::loadCss('jem');
        JemHelper::loadCustomCss();
        JemHelper::loadCustomTag();
        $evlinkcolor = $params->get('eventlinkcolor');
        $evbackgroundcolor = $params->get('eventbackgroundcolor');
        $currentdaycolor = $params->get('currentdaycolor');
        $eventandmorecolor = $params->get('eventandmorecolor');
        $style = '
		div[id^=\'catz\'] a {color:' . $evlinkcolor . ';}
		div[id^=\'catz\'] {background-color:' . $evbackgroundcolor . ';}
		.eventcontent {background-color:' . $evbackgroundcolor . ';}
		.eventandmore {background-color:' . $eventandmorecolor . ';}
		.today .daynum {background-color:' . $currentdaycolor . ';}';
        $this->document->addStyleDeclaration($style);
        // add javascript (using full path - see issue #590)
        JHtml::_('script', 'media/com_jem/js/calendar.js');
        $rows = $this->get('Items');
        $currentweek = $this->get('Currentweek');
        $currentyear = Date("Y");
        $showweeknr = $params->get('showweeknr', true);
        //Set Page title
        $pagetitle = $params->def('page_title', $menuitem->title);
        $params->def('page_heading', $pagetitle);
        $pageclass_sfx = $params->get('pageclass_sfx');
        // Add site name to title if param is set
        if ($app->getCfg('sitename_pagetitles', 0) == 1) {
            $pagetitle = JText::sprintf('JPAGETITLE', $app->getCfg('sitename'), $pagetitle);
        } elseif ($app->getCfg('sitename_pagetitles', 0) == 2) {
            $pagetitle = JText::sprintf('JPAGETITLE', $pagetitle, $app->getCfg('sitename'));
        }
        $this->document->setTitle($pagetitle);
        $this->document->setMetaData('title', $pagetitle);
        $cal = new activeCalendarWeek($currentyear, 1, 1);
        $cal->enableWeekNum(JText::_('COM_JEM_WKCAL_WEEK'), null, '', $showweeknr);
        // enables week number column with linkable week numbers
        $cal->setFirstWeekDay($params->get('firstweekday', 0));
        $this->rows = $rows;
        $this->params = $params;
        $this->jemsettings = $jemsettings;
        $this->settings = $settings;
        $this->currentweek = $currentweek;
        $this->cal = $cal;
        $this->pageclass_sfx = htmlspecialchars($pageclass_sfx);
        parent::display($tpl);
    }
开发者ID:JKoelman,项目名称:JEM-3,代码行数:59,代码来源:view.html.php

示例9: display

	public function display($tpl = null)
	{
		// Initialise variables.
		$this->form	 = $this->get('Form');
		$this->item	 = $this->get('Item');
		$this->state = $this->get('State');

		// Check for errors.
		if (count($errors = $this->get('Errors'))) {
			JError::raiseError(500, implode("\n", $errors));
			return false;
		}
		JHtml::_('behavior.framework');
		JHtml::_('behavior.modal', 'a.modal');
		JHtml::_('behavior.tooltip');
		JHtml::_('behavior.formvalidation');

		//initialise variables
		$jemsettings 	= JemHelper::config();
		$document		= JFactory::getDocument();
		$user 			= JemFactory::getUser();
		$this->settings	= JemAdmin::config();
		$task			= JFactory::getApplication()->input->get('task', '');
		$this->task 	= $task;
		$url 			= JUri::root();

		$categories 	= JemCategories::getCategoriesTree(1);
		$selectedcats 	= $this->get('Catsselected');

		$Lists = array();
		$Lists['category'] = JemCategories::buildcatselect($categories, 'cid[]', $selectedcats, 0, 'multiple="multiple" size="8"');

		// Load css
		JHtml::_('stylesheet', 'com_jem/backend.css', array(), true);

		// Load scripts
		JHtml::_('script', 'com_jem/attachments.js', false, true);
		JHtml::_('script', 'com_jem/recurrence.js', false, true);
		JHtml::_('script', 'com_jem/unlimited.js', false, true);
		JHtml::_('script', 'com_jem/seo.js', false, true);

		// JQuery noConflict
		//$document->addCustomTag('<script type="text/javascript">jQuery.noConflict();</script>');
		//$document->addScript('http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js');
		//$document->addScript('http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js');

		$access2 			= JemHelper::getAccesslevelOptions();
		$this->access		= $access2;
		$this->jemsettings	= $jemsettings;
		$this->Lists 		= $Lists;

		$this->addToolbar();
		parent::display($tpl);
	}
开发者ID:BillVGN,项目名称:PortalPRP,代码行数:54,代码来源:view.html.php

示例10: onContentAfterDelete

	/**
	 * Dissolve recurrence sets where deleted event is referred to as first.
	 *
	 * @param	string	The context for the content passed to the plugin.
	 * @param	object	The data relating to the content that was deleted.
	 * @since	1.9.6
	 */
	public function onContentAfterDelete($context, $data)
	{
		// Skip plugin if we are deleting something other than events
		if (($context != 'com_jem.event') || empty($data->id)) {
			return;
		}

		// event maybe first of recurrence set -> dissolve complete set
		JemHelper::dissolve_recurrence($data->id);

		return;
	}
开发者ID:BillVGN,项目名称:PortalPRP,代码行数:19,代码来源:jem.php

示例11: populateState

	/**
	 * Method to auto-populate the model state.
	 */
	protected function populateState($ordering = null, $direction = null)
	{
		# parent::populateState($ordering, $direction);
		$app 			= JFactory::getApplication();
		$jemsettings	= JemHelper::config();
		$jinput			= JFactory::getApplication()->input;
		$itemid 		= $jinput->getInt('id', 0) . ':' . $jinput->getInt('Itemid', 0);
		$params 		= $app->getParams();
		$task           = $jinput->get('task','','cmd');
		$top_category 	= $params->get('top_category', 0);
		$startdayonly 	= $params->get('show_only_start', false);

		# params
		$this->setState('params', $params);

		# publish state
		$this->_populatePublishState($task);

		###########
		## DATES ##
		###########

		#only select events within specified dates. (chosen month)
		$monthstart	= mktime(0, 0, 1, strftime('%m', $this->_date), 1, strftime('%Y', $this->_date));
		$monthend	= mktime(0, 0, -1, strftime('%m', $this->_date)+1, 1, strftime('%Y', $this->_date));

		$filter_date_from	= $this->_db->Quote(strftime('%Y-%m-%d', $monthstart));
		$filter_date_to		= $this->_db->Quote(strftime('%Y-%m-%d', $monthend));

		$where = ' DATEDIFF(IF (a.enddates IS NOT NULL, a.enddates, a.dates), '. $filter_date_from .') >= 0';
		$this->setState('filter.calendar_from',$where);

		$where = ' DATEDIFF(a.dates, '. $filter_date_to .') <= 0';
		$this->setState('filter.calendar_to',$where);

		##################
		## TOP-CATEGORY ##
		##################

		if ($top_category) {
			$children = JEMCategories::getChilds($top_category);
			if (count($children)) {
				$where = 'rel.catid IN ('. implode(',', $children) .')';
				$this->setState('filter.category_top', $where);
			}
		}

		# set filter
		$this->setState('filter.calendar_multiday',true);
		$this->setState('filter.calendar_startdayonly',(bool)$startdayonly);
		$this->setState('filter.groupby',array('a.id'));
	}
开发者ID:BillVGN,项目名称:PortalPRP,代码行数:55,代码来源:calendar.php

示例12: populateState

 /**
  * Method to auto-populate the model state.
  */
 protected function populateState($ordering = null, $direction = null)
 {
     # parent::populateState($ordering, $direction);
     $app = JFactory::getApplication();
     $jemsettings = JemHelper::config();
     $jinput = JFactory::getApplication()->input;
     $itemid = $jinput->getInt('id', 0) . ':' . $jinput->getInt('Itemid', 0);
     $params = $app->getParams();
     $task = $jinput->getCmd('task');
     # params
     $this->setState('params', $params);
     # publish state
     $this->setState('filter.published', 1);
     # access
     $this->setState('filter.access', true);
     ###########
     ## DATES ##
     ###########
     #only select events within specified dates. (chosen month)
     $monthstart = mktime(0, 0, 1, strftime('%m', $this->_date), 1, strftime('%Y', $this->_date));
     $monthend = mktime(0, 0, -1, strftime('%m', $this->_date) + 1, 1, strftime('%Y', $this->_date));
     $filter_date_from = $this->_db->Quote(strftime('%Y-%m-%d', $monthstart));
     $filter_date_to = $this->_db->Quote(strftime('%Y-%m-%d', $monthend));
     $where = ' DATEDIFF(IF (a.enddates IS NOT NULL, a.enddates, a.dates), ' . $filter_date_from . ') >= 0';
     $this->setState('filter.calendar_from', $where);
     $where = ' DATEDIFF(a.dates, ' . $filter_date_to . ') <= 0';
     $this->setState('filter.calendar_to', $where);
     #####################
     ## FILTER-CATEGORY ##
     #####################
     $catids = $params->get('catids');
     $venids = $params->get('venueids');
     $eventids = $params->get('eventids');
     $catidsfilter = $params->get('catidsfilter');
     $venidsfilter = $params->get('venueidsfilter');
     $eventidsfilter = $params->get('eventidsfilter');
     if ($catids) {
         $this->setState('filter.category_id', $catids);
         $this->setState('filter.category_id.include', $catidsfilter);
     }
     if ($venids) {
         $this->setState('filter.venue_id', $venids);
         $this->setState('filter.venue_id.include', $venidsfilter);
     }
     if ($eventids) {
         $this->setState('filter.event_id', $eventids);
         $this->setState('filter.event_id.include', $eventidsfilter);
     }
     # set filter
     $this->setState('filter.calendar_multiday', true);
     $this->setState('filter.groupby', array('a.id'));
 }
开发者ID:JKoelman,项目名称:JEM-3,代码行数:55,代码来源:calendar.php

示例13: populateState

 /**
  * Method to auto-populate the model state.
  */
 protected function populateState($ordering = null, $direction = null)
 {
     // parent::populateState($ordering, $direction);
     $app = JFactory::getApplication();
     $jemsettings = JemHelper::config();
     $jinput = JFactory::getApplication()->input;
     $itemid = $jinput->getInt('id', 0) . ':' . $jinput->getInt('Itemid', 0);
     $params = $app->getParams();
     $task = $jinput->get('task', '', 'cmd');
     // List state information
     /* in J! 3.3.6 limitstart is removed from request - but we need it! */
     if ($app->input->getInt('limitstart', null) === null) {
         $app->setUserState('com_jem.venue.' . $itemid . '.limitstart', 0);
     }
     $limit = $app->getUserStateFromRequest('com_jem.venue.' . $itemid . '.limit', 'limit', $jemsettings->display_num, 'int');
     $this->setState('list.limit', $limit);
     $limitstart = $app->getUserStateFromRequest('com_jem.venue.' . $itemid . '.limitstart', 'limitstart', 0, 'int');
     // correct start value if required
     $limitstart = $limit ? (int) (floor($limitstart / $limit) * $limit) : 0;
     $this->setState('list.start', $limitstart);
     # Search
     $search = $app->getUserStateFromRequest('com_jem.venue.' . $itemid . '.filter_search', 'filter_search', '', 'string');
     $this->setState('filter.filter_search', $search);
     # FilterType
     $filtertype = $app->getUserStateFromRequest('com_jem.venue.' . $itemid . '.filter_type', 'filter_type', '', 'int');
     $this->setState('filter.filter_type', $filtertype);
     # filter_order
     $orderCol = $app->getUserStateFromRequest('com_jem.venue.' . $itemid . '.filter_order', 'filter_order', 'a.dates', 'cmd');
     $this->setState('filter.filter_ordering', $orderCol);
     # filter_direction
     // Changed order from ASC to DESC for showing all events
     $listOrder = $app->getUserStateFromRequest('com_jem.venue.' . $itemid . '.filter_order_Dir', 'filter_order_Dir', 'DESC', 'word');
     $this->setState('filter.filter_direction', $listOrder);
     # show open date events
     # (there is no menu item option yet so show all events)
     $this->setState('filter.opendates', 1);
     if ($orderCol == 'a.dates') {
         $orderby = array('a.dates ' . $listOrder, 'a.times ' . $listOrder);
     } else {
         $orderby = $orderCol . ' ' . $listOrder;
     }
     $this->setState('filter.orderby', $orderby);
     # params
     $this->setState('params', $params);
     // Commented out to show all events
     // if ($task == 'archive') {
     // 	$this->setState('filter.published',2);
     // } else {
     // 	$this->setState('filter.published',1);
     // }
     $this->setState('filter.groupby', array('a.id'));
 }
开发者ID:abradbury,项目名称:Orienteering-Website,代码行数:55,代码来源:venue.php

示例14: __construct

 /**
  * Constructor
  */
 public function __construct()
 {
     parent::__construct();
     $app = JFactory::getApplication();
     $jinput = $app->input;
     $jemsettings = JemHelper::config();
     $itemid = $jinput->getInt('id', 0) . ':' . $jinput->getInt('Itemid', 0);
     $limit = $app->getUserStateFromRequest('com_jem.categoryelement.limit', 'limit', $jemsettings->display_num, 'int');
     $limitstart = $jinput->getInt('limitstart');
     $limitstart = $limit ? (int) (floor($limitstart / $limit) * $limit) : 0;
     $this->setState('limit', $limit);
     $this->setState('limitstart', $limitstart);
 }
开发者ID:JKoelman,项目名称:JEM-3,代码行数:16,代码来源:categoryelement.php

示例15: __construct

 /**
  * Constructor
  *
  * @param   object  &$subject  The object to observe
  * @param   array   $config    An array that holds the plugin configuration
  *
  */
 public function __construct(&$subject, $config)
 {
     parent::__construct($subject, $config);
     $this->loadLanguage();
     $app = JFactory::getApplication();
     $jemsettings = JemHelper::globalattribs();
     $this->_SiteName = $app->getCfg('sitename');
     $this->_MailFrom = $app->getCfg('mailfrom');
     $this->_FromName = $app->getCfg('fromname');
     $this->_AdminDBList = self::Adminlist();
     $this->_UseLoginName = !$jemsettings->get('global_regname', 1);
     // regname == 1: name, 0: username (login name)
 }
开发者ID:JKoelman,项目名称:JEM-3,代码行数:20,代码来源:mailer.php


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