Пример #1
0
 /**
  * Method to get the field input markup.
  *
  * @return  string	The field input markup.
  * @since   1.6
  */
 protected function getInput()
 {
     // Load the language file.
     FD::language()->loadAdmin();
     // Render the headers
     FD::page()->start();
     // Attach dialog's css file.
     JFactory::getDocument()->addStylesheet(rtrim(JURI::root(), '/') . '/administrator/components/com_easysocial/themes/default/styles/style.css');
     $theme = FD::themes();
     $label = (string) $this->element['label'];
     $name = (string) $this->name;
     $title = JText::_('COM_EASYSOCIAL_JFIELD_SELECT_BADGE');
     if ($this->value) {
         $badge = FD::table('Badge');
         $badge->load($this->value);
         $title = $badge->get('title');
     }
     $theme->set('name', $name);
     $theme->set('id', $this->id);
     $theme->set('value', $this->value);
     $theme->set('label', $label);
     $theme->set('title', $title);
     $output = $theme->output('admin/jfields/badge');
     // We do not want to process stylesheets on Joomla 2.5 and below.
     $options = array();
     if (FD::version()->getVersion() < 3) {
         $options['processStylesheets'] = false;
     }
     FD::page()->end($options);
     return $output;
 }
Пример #2
0
 protected function getInput()
 {
     // Load the language file.
     FD::language()->loadAdmin();
     // Render the headers
     FD::page()->start();
     $theme = FD::themes();
     $label = (string) $this->element['label'];
     $name = (string) $this->name;
     $title = JText::_('COM_EASYSOCIAL_JFIELD_SELECT_PROFILE');
     if ($this->value) {
         $profile = FD::table('Profile');
         $profile->load($this->value);
         $title = $profile->get('title');
     }
     $theme->set('name', $name);
     $theme->set('id', $this->id);
     $theme->set('value', $this->value);
     $theme->set('label', $label);
     $theme->set('title', $title);
     $output = $theme->output('admin/jfields/profile');
     // We do not want to process stylesheets on Joomla 2.5 and below.
     $options = array();
     if (FD::version()->getVersion() < 3) {
         $options['processStylesheets'] = false;
     }
     FD::page()->end($options);
     return $output;
 }
Пример #3
0
 protected function getInput()
 {
     FD::language()->loadAdmin();
     FD::language()->loadSite();
     FD::page()->start();
     JFactory::getDocument()->addStylesheet(rtrim(JURI::root(), '/') . '/administrator/components/com_easysocial/themes/default/styles/style.css');
     $theme = FD::themes();
     $label = (string) $this->element['label'];
     $name = (string) $this->name;
     $title = JText::_('COM_EASYSOCIAL_JFIELD_SELECT_EVENT');
     if ($this->value) {
         $id = explode(':', $this->value);
         $id = $id[0];
         $group = FD::group($id);
         $title = $group->getName();
     }
     $theme->set('name', $name);
     $theme->set('id', $this->id);
     $theme->set('value', $this->value);
     $theme->set('label', $label);
     $theme->set('title', $title);
     $output = $theme->output('admin/jfields/event');
     // We do not want to process stylesheets on Joomla 2.5 and below.
     $options = array();
     if (FD::version()->getVersion() < 3) {
         $options['processStylesheets'] = false;
     }
     FD::page()->end($options);
     return $output;
 }
Пример #4
0
 protected function getInput()
 {
     FD::language()->loadAdmin();
     FD::language()->loadSite();
     FD::page()->start();
     JFactory::getDocument()->addStylesheet(rtrim(JURI::root(), '/') . '/administrator/components/com_easysocial/themes/default/styles/style.css');
     $theme = FD::themes();
     $label = (string) $this->element['label'];
     $name = (string) $this->name;
     if ($this->value) {
         $category = FD::table('EventCategory');
         $category->load($this->value);
         $label = $category->get('title');
     }
     $theme->set('name', $name);
     $theme->set('id', $this->id);
     $theme->set('value', $this->value);
     $theme->set('label', $label);
     $output = $theme->output('admin/jfields/eventcategory');
     // We do not want to process stylesheets on Joomla 2.5 and below.
     $options = array();
     if (FD::version()->getVersion() < 3) {
         $options['processStylesheets'] = false;
     }
     FD::page()->end($options);
     return $output;
 }
Пример #5
0
 public function __construct($table, $key, $db)
 {
     // Set internal variables.
     $this->_tbl = $table;
     $this->_tbl_key = $key;
     // For Joomla 3.2 onwards
     $this->_tbl_keys = array($key);
     $this->_db = $db;
     // Implement JObservableInterface:
     // Create observer updater and attaches all observers interested by $this class:
     $version = FD::version();
     if ($version->getVersion() >= '3.0' && class_exists('JObserverUpdater')) {
         $this->_observers = new JObserverUpdater($this);
         JObserverMapper::attachAllObservers($this);
     }
 }