Ejemplo n.º 1
0
 function display($tpl = null)
 {
     $this->items = $this->get('Items');
     $this->pagination = $this->get('Pagination');
     $this->state = $this->get('State');
     //$this->filterForm = $this->get('FilterForm');
     //$this->activeFilters = $this->get('ActiveFilters');
     JToolbarHelper::addNew('channel.add');
     JToolbarHelper::publish('channels.publish', 'JTOOLBAR_PUBLISH', true);
     //        JToolBarHelper::publishList();
     JToolBarHelper::unpublish('channels.unpublish', 'JTOOLBAR_UNPUBLISH', true);
     JToolbarHelper::deleteList('', 'channels.delete', 'JTOOLBAR_TRASH');
     // Check for errors.
     if (count($errors = $this->get('Errors'))) {
         JError::raiseError(500, implode("\n", $errors));
         return false;
     }
     $title = "JFBConnect: Social Channels";
     /*        if ($layout != 'display' && $layout != 'default')
               {
                   JToolBarHelper::custom('display', 'opengraph.png', 'index.php?option=com_jfbconnect&view=opengraph', 'Open Graph Home', false);
                   JToolBarHelper::divider();
               }*/
     JToolBarHelper::title($title, 'jfbconnect.png');
     SCAdminHelper::addAutotuneToolbarItem();
     parent::display($tpl);
 }
Ejemplo n.º 2
0
 function display($tpl = null)
 {
     $this->form = $this->get('Form');
     $this->state = $this->get('State');
     $this->item = $this->get('Item');
     $this->channelModel = $this->getModel('channel');
     $this->pagination = $this->get('Pagination');
     JToolBarHelper::apply('channel.apply', 'Save');
     JToolBarHelper::save('channel.save', 'Save & Close');
     JToolBarHelper::cancel('channel.cancel', 'Cancel');
     JFactory::getDocument()->addScriptDeclaration('var jfbc_language_click_save="' . JText::_('COM_JFBCONNECT_CHANNEL_CLICK_SAVE_LOAD_SETTINGS_LABEL') . '";');
     JFactory::getDocument()->addScriptDeclaration('var jfbc_language_select_provider="' . JText::_('COM_JFBCONNECT_CHANNEL_SELECT_PROVIDER_CHANNEL_LABEL') . '";');
     JFactory::getDocument()->addStyleSheet(JURI::root(true) . "/media/system/css/modal.css");
     JFactory::getDocument()->addScript(JURI::root(true) . "/media/system/js/mootools-core.js");
     if (defined('SC30')) {
         JFactory::getDocument()->addScript(JURI::root(true) . "/media/system/js/mootools-more.js");
     }
     //SC30
     JFactory::getDocument()->addScript(JURI::root(true) . "/media/system/js/core.js");
     JFactory::getDocument()->addScript(JURI::root(true) . "/media/system/js/modal.js");
     if (defined('SC16')) {
         JFactory::getDocument()->addScriptDeclaration('function jSelectUser_jform_attribs_user_id(id, title) {
          var old_id = document.getElementById("jform_attribs_user_id_id").value;
          if (old_id != id) {
          document.getElementById("jform_attribs_user_id_id").value = id;
          document.getElementById("jform_attribs_user_id_name").value = title;
          jfbcAdmin.channels.outbound.onuserchange(this.value)
          }
         SqueezeBox.close();
         }');
     }
     //SC16
     if (defined('SC30')) {
         JFactory::getDocument()->addScriptDeclaration('function jSelectUser_jform_attribs_user_id(id, title) {
          var old_id = document.getElementById("jform_attribs_user_id_id").value;
          if (old_id != id) {
             document.getElementById("jform_attribs_user_id_id").value = id;
             document.getElementById("jform_attribs_user_id").value = title;
             document.getElementById("jform_attribs_user_id").className = document.getElementById("jform_attribs_user_id").className.replace(" invalid" , "");
             jfbcAdmin.channels.outbound.onuserchange(this.value)
         }
         SqueezeBox.close();
         }');
     }
     //SC30
     // Check for errors.
     if (count($errors = $this->get('Errors'))) {
         JError::raiseError(500, implode("\n", $errors));
         return false;
     }
     $title = "JFBConnect: Social Channels";
     JToolBarHelper::title($title, 'jfbconnect.png');
     SCAdminHelper::addAutotuneToolbarItem();
     parent::display($tpl);
 }
Ejemplo n.º 3
0
 function display($tpl = null)
 {
     $app = JFactory::getApplication();
     JPluginHelper::importPlugin('socialprofiles');
     $profilePlugins = $app->triggerEvent('socialProfilesGetPlugins');
     $this->assignRef('profilePlugins', $profilePlugins);
     foreach ($profilePlugins as $p) {
         $options = array();
         $options['control'] = "profiles_" . $p->getName();
         SCStringUtilities::loadLanguage('plg_socialprofiles_' . $p->getName(), JPATH_ADMINISTRATOR);
         $path = JPATH_SITE . '/plugins/socialprofiles/' . $p->getName();
         JForm::addFieldPath($path . '/fields/');
         $this->formLoad($p->getName(), $path . '/forms/config.xml', $options);
         $data = JFBCFactory::config()->get('profile_' . $p->getName());
         $reg = new JRegistry();
         $reg->loadString($data);
         $this->formBind($p->getName(), $reg);
     }
     parent::display($tpl);
 }
Ejemplo n.º 4
0
 function display($tpl = null)
 {
     JForm::addFieldPath(JPATH_ADMINISTRATOR . '/components/com_jfbconnect/models/fields');
     $this->formLoad('config', JPATH_ADMINISTRATOR . '/components/com_jfbconnect/models/forms/config.xml');
     $this->formBind('config', JFBCFactory::config()->getSettings());
     foreach (JFBCFactory::getAllProviders() as $p) {
         $configPath = JPATH_SITE . '/components/com_jfbconnect/libraries/provider/' . strtolower($p->systemName) . '/config/';
         JForm::addFieldPath($configPath . 'fields');
         $this->formLoad($p->systemName, $configPath . 'config.xml');
         $loginField = '<form>' . '<fieldset name="login_button" label="' . JText::_('COM_JFBCONNECT_PROVIDER_MENU_LOGIN_BUTTON') . '">' . '<field type="providerloginbutton"
                 label="' . JText::_('COM_JFBCONNECT_CONFIG_LOGIN_BUTTON_DEFAULT_LABEL') . '"
                 description="' . JText::_('COM_JFBCONNECT_CONFIG_LOGIN_BUTTON_DEFAULT_DESC') . '"
                 provider="' . $p->systemName . '"
                 name="' . $p->systemName . '_login_button"
                 required="true"
                 default="icon_label.png"
                 />' . '</fieldset>' . '</form>';
         $this->forms[$p->systemName]->load($loginField);
         $this->formBind($p->systemName, JFBCFactory::config()->getSettings());
     }
     parent::display($tpl);
 }