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


PHP JEVHelper类代码示例

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


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

示例1: 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

示例2: getInput

 protected function getInput()
 {
     JLoader::register('JEVHelper', JPATH_SITE . "/components/com_jevents/libraries/helper.php");
     JEVHelper::ConditionalFields($this->element, $this->form->getName());
     if (class_exists("DateTimeZone")) {
         $zones = DateTimeZone::listIdentifiers();
         static $options;
         if (!isset($options)) {
             $options = array();
             $options[] = JHTML::_('select.option', '', '- ' . JText::_('SELECT_TIMEZONE') . ' -');
             foreach ($zones as $zone) {
                 if (strpos($zone, "/") === false && strpos($zone, "UTC") === false) {
                     continue;
                 }
                 if (strpos($zone, "Etc") === 0) {
                     continue;
                 }
                 $options[] = JHTML::_('select.option', $zone, $zone);
             }
         }
         return JHTML::_('select.genericlist', $options, $this->name, 'class="inputbox"', 'value', 'text', $this->value, $this->id);
     } else {
         /*
          * Required to avoid a cycle of encoding &
          * html_entity_decode was used in place of htmlspecialchars_decode because
          * htmlspecialchars_decode is not compatible with PHP 4
          */
         $value = htmlspecialchars(html_entity_decode($value, ENT_QUOTES), ENT_QUOTES);
         return '<input type="text" name="' . $this->name . '" id="' . $this->id . '" value="' . $this->value . '" />';
     }
 }
开发者ID:madcsaba,项目名称:li-de,代码行数:31,代码来源:jevtimezone.php

示例3: AlternativeBuildMonthSelect

 function AlternativeBuildMonthSelect($view, $link, $month, $year)
 {
     for ($a = -6; $a < 6; $a++) {
         $m = $month + $a;
         $y = $year;
         if ($m <= 0) {
             $m += 12;
             $y -= 1;
         }
         if ($m > 12) {
             $m -= 12;
             $y += 1;
         }
         $name_of_month = JEVHelper::getMonthName($m) . " {$y}";
         $monthslist[] = JHTML::_('select.option', "{$m}|{$y}", $name_of_month);
     }
     $link = str_replace(array("day.listevents", "week.listevents", "year.listevents", "cat.listevents", "icalrepeat.detail", "icalevent.detail"), "month.calendar", $link);
     $tosend = "<script type='text/javascript'>\n";
     $tosend .= "/* <![CDATA[ */\n";
     $tosend .= " function selectMD(elem) {\n        var ym = elem.options[elem.selectedIndex].value.split('|');\n";
     $link .= "day=1&month=MMMMmmmm&year=YYYYyyyy";
     $link2 = JRoute::_($link, false);
     $tosend .= "var link = '{$link2}';\n";
     // This is needed in case SEF is not activated
     $tosend .= "link = link.replace(/&/g,'&');\n";
     $tosend .= "link = link.replace(/MMMMmmmm/g,ym[0]);\n";
     $tosend .= "link = link.replace(/YYYYyyyy/g,ym[1]);\n";
     $tosend .= "location.replace(link);\n";
     $tosend .= "}\n";
     $tosend .= "/* ]]> */\n";
     $tosend .= "</script>\n";
     $tosend .= JHTML::_('select.genericlist', $monthslist, 'monthyear', "onchange=\"selectMD(this);\"", 'value', 'text', "{$month}|{$year}");
     $this->result = $tosend;
 }
开发者ID:madcsaba,项目名称:li-de,代码行数:34,代码来源:alternativebuildmonthselect.php

示例4: getInput

    /**
     * Method to get the field input markup.
     *
     * @return	string	The field input markup.
     * @since	1.6
     */
    protected function getInput()
    {
        ob_start();
        $event = $this->form->jevdata[$this->name]["event"];
        $eventfield = $this->name == "publish_up" ? "startDate" : "endDate";
        $params = JComponentHelper::getParams(JEV_COM_COMPONENT);
        $minyear = JEVHelper::getMinYear();
        $maxyear = JEVHelper::getMaxYear();
        $inputdateformat = $params->get("com_editdateformat", "d.m.Y");
        static $firsttime;
        if (!defined($firsttime)) {
            $document = JFactory::getDocument();
            $js = "\neventEditDateFormat='{$inputdateformat}';//Date.defineParser(eventEditDateFormat.replace('d','%d').replace('m','%m').replace('Y','%Y'));";
            $document->addScriptDeclaration($js);
            $firsttime = false;
        }
        $cal = JEVHelper::loadCalendar($this->name, $this->name, $event->{$eventfield}(), $minyear, $maxyear, 'var elem =jevjq(this);' . $this->element['onhidestart'], "var elem = jevjq(this);" . $this->element['onchange'], $inputdateformat);
        echo $cal;
        ?>
		<input type="hidden"  name="<?php 
        echo $this->name;
        ?>
2" id="<?php 
        echo $this->name;
        ?>
2" value="" />
		<?php 
        $html = ob_get_clean();
        JLoader::register('JEVHelper', JPATH_SITE . "/components/com_jevents/libraries/helper.php");
        JEVHelper::ConditionalFields($this->element, $this->form->getName());
        return $html;
    }
开发者ID:pguilford,项目名称:vcomcc,代码行数:38,代码来源:jeveventdate.php

示例5: __construct

 function __construct($config = null)
 {
     parent::__construct($config);
     $this->jevlayout = "flat";
     $this->addHelperPath(dirname(__FILE__) . "/../helpers/");
     $this->addHelperPath(JPATH_BASE . '/' . 'templates' . '/' . JFactory::getApplication()->getTemplate() . '/' . 'html' . '/' . JEV_COM_COMPONENT . '/' . "helpers");
     $document = JFactory::getDocument();
     $params = JComponentHelper::getParams(JEV_COM_COMPONENT);
     if ($params->get("flatscalable", "1") == "1" || $params->get("flatwidth", 905) == "scalable") {
         jimport('joomla.environment.browser');
         $browser = JBrowser::getInstance();
         $browserType = $browser->getBrowser();
         $browserVersion = $browser->getMajor();
         if ($browserType == 'msie' && $browserVersion < 9) {
             JEVHelper::componentStylesheet($this, "scalable_ie8.css");
         } else {
             JEVHelper::componentStylesheet($this, "scalable.css");
         }
         JEVHelper::componentStylesheet($this);
     } else {
         JEVHelper::componentStylesheet($this);
         JEVHelper::componentStylesheet($this, "w" . $params->get("flatwidth", 905) . ".css");
     }
     if ($params->get("darktemplate", 0)) {
         JEVHelper::componentStylesheet($this, "dark.css");
     }
     $stylelink = '<!--[if lte IE 6]>' . "\n";
     $stylelink .= '<link rel="stylesheet" href="' . JURI::root() . 'components/com_jevents/views/flat/assets/css/ie6.css" />' . "\n";
     $stylelink .= '<![endif]-->' . "\n";
     $document->addCustomTag($stylelink);
     $this->colourscheme = $params->get("flatcolourscheme", "red");
     if ($this->colourscheme == "gray") {
         //$this->colourscheme = "";
     }
 }
开发者ID:madcsaba,项目名称:li-de,代码行数:35,代码来源:abstract.php

示例6: chosen

 /**
  * Method to load the Chosen JavaScript framework and supporting CSS into the document head
  *
  * If debugging mode is on an uncompressed version of Chosen is included for easier debugging.
  *
  * @param   string  $selector  Class for Chosen elements.
  * @param   mixed   $debug     Is debugging mode on? [optional]
  * @param   array   $options   the possible Chosen options as name => value [optional]
  *
  * @return  void
  *
  * @since   3.0
  */
 public static function chosen($selector = '.advancedSelect', $debug = null, $options = array())
 {
     if (isset(static::$loaded[__METHOD__][$selector])) {
         return;
     }
     // Include jQuery
     //JHtml::_('jquery.framework');
     // If no debugging value is set, use the configuration setting
     if ($debug === null) {
         $config = JFactory::getConfig();
         $debug = (bool) $config->get('debug');
     }
     // Default settings
     $options['disable_search_threshold'] = isset($options['disable_search_threshold']) ? $options['disable_search_threshold'] : 10;
     $options['allow_single_deselect'] = isset($options['allow_single_deselect']) ? $options['allow_single_deselect'] : true;
     $options['placeholder_text_multiple'] = isset($options['placeholder_text_multiple']) ? $options['placeholder_text_multiple'] : JText::_('JGLOBAL_SELECT_SOME_OPTIONS');
     $options['placeholder_text_single'] = isset($options['placeholder_text_single']) ? $options['placeholder_text_single'] : JText::_('JGLOBAL_SELECT_AN_OPTION');
     $options['no_results_text'] = isset($options['no_results_text']) ? $options['no_results_text'] : JText::_('JGLOBAL_SELECT_NO_RESULTS_MATCH');
     // Options array to json options string
     $options_str = json_encode($options, $debug && defined('JSON_PRETTY_PRINT') ? JSON_PRETTY_PRINT : false);
     JEVHelper::script("components/com_jevents/assets/js/chosen.jquery.js");
     JHTML::stylesheet("components/com_jevents/assets/css/chosen.css");
     //JHtml::_('script', 'jui/chosen.jquery.min.js', false, true, false, false, $debug);
     //JHtml::_('stylesheet', 'jui/chosen.css', false, true);
     JFactory::getDocument()->addScriptDeclaration("\n\t\t\t\tjQuery(document).ready(function (){\n\t\t\t\t\tjQuery('" . $selector . "').chosen(" . $options_str . ");\n\t\t\t\t});\n\t\t\t");
     static::$loaded[__METHOD__][$selector] = true;
     return;
 }
开发者ID:poorgeek,项目名称:JEvents,代码行数:41,代码来源:formbehavior.php

示例7: fetchElement

 function fetchElement($name, $value, &$node, $control_name)
 {
     // Must load admin language files
     $lang = JFactory::getLanguage();
     $lang->load("com_jevents", JPATH_ADMINISTRATOR);
     $help = $node->attributes('help');
     // RSH 10/5/10 Added this for J!1.6 - $help is now an JXMLElement
     if (!is_null($help) && version_compare(JVERSION, '1.6.0', ">=")) {
         if (is_object($help)) {
             $help = $help->data();
         }
         $help = isset($help) && strlen($help) <= 0 ? null : $help;
     }
     if (!is_null($help)) {
         $parts = explode(",", $value);
         $helps = explode(",", $help);
         foreach ($parts as $key => $valuepart) {
             $help = $helps[$key];
             list($helpfile, $varname, $part) = explode("::", $help);
             JEVHelper::loadOverlib();
             $lang = JFactory::getLanguage();
             $langtag = $lang->getTag();
             if (file_exists(JPATH_COMPONENT_ADMINISTRATOR . '/help/' . $langtag . '/' . $helpfile)) {
                 $jeventHelpPopup = JPATH_COMPONENT_ADMINISTRATOR . '/help/' . $langtag . '/' . $helpfile;
             } else {
                 $jeventHelpPopup = JPATH_COMPONENT_ADMINISTRATOR . '/help/en-GB/' . $helpfile;
             }
             include $jeventHelpPopup;
             $help = $this->help(${$varname}, $part);
             $parts[$key] = JText::_($valuepart) . $help;
         }
         $value = implode(", ", $parts);
     }
     return "<strong style='color:#993300'>" . JText::_($value) . "</strong>";
 }
开发者ID:madcsaba,项目名称:li-de,代码行数:35,代码来源:jevinfo.php

示例8: __construct

 function __construct($event, $datamodel, $view = false)
 {
     $cfg = JEVConfig::getInstance();
     $this->event = $event;
     $this->_datamodel = $datamodel;
     $this->_view = $view;
     $this->start_publish = $this->event->getUnixStartDate();
     $this->stop_publish = $this->event->getUnixEndDate();
     $this->title = $this->event->title();
     // On mouse over date formats
     $this->start_date = JEventsHTML::getDateFormat($this->event->yup(), $this->event->mup(), $this->event->dup(), 0);
     //$this->start_time = $this->event->startTime()	;
     $this->start_time = JEVHelper::getTime($this->event->getUnixStartTime(), $this->event->hup(), $this->event->minup());
     $this->stop_date = JEventsHTML::getDateFormat($this->event->ydn(), $this->event->mdn(), $this->event->ddn(), 0);
     //$this->stop_time = $this->event->endTime()	;
     $this->stop_time = JEVHelper::getTime($this->event->getUnixEndTime(), $this->event->hdn(), $this->event->mindn());
     $this->stop_time_midnightFix = $this->stop_time;
     $this->stop_date_midnightFix = $this->stop_date;
     if ($this->event->sdn() == 59 && $this->event->mindn() == 59) {
         $this->stop_time_midnightFix = JEVHelper::getTime($this->event->getUnixEndTime() + 1, 0, 0);
         $this->stop_date_midnightFix = JEventsHTML::getDateFormat($this->event->ydn(), $this->event->mdn(), $this->event->ddn() + 1, 0);
     }
     // we only need the one helper so stick to default layout here!
     $this->jevlayout = "default";
     $this->addHelperPath(JEV_VIEWS . "/default/helpers");
     $this->addHelperPath(JPATH_BASE . '/' . 'templates' . '/' . JFactory::getApplication()->getTemplate() . '/' . 'html' . '/' . JEV_COM_COMPONENT . '/' . "helpers");
     // attach data model
     $reg = JevRegistry::getInstance("jevents");
     $this->datamodel = $reg->getReference("jevents.datamodel");
 }
开发者ID:pguilford,项目名称:vcomcc,代码行数:30,代码来源:calendar_cell.php

示例9: edit

 function edit($tpl = null)
 {
     $document = JFactory::getDocument();
     include JEV_ADMINLIBS . "editStrings.php";
     $document->addScriptDeclaration($editStrings);
     JEVHelper::script('editicalJQ.js', 'components/' . JEV_COM_COMPONENT . '/assets/js/');
     JEVHelper::script('view_detailJQ.js', 'components/' . JEV_COM_COMPONENT . '/assets/js/');
     JEVHelper::script('JevStdRequiredFieldsJQ.js', 'components/' . JEV_COM_COMPONENT . '/assets/js/');
     $document->setTitle(JText::_('EDIT_ICAL_REPEAT'));
     // Set toolbar items for the page
     JToolBarHelper::title(JText::_('EDIT_ICAL_REPEAT'), 'jevents');
     JToolBarHelper::apply('icalrepeat.apply', "JEV_SAVE");
     JToolBarHelper::apply('icalrepeat.save', "JEV_SAVE_CLOSE");
     // We will need this when we offer to change one or more repeats on save!
     //$this->addSaveToolBarButton();
     JToolBarHelper::cancel('icalrepeat.list');
     //JToolBarHelper::help( 'screen.icalrepeat.edit', true);
     $params = JComponentHelper::getParams(JEV_COM_COMPONENT);
     //$section = $params->get("section",0);
     JHTML::_('behavior.tooltip');
     // load Joomla javascript classes
     JHTML::_('behavior.core');
     $this->setLayout("edit");
     $this->setupEditForm();
 }
开发者ID:poorgeek,项目名称:JEvents,代码行数:25,代码来源:view.html.php

示例10: DefaultViewDatecellAddEvent

function DefaultViewDatecellAddEvent($view, $year, $month, $day)
{
    if (JEVHelper::isEventCreator()) {
        JEVHelper::script('view_detail.js', 'components/' . JEV_COM_COMPONENT . "/assets/js/");
        // no events on Saturday or Sunday!
        //if (date("N",mktime(0,0,0,$month,$day, $year))>5) return;
        $editLink = JRoute::_('index.php?option=' . JEV_COM_COMPONENT . '&task=icalevent.edit' . '&year=' . $year . '&month=' . $month . '&day=' . $day . '&Itemid=' . $view->Itemid, true);
        $eventlinkadd = $view->popup ? "javascript:jevEditPopup('" . $editLink . "',{$view->popupw}, {$view->popuph});" : $editLink;
        $transparentGif = JURI::root() . "components/" . JEV_COM_COMPONENT . "/views/" . $view->getViewName() . "/assets/images/transp.gif";
        ?>
    	<a href="<?php 
        echo $eventlinkadd;
        ?>
" title="<?php 
        echo JText::_('JEV_ADDEVENT');
        ?>
" class="addjevent">
        	<img src="<?php 
        echo $transparentGif;
        ?>
" alt="<?php 
        echo JText::_('JEV_ADDEVENT');
        ?>
"/>
    	</a>
    	<?php 
    }
}
开发者ID:madcsaba,项目名称:li-de,代码行数:28,代码来源:defaultviewdatecelladdevent.php

示例11: getLabel

 protected function getLabel()
 {
     if (JFactory::getApplication()->isAdmin() || JEVHelper::isEventPublisher()) {
         return parent::getLabel();
     }
     return "";
 }
开发者ID:madcsaba,项目名称:li-de,代码行数:7,代码来源:jeveventpublished.php

示例12: detail

 function detail($tpl = null)
 {
     JEVHelper::componentStylesheet($this);
     $document = JFactory::getDocument();
     // TODO do this properly
     //$document->setTitle(JText::_( 'BROWSER_TITLE' ));
     $params = JComponentHelper::getParams(JEV_COM_COMPONENT);
     //$this->assign("introduction", $params->get("intro",""));
     $this->data = $this->datamodel->getEventData($this->evid, $this->jevtype, $this->year, $this->month, $this->day);
     // Dynamic pathway
     if (isset($this->data['row'])) {
         $pathway = JFactory::getApplication()->getPathway();
         $pathway->addItem($this->data['row']->title(), "");
         // Set date in view for use in navigation icons
         $this->year = $this->data['row']->yup();
         $this->month = $this->data['row']->mup();
         $this->day = $this->data['row']->dup();
         // seth month and year to be used by mini-calendar if needed
         if (!JRequest::getVar("month", 0)) {
             JRequest::setVar("month", $this->month);
         }
         if (!JRequest::getVar("year", 0)) {
             JRequest::setVar("year", $this->year);
         }
     }
 }
开发者ID:madcsaba,项目名称:li-de,代码行数:26,代码来源:view.html.php

示例13: edit

 function edit()
 {
     JEVHelper::stylesheet('eventsadmin.css', 'administrator/components/' . JEV_COM_COMPONENT . '/assets/css/');
     $document =& JFactory::getDocument();
     $document->setTitle(JText::_('COM_JEVENTS_CONFIGURATION'));
     // Set toolbar items for the page
     JToolBarHelper::title(JText::_('COM_JEVENTS_CONFIGURATION'), 'jevents');
     //APPLY BUTTON BY PRAKASH.
     JToolBarHelper::apply('params.apply');
     //APPLY BUTTON
     JToolBarHelper::save('params.save');
     JToolBarHelper::cancel('cpanel.cpanel');
     $model = $this->getModel();
     $this->params =& $model->getParams();
     $component = JComponentHelper::getComponent(JEV_COM_COMPONENT);
     JHTML::_('behavior.tooltip');
     if (JVersion::isCompatible("1.6.0")) {
         // Get the actions for the asset.
         $actions = JAccess::getActions(JEV_COM_COMPONENT, "component");
         jimport('joomla.form.form');
         // Add the search path for the admin component config.xml file.
         JForm::addFormPath(JPATH_ADMINISTRATOR . '/components/' . JEV_COM_COMPONENT);
         // Get the form.
         $modelForm = $model->getForm();
         $this->assignRef("form", $modelForm);
     }
 }
开发者ID:andreassetiawanhartanto,项目名称:PDKKI,代码行数:27,代码来源:view.html.php

示例14: edit

 function edit($tpl = null)
 {
     $document = JFactory::getDocument();
     include JEV_ADMINLIBS . "editStrings.php";
     $document->addScriptDeclaration($editStrings);
     JEVHelper::script('editical.js', 'components/' . JEV_COM_COMPONENT . '/assets/js/');
     JEVHelper::script('view_detail.js', 'components/' . JEV_COM_COMPONENT . '/assets/js/');
     JEVHelper::script('JevStdRequiredFields.js', 'components/' . JEV_COM_COMPONENT . '/assets/js/');
     $document->setTitle(JText::_('EDIT_ICAL_REPEAT'));
     // Set toolbar items for the page
     JToolBarHelper::title(JText::_('EDIT_ICAL_REPEAT'), 'jevents');
     JToolBarHelper::apply('icalrepeat.apply', "JEV_SAVE");
     $this->addSaveToolBarButton();
     //$this->addCancelToolBarButton();
     JToolBarHelper::cancel('icalrepeat.list');
     //JToolBarHelper::help( 'screen.icalrepeat.edit', true);
     $params = JComponentHelper::getParams(JEV_COM_COMPONENT);
     //$section = $params->get("section",0);
     JHTML::_('behavior.tooltip');
     if (JevJoomlaVersion::isCompatible("3.0")) {
         $this->setLayout("edit");
     } else {
         $this->setLayout("edit16");
     }
     $this->setupEditForm();
 }
开发者ID:madcsaba,项目名称:li-de,代码行数:26,代码来源:view.html.php

示例15: _adminStart

    function _adminStart()
    {
        $dispatcher = JEventDispatcher::getInstance();
        list($this->year, $this->month, $this->day) = JEVHelper::getYMD();
        $this->Itemid = JEVHelper::getItemid();
        $this->datamodel = new JEventsDataModel();
        $dispatcher->trigger('onJEventsHeader', array($this));
        ?>
	<div style="clear:both"
				<?php 
        $mainframe = JFactory::getApplication();
        $params = JComponentHelper::getParams(JEV_COM_COMPONENT);
        echo !JFactory::getApplication()->isAdmin() && $params->get("darktemplate", 0) ? "class='jeventsdark'" : "class='jeventslight'";
        ?>
>
		<div id="toolbar-box" >
<?php 
        $bar = JToolBar::getInstance('toolbar');
        $barhtml = $bar->render();
        //$barhtml = str_replace('href="#"','href="javascript void();"',$barhtml);
        //$barhtml = str_replace('submitbutton','return submitbutton',$barhtml);
        echo $barhtml;
        if (JevJoomlaVersion::isCompatible("3.0")) {
            // JFactory::getApplication()->JComponentTitle;
            $title = "";
        } else {
            $title = JFactory::getApplication()->get('JComponentTitle');
        }
        echo $title;
        ?>
		</div>
<?php 
        $dispatcher = JEventDispatcher::getInstance();
        $dispatcher->trigger('onJEventsFooter', array($this));
    }
开发者ID:hriggs,项目名称:cs-website,代码行数:35,代码来源:view.html.php


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