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


PHP JEVHelper::ConditionalFields方法代码示例

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


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

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

示例2: getInput

 protected function getInput()
 {
     JLoader::register('JEVHelper', JPATH_SITE . "/components/com_jevents/libraries/helper.php");
     JEVHelper::ConditionalFields($this->element, $this->form->getName());
     $params = JComponentHelper::getParams("com_jevents");
     $value = (int) $this->value;
     if ($value == -1) {
         if (version_compare(JVERSION, '3.0.0', "<")) {
             $default25 = (string) $this->element["default25"];
             if ($default25 != "") {
                 $this->value = $this->default = intval($default25);
             }
         } else {
             if (version_compare(JVERSION, '3.0.0', ">=")) {
                 $default30 = (string) $this->element["default30"];
                 if ($default30 != "") {
                     $this->value = $this->default = intval($default30);
                 }
             }
         }
     }
     if (!$params->get("bootstrapchosen", 1)) {
         $x = 1;
     }
     return parent::getInput();
 }
开发者ID:poorgeek,项目名称:JEvents,代码行数:26,代码来源:jevboolean.php

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

示例4: getInput

 protected function getInput()
 {
     $this->value = str_replace('<br />', "\n", strpos($this->value, " ") > 0 ? $this->value : JText::_($this->value));
     JLoader::register('JEVHelper', JPATH_SITE . "/components/com_jevents/libraries/helper.php");
     JEVHelper::ConditionalFields($this->element, $this->form->getName());
     return parent::getInput();
 }
开发者ID:hriggs,项目名称:cs-website,代码行数:7,代码来源:jevtextarea.php

示例5: getInput

 protected function getInput()
 {
     JLoader::register('JEVHelper', JPATH_SITE . "/components/com_jevents/libraries/helper.php");
     JEVHelper::ConditionalFields($this->element, $this->form->getName());
     $input = parent::getInput();
     return $input;
 }
开发者ID:madcsaba,项目名称:li-de,代码行数:7,代码来源:jevcheckbox.php

示例6: getInput

    protected function getInput()
    {
        if (!JevJoomlaVersion::isCompatible("3.4")) {
            return "";
        }
        JLoader::register('JEVHelper', JPATH_SITE . "/components/com_jevents/libraries/helper.php");
        JEVHelper::ConditionalFields($this->element, $this->form->getName());
        $layouttype = $this->getAttribute("layouttype");
        $target = $this->getAttribute("target");
        $csstarget = $this->getAttribute("csstarget");
        JHtml::script("https://www.jevents.net/jevlayouts/LatestEvents.js");
        $html = "<script>jQuery(document).ready(function (\$){loadJevPreview('{$target}', '{$csstarget}');});</script>";
        $id = $this->id;
        $html .= <<<DROPDOWN
<div class="dropdown btn-group" id="{$id}">
  <button class="btn btn-default dropdown-toggle" type="button" id="dropdown{$target}" data-toggle="dropdown" aria-expanded="false">
    Select Layout
    <span class="caret"></span>
  </button>
  <ul class="dropdown-menu" role="menu" aria-labelledby="dropdown{$target}" id="dropdownUL_{$target}" role="menu">
    <li role="presentation"><a role="menuitem" class="dropdownpopover" href="#" data-title="Current Customised Value" data-content="Custom Format String customised by you">Current Value</a></li>
    </ul>
</div>
DROPDOWN;
        return $html;
    }
开发者ID:poorgeek,项目名称:JEvents,代码行数:26,代码来源:jevcustomlayout.php

示例7: getInput

 protected function getInput()
 {
     JLoader::register('JEVHelper', JPATH_SITE . "/components/com_jevents/libraries/helper.php");
     JEVHelper::ConditionalFields($this->element, $this->form->getName());
     if ($this->fieldname == "rp_id") {
         // The active event id field.
         if (0 == (int) $this->value) {
             $value = '';
         } else {
             $value = (int) $this->value;
         }
         return '<input type="text" id="selectedrepeat"   name="' . $this->name . '" value="' . $value . '" />';
     }
     // Load the modal behavior script.
     JevHtmlBootstrap::modal('a.modal');
     $js = "\n\t\tfunction jSelectEvent_" . $this->id . "(link, title, Itemid, evid, rpid) {\n\t\t\t\$('selectedeventtitle').value = title;\n\t\t\t\$('selectedevent').value = evid;\n\t\t\t\$('selectedrepeat').value = rpid;\n\t\t\tSqueezeBox.close();\n\t\t\treturn false;\n\t\t}";
     // Add the script to the document head.
     JFactory::getDocument()->addScriptDeclaration($js);
     // Setup variables for display.
     $html = array();
     $link = 'index.php?option=com_jevents&amp;task=icalevent.select&amp;tmpl=component&amp;' . JSession::getFormToken() . '=1&amp;nomenu=1&function=jSelectEvent_' . $this->id;
     // get the repeat id
     $rpidfield = $this->form->getField("rp_id", "request");
     $rp_id = $rpidfield->value;
     $db = JFactory::getDBO();
     $db->setQuery('SELECT det.summary as title' . ' FROM #__jevents_vevdetail as det ' . ' LEFT JOIN #__jevents_repetition as rep ON rep.eventdetail_id = det.evdet_id' . ' WHERE rep.rp_id = ' . (int) $rp_id);
     $title = $db->loadResult();
     echo $db->getErrorMsg();
     if ($error = $db->getErrorMsg()) {
         JError::raiseWarning(500, $error);
     }
     if (empty($title)) {
         $title = JText::_('COM_JEVENTS_FIELD_SELECT_EVENT_LABEL');
     }
     $title = htmlspecialchars($title, ENT_QUOTES, 'UTF-8');
     // The current user display field.
     $html[] = '<div class="fltlft">';
     $html[] = '  <input type="text" id="selectedeventtitle" value="' . $title . '" disabled="disabled" size="35" />';
     $html[] = '</div>';
     // The user select button.
     $html[] = '<div class="button2-left">';
     $html[] = '  <div class="blank">';
     $html[] = '	<a class="modal" title="' . JText::_('COM_JEVENTS_CHANGE_EVENT') . '"  href="' . $link . '" rel="{handler: \'iframe\', size: {x: 800, y: 450}}">' . JText::_('COM_JEVENTS_CHANGE_EVENT_BUTTON') . '</a>';
     $html[] = '  </div>';
     $html[] = '</div>';
     // The active event id field.
     if (0 == (int) $this->value) {
         $value = '';
     } else {
         $value = (int) $this->value;
     }
     // class='required' for client side validation
     $class = '';
     if ($this->required) {
         $class = ' class="required modal-value"';
     }
     $html[] = '<input type="hidden" id="selectedevent"  ' . $class . ' name="' . $this->name . '" value="' . $value . '" />';
     return implode("\n", $html);
 }
开发者ID:pguilford,项目名称:vcomcc,代码行数:59,代码来源:jevselectevent.php

示例8: getInput

 protected function getInput()
 {
     JLoader::register('JEVHelper', JPATH_SITE . "/components/com_jevents/libraries/helper.php");
     JEVHelper::ConditionalFields($this->element, $this->form->getName());
     if ($this->fieldname == "rp_id") {
         // The active event id field.
         if (0 == (int) $this->value) {
             $value = '';
         } else {
             $value = (int) $this->value;
         }
         return '<input type="hidden" id="selectedrepeat"   name="' . $this->name . '" value="' . $value . '" />';
     }
     // Load the modal behavior script.
     JLoader::register('JevModal', JPATH_LIBRARIES . "/jevents/jevmodal/jevmodal.php");
     JevModal::modal("a.selectmodal");
     $js = "\n\t\tfunction jSelectEvent_" . $this->id . "(link, title, Itemid, evid, rpid) {\n\t\t\tjQuery('#selectedeventtitle').val( title);\n\t\t\tjQuery('#selectedevent').val( evid);\n\t\t\tjQuery('#selectedrepeat').val( rpid);\n\t\t\tjQuery('#selectEvent').modal('hide');\n\t\t\treturn false;\n\t\t}";
     // Add the script to the document head.
     JFactory::getDocument()->addScriptDeclaration($js);
     // Setup variables for display.
     $html = array();
     $link = 'index.php?option=com_jevents&amp;task=icalevent.select&amp;tmpl=component&amp;' . JSession::getFormToken() . '=1&amp;nomenu=1&function=jSelectEvent_' . $this->id;
     // get the repeat id
     $rpidfield = $this->form->getField("rp_id", "request");
     $rp_id = $rpidfield->value;
     $db = JFactory::getDBO();
     $db->setQuery('SELECT det.summary as title' . ' FROM #__jevents_vevdetail as det ' . ' LEFT JOIN #__jevents_repetition as rep ON rep.eventdetail_id = det.evdet_id' . ' WHERE rep.rp_id = ' . (int) $rp_id);
     $title = $db->loadResult();
     echo $db->getErrorMsg();
     if ($error = $db->getErrorMsg()) {
         JError::raiseWarning(500, $error);
     }
     if (empty($title)) {
         $title = JText::_('COM_JEVENTS_FIELD_SELECT_EVENT_LABEL');
     }
     $title = htmlspecialchars($title, ENT_QUOTES, 'UTF-8');
     // The current user display field.
     $html[] = '<div class="fltlft input-append" >';
     $html[] = '  <input type="text" id="selectedeventtitle" value="' . $title . '" disabled="disabled" size="50" />';
     $link = "javascript:jevModalPopup('selectEvent', '" . $link . "', '" . JText::_("COM_JEVENTS_CHANGE_EVENT_BUTTON", array('jsSafe' => true)) . "'); ";
     // The user select button.
     $html[] = '	<a class="selectmodal btn btn-primary" title="' . JText::_('COM_JEVENTS_CHANGE_EVENT') . '"  href="' . $link . '" ><span class="icon-list icon-white"></span>' . JText::_('COM_JEVENTS_CHANGE_EVENT_BUTTON') . '</a>';
     $html[] = '</div>';
     // The active event id field.
     if (0 == (int) $this->value) {
         $value = '';
     } else {
         $value = (int) $this->value;
     }
     // class='required' for client side validation
     $class = '';
     if ($this->required) {
         $class = ' class="required modal-value"';
     }
     $html[] = '<input type="hidden" id="selectedevent"  ' . $class . ' name="' . $this->name . '" value="' . $value . '" />';
     return implode("\n", $html);
 }
开发者ID:poorgeek,项目名称:JEvents,代码行数:57,代码来源:jevselectevent.php

示例9: getInput

 protected function getInput()
 {
     if (is_string($this->value)) {
         $this->value = explode(",", $this->value);
     }
     JLoader::register('JEVHelper', JPATH_SITE . "/components/com_jevents/libraries/helper.php");
     JEVHelper::ConditionalFields($this->element, $this->form->getName());
     return parent::getInput();
 }
开发者ID:madcsaba,项目名称:li-de,代码行数:9,代码来源:jevmultilist.php

示例10: getInput

 /**
  * Method to get the field input markup.
  *
  * @return	string	The field input markup.
  * @since	1.6
  */
 protected function getInput()
 {
     JLoader::register('JEVHelper', JPATH_SITE . "/components/com_jevents/libraries/helper.php");
     JEVHelper::ConditionalFields($this->element, $this->form->getName());
     if (isset($this->form->jevdata[$this->name]["users"])) {
         return $this->form->jevdata[$this->name]["users"];
     } else {
         return "";
     }
 }
开发者ID:madcsaba,项目名称:li-de,代码行数:16,代码来源:jeveventcreator.php

示例11: getInput

 /**
  * Method to get the field input markup.
  *
  * @return	string	The field input markup.
  * @since	1.6
  */
 protected function getInput()
 {
     $glist = $this->form->jevdata[$this->name]["glist"];
     JLoader::register('JEVHelper', JPATH_SITE . "/components/com_jevents/libraries/helper.php");
     JEVHelper::ConditionalFields($this->element, $this->form->getName());
     if ($glist) {
         return $glist;
     }
     return "";
 }
开发者ID:madcsaba,项目名称:li-de,代码行数:16,代码来源:jeveventaccess.php

示例12: getInput

 protected function getInput()
 {
     $style = ' class="jev_none" ';
     // if not showing copyright show message
     if (!$this->value) {
         $style = ' class="jev_block" ';
     }
     JLoader::register('JEVHelper', JPATH_SITE . "/components/com_jevents/libraries/helper.php");
     JEVHelper::ConditionalFields($this->element, $this->form->getName());
     return parent::getInput() . '<div id="jevcopymsg" ' . $style . '>' . JText::_("Before removing the copyright footer please read this important message at the <a href='https://www.jevents.net/hidecopyright?tmpl=component&template=beez_20' title='get hide copyright code' class='modal' rel='{handler: \"iframe\", size: {x: 650, y: 450}}'>JEvents website</a>.") . '</div>';
 }
开发者ID:madcsaba,项目名称:li-de,代码行数:11,代码来源:jevboolmsg.php

示例13: getInput

 /**
  * Method to get the field input markup.
  *
  * @return	string	The field input markup.
  * @since	1.6
  */
 protected function getInput()
 {
     $input = parent::getInput();
     if (strpos($input, "placeholder") === false) {
         $placeholder = $this->element['placeholder'] ? ' placeholder="' . htmlspecialchars(JText::_($this->element['placeholder'])) . '"' : '';
         $input = str_replace("/>", " {$placeholder} />", $input);
     }
     JLoader::register('JEVHelper', JPATH_SITE . "/components/com_jevents/libraries/helper.php");
     JEVHelper::ConditionalFields($this->element, $this->form->getName());
     return $input;
 }
开发者ID:madcsaba,项目名称:li-de,代码行数:17,代码来源:jeveventtext.php

示例14: getInput

 protected function getInput()
 {
     JLoader::register('JEVHelper', JPATH_SITE . "/components/com_jevents/libraries/helper.php");
     JEVHelper::ConditionalFields($this->element, $this->form->getName());
     if (!defined("JEV_COM_COMPONENT")) {
         define("JEV_COM_COMPONENT", "com_jevents");
         define("JEV_COMPONENT", str_replace("com_", "", JEV_COM_COMPONENT));
     }
     JEVHelper::stylesheet('eventsadmin.css', 'components/' . JEV_COM_COMPONENT . '/assets/css/');
     return parent::getInput();
 }
开发者ID:hriggs,项目名称:cs-website,代码行数:11,代码来源:jevmenu.php

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


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