Exemplo n.º 1
0
 function jevResetFilter($contentElement)
 {
     $this->filterNullValue = -1;
     $this->filterType = "reset";
     $this->filterField = "";
     parent::jevFilter($contentElement, "");
 }
Exemplo n.º 2
0
 function __construct($tablename, $filterfield, $isstring = true)
 {
     // setup for all required function and classes
     $file = JPATH_SITE . '/components/com_jevents/mod.defines.php';
     if (file_exists($file)) {
         include_once $file;
     }
     $reg =& JevRegistry::getInstance("jevents");
     $this->datamodel = $reg->getReference("jevents.datamodel", false);
     if (!$this->datamodel) {
         $this->datamodel = new JEventsDataModel();
         $this->datamodel->setupComponentCatids();
     }
     $this->filterType = "category";
     $this->filterLabel = JText::_('CATEGORY');
     $this->filterNullValue = "0";
     parent::__construct($tablename, "catid", true);
     $catid = $this->filter_value;
     // NO filtering of the list att all
     $this->allAccessibleCategories = $this->datamodel->accessibleCategoryList(null, $this->datamodel->mmcatids, $this->datamodel->mmcatidList);
     if ($this->filter_value == $this->filterNullValue || $this->filter_value == "") {
         $this->accessibleCategories = $this->allAccessibleCategories;
     } else {
         $this->accessibleCategories = $this->datamodel->accessibleCategoryList(null, array($catid), $catid);
     }
 }
Exemplo n.º 3
0
 function __construct($tablename, $filterfield, $isstring = true)
 {
     $this->fieldset = true;
     $this->valueNum = 3;
     $this->filterNullValue = 0;
     $this->filterNullValues[0] = 0;
     // n/a, before, after
     $this->filterNullValues[1] = "";
     // the date
     $this->filterNullValues[2] = 0;
     // true means the form is submitted
     $this->filterType = "startdate";
     $this->filterLabel = "";
     $this->dmap = "rpt";
     parent::__construct($tablename, $filterfield, true);
     // This filter is special and always remembers for logged in users
     if (JFactory::getUser()->id > 0) {
         $this->filter_value = JFactory::getApplication()->getUserStateFromRequest($this->filterType . '_fv_ses', $this->filterType . '_fv', $this->filterNullValue);
         for ($v = 0; $v < $this->valueNum; $v++) {
             $this->filter_values[$v] = JFactory::getApplication()->getUserStateFromRequest($this->filterType . '_fvs_ses' . $v, $this->filterType . '_fvs' . $v, $this->filterNullValues[$v]);
         }
     }
     $this->_date = $this->filter_values[1];
     $this->_onorbefore = $this->filter_values[0];
 }
Exemplo n.º 4
0
 function jevJustmineFilter($tablename, $filterfield, $isstring = true, $yesLabel = "Jev_Yes", $noLabel = "Jev_No")
 {
     $this->filterNullValue = "0";
     $this->yesLabel = JText::_($yesLabel);
     $this->noLabel = JText::_($noLabel);
     $this->filterType = "justmine";
     $this->filterLabel = JText::_("Show_Only_My_Events");
     // this is a special filter - we always want memory here since only used in frontend management
     $this->filter_value = JFactory::getApplication()->getUserStateFromRequest($this->filterType . '_fv_ses', $this->filterType . '_fv', $this->filterNullValue);
     JRequest::setVar($this->filterType . '_fv', $this->filter_value);
     parent::jevFilter($tablename, "state", $isstring);
 }
Exemplo n.º 5
0
 function __construct($tablename, $filterfield, $isstring = true)
 {
     $this->filterType = "search";
     $this->filterLabel = JText::_('SEARCH_EVENT');
     $this->filterNullValue = "";
     parent::__construct($tablename, $filterfield, true);
     // Should these be ignored?
     $reg =& JFactory::getConfig();
     $modparams = $reg->getValue("jev.modparams", false);
     if ($modparams && $modparams->getValue("ignorefiltermodule", false)) {
         $this->filter_value = $this->filterNullValue;
     }
 }
Exemplo n.º 6
0
 function jevPublishedFilter($tablename, $filterfield, $isstring = true, $yesLabel = "Jev_Yes", $noLabel = "Jev_No")
 {
     $this->filterNullValue = "0";
     $this->allLabel = JText::_('ALL');
     $this->yesLabel = JText::_($yesLabel);
     $this->noLabel = JText::_($noLabel);
     $this->filterType = "published";
     $this->filterLabel = JText::_("Show_Unpublished_Events");
     // this is a special filter - we always want memory here since only used in frontend management
     $this->filter_value = JFactory::getApplication()->getUserStateFromRequest($this->filterType . '_fv_ses', $this->filterType . '_fv', $this->filterNullValue);
     JRequest::setVar($this->filterType . '_fv', $this->filter_value);
     parent::jevFilter($tablename, "state", $isstring);
     // event creators can look at their own unpublished events
     if (!JEVHelper::isEventCreator()) {
         $this->filter_value = $this->filterNullValue;
     }
 }
Exemplo n.º 7
0
 function __construct($tablename, $filterfield, $isstring = true)
 {
     $this->fieldset = true;
     $this->valueNum = 3;
     $this->filterNullValue = 0;
     $this->filterNullValues[0] = 0;
     // n/a, before, after
     $this->filterNullValues[1] = "";
     // the date
     $this->filterNullValues[2] = 0;
     // true means the form is submitted
     $this->filterType = "startdate";
     $this->filterLabel = "";
     $this->dmap = "rpt";
     parent::__construct($tablename, $filterfield, true);
     $this->_date = $this->filter_values[1];
     $this->_onorbefore = $this->filter_values[0];
 }
Exemplo n.º 8
0
 function __construct($tablename, $filterfield, $isstring = true, $yesLabel = "Jev_Yes", $noLabel = "Jev_No")
 {
     $this->filterType = self::filterType;
     $task = JRequest::getVar('view', '') . '.' . JRequest::getVar('layout', '');
     if ($task == "admin.listevents") {
         $default_filter = "-1";
     } else {
         $default_filter = "0";
     }
     $this->filterNullValue = $default_filter;
     $this->allLabel = JText::_('ALL');
     $this->yesLabel = JText::_($yesLabel);
     $this->noLabel = JText::_($noLabel);
     $this->filterLabel = JText::_("Show_Unpublished_Events");
     // this is a special filter - we always want memory here since only used in frontend management
     $this->filter_value = JFactory::getApplication()->getUserStateFromRequest($this->filterType . '_fv_ses', $this->filterType . '_fv', $this->filterNullValue);
     JRequest::setVar($this->filterType . '_fv', $this->filter_value);
     parent::jevFilter($tablename, "state", $isstring);
     // event creators can look at their own unpublished events
     if (!JEVHelper::isEventCreator()) {
         $this->filter_value = $this->filterNullValue;
     }
 }
Exemplo n.º 9
0
 function jevTitleFilter($tablename, $filterfield, $isstring = true)
 {
     $this->filterNullValue = "";
     $this->filterType = "title";
     parent::jevFilter($tablename, $filterfield, true);
 }