Ejemplo n.º 1
0
 /**
  * Displays the blocks listings
  *
  * @since	4.0
  * @access	public
  * @param	string
  * @return
  */
 public function display($tpl = null)
 {
     // Check for access
     $this->checkAccess('easyblog.manage.blocks');
     $layout = $this->getLayout();
     if (method_exists($this, $layout)) {
         return $this->{$layout}();
     }
     // Get the filters
     $search = $this->input->get('search', '', 'word');
     $filterGroup = $this->input->get('filter_group', '', 'word');
     $filterState = $this->input->get('filter_state', 'all', 'default');
     $filterState = $filterState == 'all' ? 'all' : (int) $filterState;
     $options = array('filter_state' => $filterState, 'search' => $search, 'filter_group' => $filterGroup);
     // Set the heading
     $this->setHeading('COM_EASYBLOG_TITLE_BLOCKS', '', 'fa-cubes');
     $model = EB::model('Blocks');
     $blocks = $model->getBlocks($options);
     $groups = $model->getGroups();
     $pagination = $model->getPagination($options);
     $this->set('filterState', $filterState);
     $this->set('filterGroup', $filterGroup);
     $this->set('groups', $groups);
     $this->set('pagination', $pagination);
     $this->set('blocks', $blocks);
     $this->set('search', $search);
     parent::display('blocks/default');
 }
Ejemplo n.º 2
0
 /**
  * Display a list of email activities
  *
  * @since	4.0
  * @access	public
  * @param	string
  * @return
  */
 public function display($tpl = null)
 {
     $this->checkAccess('easyblog.manage.mail');
     $layout = $this->getLayout();
     if (method_exists($this, $layout)) {
         return $this->{$layout}();
     }
     // Load frontend language file
     EB::loadLanguages();
     // Set heading
     $this->setHeading('COM_EASYBLOG_TITLE_MAIL_ACTIVITIES', '', 'fa-send-o');
     $filter_state = $this->app->getUserStateFromRequest('com_easyblog.spools.filter_state', 'filter_state', '*', 'word');
     $search = $this->app->getUserStateFromRequest('com_easyblog.spools.search', 'search', '', 'string');
     $search = trim(JString::strtolower($search));
     $order = $this->app->getUserStateFromRequest('com_easyblog.spools.filter_order', 'filter_order', 'created', 'cmd');
     $orderDirection = $this->app->getUserStateFromRequest('com_easyblog.spools.filter_order_Dir', 'filter_order_Dir', 'asc', 'word');
     $mails = $this->get('Data');
     $pagination = $this->get('Pagination');
     $this->set('mails', $mails);
     $this->set('pagination', $pagination);
     $this->set('state', JHTML::_('grid.state', $filter_state, JText::_('COM_EASYBLOG_SENT'), JText::_('COM_EASYBLOG_PENDING')));
     $this->set('search', $search);
     $this->set('order', $order);
     $this->set('orderDirection', $orderDirection);
     parent::display('spools/default');
 }
Ejemplo n.º 3
0
 function display($tpl = null)
 {
     // @rule: Test for user access if on 1.6 and above
     if (EasyBlogHelper::getJoomlaVersion() >= '1.6') {
         if (!JFactory::getUser()->authorise('easyblog.manage.trackback', 'com_easyblog')) {
             JFactory::getApplication()->redirect('index.php', JText::_('JERROR_ALERTNOAUTHOR'), 'error');
             JFactory::getApplication()->close();
         }
     }
     //initialise variables
     $document = JFactory::getDocument();
     $user = JFactory::getUser();
     $mainframe = JFactory::getApplication();
     $filter_state = $mainframe->getUserStateFromRequest('com_easyblog.trackbacks.filter_state', 'filter_state', '*', 'word');
     $search = $mainframe->getUserStateFromRequest('com_easyblog.trackbacks.search', 'search', '', 'string');
     $search = trim(JString::strtolower($search));
     $order = $mainframe->getUserStateFromRequest('com_easyblog.trackbacks.filter_order', 'filter_order', 'created', 'cmd');
     $orderDirection = $mainframe->getUserStateFromRequest('com_easyblog.trackbacks.filter_order_Dir', 'filter_order_Dir', '', 'word');
     //Get data from the model
     $trackbacks = $this->get('Data');
     $pagination = $this->get('Pagination');
     $this->assignRef('trackbacks', $trackbacks);
     $this->assignRef('pagination', $pagination);
     $this->assign('state', $this->getFilterState($filter_state));
     $this->assign('search', $search);
     $this->assign('order', $order);
     $this->assign('orderDirection', $orderDirection);
     parent::display($tpl);
 }
Ejemplo n.º 4
0
 function display($tpl = null)
 {
     // @rule: Test for user access if on 1.6 and above
     if (EasyBlogHelper::getJoomlaVersion() >= '1.6') {
         if (!JFactory::getUser()->authorise('easyblog.manage.report', 'com_easyblog')) {
             JFactory::getApplication()->redirect('index.php', JText::_('JERROR_ALERTNOAUTHOR'), 'error');
             JFactory::getApplication()->close();
         }
     }
     //initialise variables
     $document = JFactory::getDocument();
     $user = JFactory::getUser();
     $mainframe = JFactory::getApplication();
     $result = $this->get('Data');
     $pagination = $this->get('Pagination');
     $reports = array();
     if ($result) {
         foreach ($result as $row) {
             $report = EasyBlogHelper::getTable('Report');
             $report->bind($row);
             $reports[] = $report;
         }
     }
     $this->assign('pagination', $pagination);
     $this->assign('reports', $reports);
     parent::display($tpl);
 }
Ejemplo n.º 5
0
 /**
  * Displays the new feed form
  *
  * @since	4.0
  * @access	public
  */
 public function form()
 {
     // Load the feed table
     $feed = EB::table('Feed');
     $id = $this->input->get('id', 0, 'int');
     $feed->load($id);
     JHTML::_('behavior.modal');
     if (!empty($post)) {
         $feed->bind($post);
     }
     $category = '';
     $author = '';
     $teamName = '';
     if (!empty($feed->item_category)) {
         $category = $feed->getCategoryName();
     }
     if (!empty($feed->item_creator)) {
         $user = JFactory::getUser($feed->item_creator);
         $author = $user->name;
     }
     if (!empty($feed->item_team)) {
         $team = EB::table('TeamBlog');
         $team->load($feed->item_team);
         $teamName = $team->title;
     }
     // Get a new params object
     $params = EB::getRegistry($feed->params);
     $this->set('params', $params);
     $this->set('feed', $feed);
     $this->set('category', $category);
     $this->set('author', $author);
     $this->set('teamName', $teamName);
     parent::display('feeds/form');
 }
Ejemplo n.º 6
0
 /**
  * Default user listings page.
  *
  * @since	1.0
  * @access	public
  * @param	null
  * @return	null
  */
 public function display($tpl = null)
 {
     $this->checkAccess('easyblog.manage.languages');
     $this->setHeading('COM_EASYBLOG_HEADING_LANGUAGES', '', 'fa-language');
     // Get configuration
     $config = EB::config();
     // Get the api key from the config
     $key = $config->get('main_apikey');
     // Add Joomla buttons
     JToolbarHelper::title(JText::_('COM_EASYBLOG_HEADING_LANGUAGES'));
     if (!$key) {
         JToolbarHelper::custom('savekey', 'save', '', JText::_('COM_EASYBLOG_SAVE_APIKEY_BUTTON'), false);
         $return = base64_encode('index.php?option=com_easyblog&view=languages');
         $this->set('return', $return);
         return parent::display('languages/key');
     }
     JToolbarHelper::custom('languages.discover', 'refresh', '', JText::_('COM_EASYBLOG_TOOLBAR_BUTTON_FIND_UPDATES'), false);
     JToolbarHelper::custom('languages.install', 'upload', '', JText::_('COM_EASYBLOG_TOOLBAR_BUTTON_INSTALL_OR_UPDATE'));
     JToolbarHelper::custom('languages.purge', 'purge', '', JText::_('COM_EASYBLOG_TOOLBAR_BUTTON_PURGE_CACHE'), false);
     // Get the languages that are already stored on the db
     $model = EB::model('Languages');
     $initialized = $model->initialized();
     if (!$initialized) {
         $this->set('key', $key);
         return parent::display('languages/initialize');
     }
     // Get languages
     $languages = $model->getLanguages();
     foreach ($languages as &$language) {
         $translators = json_decode($language->translator);
         $language->translator = $translators;
     }
     $this->set("languages", $languages);
     parent::display('languages/default');
 }
Ejemplo n.º 7
0
 function display($tpl = null)
 {
     // @rule: Test for user access if on 1.6 and above
     if (EasyBlogHelper::getJoomlaVersion() >= '1.6') {
         if (!JFactory::getUser()->authorise('easyblog.manage.comment', 'com_easyblog')) {
             JFactory::getApplication()->redirect('index.php', JText::_('JERROR_ALERTNOAUTHOR'), 'error');
             JFactory::getApplication()->close();
         }
     }
     //initialise variables
     $document = JFactory::getDocument();
     $user = JFactory::getUser();
     $mainframe = JFactory::getApplication();
     //Load pane behavior
     jimport('joomla.html.pane');
     $commentId = JRequest::getVar('commentid', '');
     $comment = EasyBlogHelper::getTable('Comment', 'Table');
     $comment->load($commentId);
     $this->comment = $comment;
     // Set default values for new entries.
     if (empty($comment->created)) {
         $date = EasyBlogDateHelper::getDate();
         $now = EasyBlogDateHelper::toFormat($date);
         $comment->created = $now;
         $comment->published = true;
     }
     $this->assignRef('comment', $comment);
     parent::display($tpl);
 }
Ejemplo n.º 8
0
 /**
  * Displays a list of reports
  *
  * @since	4.0
  * @access	public
  * @param	string
  * @return
  */
 public function display($tpl = null)
 {
     // Test for user access if on 1.6 and above
     $this->checkAccess('easyblog.manage.report');
     $this->setHeading('COM_EASYBLOG_TITLE_REPORTS', '', 'fa-exclamation-triangle');
     $order = $this->app->getUserStateFromRequest('com_easyblog.reports.filter_order', 'filter_order', 'a.created', 'cmd');
     $orderDirection = $this->app->getUserStateFromRequest('com_easyblog.reports.filter_order_Dir', 'filter_order_Dir', 'asc', 'word');
     // Get reports
     $model = EB::model('Reports');
     $result = $model->getData();
     $pagination = $model->getPagination();
     $reports = array();
     if ($result) {
         foreach ($result as $row) {
             $report = EB::table('Report');
             $report->bind($row);
             $blog = EB::table('Blog');
             $blog->load($report->obj_id);
             $report->blog = $blog;
             $reports[] = $report;
         }
     }
     $this->set('pagination', $pagination);
     $this->set('reports', $reports);
     $this->set('order', $order);
     $this->set('orderDirection', $orderDirection);
     parent::display('reports/default');
 }
Ejemplo n.º 9
0
 function display($tpl = null)
 {
     // @rule: Test for user access if on 1.6 and above
     if (EasyBlogHelper::getJoomlaVersion() >= '1.6') {
         if (!JFactory::getUser()->authorise('easyblog.manage.tag', 'com_easyblog')) {
             JFactory::getApplication()->redirect('index.php', JText::_('JERROR_ALERTNOAUTHOR'), 'error');
             JFactory::getApplication()->close();
         }
     }
     //initialise variables
     $document = JFactory::getDocument();
     $user = JFactory::getUser();
     $mainframe = JFactory::getApplication();
     // Render modal
     JHTML::_('behavior.modal');
     $tagId = JRequest::getVar('tagid', '');
     $tag = EasyBlogHelper::getTable('Tag', 'Table');
     $tag->load($tagId);
     $tag->title = JString::trim($tag->title);
     $tag->alias = JString::trim($tag->alias);
     $this->tag = $tag;
     // Set default values for new entries.
     if (empty($tag->created)) {
         $date = EasyBlogDateHelper::getDate();
         $now = EasyBlogDateHelper::toFormat($date);
         $tag->created = $now;
         $tag->published = true;
     }
     $this->assignRef('my', $user);
     $this->assignRef('tag', $tag);
     parent::display($tpl);
 }
Ejemplo n.º 10
0
 function display($tpl = null)
 {
     // @rule: Test for user access if on 1.6 and above
     if (EasyBlogHelper::getJoomlaVersion() >= '1.6') {
         if (!JFactory::getUser()->authorise('easyblog.manage.pending', 'com_easyblog')) {
             JFactory::getApplication()->redirect('index.php', JText::_('JERROR_ALERTNOAUTHOR'), 'error');
             JFactory::getApplication()->close();
         }
     }
     //initialise variables
     $document = JFactory::getDocument();
     $user = JFactory::getUser();
     $mainframe = JFactory::getApplication();
     $search = $mainframe->getUserStateFromRequest('com_easyblog.blogs.search', 'search', '', 'string');
     $filter_category = $mainframe->getUserStateFromRequest('com_easyblog.blogs.filter_category', 'filter_category', '*', 'int');
     $search = trim(JString::strtolower($search));
     $order = $mainframe->getUserStateFromRequest('com_easyblog.blogs.filter_order', 'filter_order', 'ordering', 'cmd');
     $orderDirection = $mainframe->getUserStateFromRequest('com_easyblog.blogs.filter_order_Dir', 'filter_order_Dir', '', 'word');
     //Get data from the model
     $blogs = $this->get('Blogs');
     $pagination = $this->get('Pagination');
     $catFilter = $this->getFilterCategory($filter_category);
     $document->setTitle(JText::_('COM_EASYBLOG_PENDING_PAGE_TITLE'));
     $this->assignRef('blogs', $blogs);
     $this->assignRef('pagination', $pagination);
     $this->assign('category', $catFilter);
     $this->assign('search', $search);
     $this->assign('order', $order);
     $this->assign('orderDirection', $orderDirection);
     parent::display($tpl);
 }
Ejemplo n.º 11
0
 function display($tpl = null)
 {
     // @rule: Test for user access if on 1.6 and above
     if (EasyBlogHelper::getJoomlaVersion() >= '1.6') {
         if (!JFactory::getUser()->authorise('easyblog.manage.mail', 'com_easyblog')) {
             JFactory::getApplication()->redirect('index.php', JText::_('JERROR_ALERTNOAUTHOR'), 'error');
             JFactory::getApplication()->close();
         }
     }
     //initialise variables
     $document = JFactory::getDocument();
     $user = JFactory::getUser();
     $mainframe = JFactory::getApplication();
     $filter_state = $mainframe->getUserStateFromRequest('com_easyblog.spools.filter_state', 'filter_state', '*', 'word');
     $search = $mainframe->getUserStateFromRequest('com_easyblog.spools.search', 'search', '', 'string');
     $search = trim(JString::strtolower($search));
     $order = $mainframe->getUserStateFromRequest('com_easyblog.spools.filter_order', 'filter_order', 'created', 'cmd');
     $orderDirection = $mainframe->getUserStateFromRequest('com_easyblog.spools.filter_order_Dir', 'filter_order_Dir', 'asc', 'word');
     $mails = $this->get('Data');
     $pagination = $this->get('Pagination');
     $this->assign('mails', $mails);
     $this->assign('pagination', $pagination);
     $this->assign('state', JHTML::_('grid.state', $filter_state, JText::_('COM_EASYBLOG_SENT'), JText::_('COM_EASYBLOG_PENDING')));
     $this->assign('search', $search);
     $this->assign('order', $order);
     $this->assign('orderDirection', $orderDirection);
     parent::display($tpl);
 }
Ejemplo n.º 12
0
 /**
  * Displays the theme installer form
  *
  * @since	4.0
  * @access	public
  * @param	string
  * @return
  */
 public function database($tpl = null)
 {
     // Check for access
     $this->checkAccess('easyblog.manage.maintenance');
     // Set heading text
     $this->setHeading('COM_EASYBLOG_MAINTENANCE_TITLE_DATABASE', '', 'fa-flask');
     parent::display('maintenance/database');
 }
Ejemplo n.º 13
0
 function display($tpl = null)
 {
     // @rule: Test for user access if on 1.6 and above
     if (EasyBlogHelper::getJoomlaVersion() >= '1.6') {
         if (!JFactory::getUser()->authorise('easyblog.manage.blog', 'com_easyblog')) {
             JFactory::getApplication()->redirect('index.php', JText::_('JERROR_ALERTNOAUTHOR'), 'error');
             JFactory::getApplication()->close();
         }
     }
     //initialise variables
     $document = JFactory::getDocument();
     $user = JFactory::getUser();
     $mainframe = JFactory::getApplication();
     JHTML::_('behavior.tooltip');
     $filter_state = $mainframe->getUserStateFromRequest('com_easyblog.blogs.filter_state', 'filter_state', '*', 'word');
     $search = $mainframe->getUserStateFromRequest('com_easyblog.blogs.search', 'search', '', 'string');
     $filter_category = $mainframe->getUserStateFromRequest('com_easyblog.blogs.filter_category', 'filter_category', '*', 'int');
     $filterLanguage = $mainframe->getUserStateFromRequest('com_easyblog.blogs.filter_language', 'filter_language', '', '');
     $search = trim(JString::strtolower($search));
     $order = $mainframe->getUserStateFromRequest('com_easyblog.blogs.filter_order', 'filter_order', 'a.id', 'cmd');
     $orderDirection = $mainframe->getUserStateFromRequest('com_easyblog.blogs.filter_order_Dir', 'filter_order_Dir', 'desc', 'word');
     $source = JRequest::getVar('filter_source', '-1');
     $filteredBlogger = $mainframe->getUserStateFromRequest('com_easyblog.blogs.filter_blogger', 'filter_blogger', '', 'int');
     //Get data from the model
     $blogs = $this->get('Blogs');
     $pagination = $this->get('Pagination');
     $catFilter = $this->getFilterCategory($filter_category);
     $browse = JRequest::getInt('browse', 0);
     $browsefunction = JRequest::getVar('browsefunction', 'insertBlog');
     // @task: Get the centralized oauth consumers
     $consumers = array();
     $sites = array('twitter', 'facebook', 'linkedin');
     $centralizedConfigured = false;
     foreach ($sites as $site) {
         $consumer = EasyBlogHelper::getTable('OAuth');
         $consumer->loadSystemByType($site);
         if (!empty($consumer->id)) {
             $centralizedConfigured = true;
         }
         $consumers[] = $consumer;
     }
     $this->assignRef('consumers', $consumers);
     $this->assignRef('centralizedConfigured', $centralizedConfigured);
     $this->assignRef('source', $source);
     $this->assign('filterLanguage', $filterLanguage);
     $this->assign('filteredBlogger', $filteredBlogger);
     $this->assign('browse', $browse);
     $this->assign('browseFunction', $browsefunction);
     $this->assignRef('blogs', $blogs);
     $this->assignRef('pagination', $pagination);
     $this->assignRef('filter_state', $filter_state);
     $this->assign('state', $this->getFilterState($filter_state));
     $this->assign('category', $catFilter);
     $this->assign('search', $search);
     $this->assign('order', $order);
     $this->assign('orderDirection', $orderDirection);
     parent::display($tpl);
 }
Ejemplo n.º 14
0
 function display($tpl = null)
 {
     // @rule: Test for user access if on 1.6 and above
     if (EasyBlogHelper::getJoomlaVersion() >= '1.6') {
         if (!JFactory::getUser()->authorise('easyblog.manage.setting', 'com_easyblog')) {
             JFactory::getApplication()->redirect('index.php', JText::_('JERROR_ALERTNOAUTHOR'), 'error');
             JFactory::getApplication()->close();
         }
     }
     //initialise variables
     $document = JFactory::getDocument();
     $user = JFactory::getUser();
     $config = EasyBlogHelper::getConfig();
     $jconfig = JFactory::getConfig();
     $dstOptions = array();
     $iteration = -12;
     for ($i = 0; $i <= 24; $i++) {
         $dstOptions[] = JHTML::_('select.option', $iteration, $iteration);
         $iteration++;
     }
     $dstList = JHTML::_('select.genericlist', $dstOptions, 'main_dstoffset', 'class="inputbox" size="1"', 'value', 'text', $config->get('main_dstoffset', 0));
     //check if jomcomment installed.
     $jcInstalled = false;
     if (file_exists(JPATH_ROOT . '/administrator/components/com_jomcomment/config.jomcomment.php')) {
         $jcInstalled = true;
     }
     //check if jcomments installed.
     $jcommentInstalled = false;
     $jCommentFile = JPATH_ROOT . '/components/com_jcomments/jcomments.php';
     if (JFile::exists($jCommentFile)) {
         $jcommentInstalled = true;
     }
     //check if rscomments installed.
     $rscommentInstalled = false;
     $rsCommentFile = JPATH_ROOT . '/components/com_rscomments/rscomments.php';
     if (JFile::exists($rsCommentFile)) {
         $rscommentInstalled = true;
     }
     // @task: Check if easydiscuss plugin is installed and enabled.
     $easydiscuss = JPluginHelper::isEnabled('content', 'easydiscuss');
     $komento = JPluginHelper::isEnabled('content', 'komento');
     $defaultSAId = EasyBlogHelper::getDefaultSAIds();
     $joomlaVersion = EasyBlogHelper::getJoomlaVersion();
     $socialButtonsOrder = $this->getSocialButtonOrder();
     $this->assignRef('jConfig', $jconfig);
     $this->assignRef('config', $config);
     $this->assignRef('dstList', $dstList);
     $this->assignRef('jcInstalled', $jcInstalled);
     $this->assignRef('easydiscuss', $easydiscuss);
     $this->assignRef('komento', $komento);
     $this->assignRef('jcommentInstalled', $jcommentInstalled);
     $this->assignRef('rscommentInstalled', $rscommentInstalled);
     $this->assignRef('defaultSAId', $defaultSAId);
     $this->assignRef('joomlaversion', $joomlaVersion);
     $this->assignRef('socialButtonsOrder', $socialButtonsOrder);
     parent::display($tpl);
 }
Ejemplo n.º 15
0
 function display($tpl = null)
 {
     // @rule: Test for user access if on 1.6 and above
     if (EasyBlogHelper::getJoomlaVersion() >= '1.6') {
         if (!JFactory::getUser()->authorise('easyblog.manage.category', 'com_easyblog')) {
             JFactory::getApplication()->redirect('index.php', JText::_('JERROR_ALERTNOAUTHOR'), 'error');
             JFactory::getApplication()->close();
         }
     }
     //initialise variables
     $document = JFactory::getDocument();
     $user = JFactory::getUser();
     $mainframe = JFactory::getApplication();
     $filter_state = $mainframe->getUserStateFromRequest('com_easyblog.categories.filter_state', 'filter_state', '*', 'word');
     $search = $mainframe->getUserStateFromRequest('com_easyblog.categories.search', 'search', '', 'string');
     $search = trim(JString::strtolower($search));
     $order = $mainframe->getUserStateFromRequest('com_easyblog.categories.filter_order', 'filter_order', 'lft', 'cmd');
     $orderDirection = $mainframe->getUserStateFromRequest('com_easyblog.categories.filter_order_Dir', 'filter_order_Dir', 'asc', 'word');
     $publishedOnly = JRequest::getVar('p', '0');
     JTable::addIncludePath(EBLOG_TABLES);
     $category = EasyBlogHelper::getTable('Category', 'Table');
     $category->rebuildOrdering();
     //Get data from the model
     $ordering = array();
     $model = $this->getModel();
     $categories = $model->getData(true, $publishedOnly);
     for ($i = 0; $i < count($categories); $i++) {
         $category = $categories[$i];
         $category->count = $model->getUsedCount($category->id);
         $category->child_count = $model->getChildCount($category->id);
         $ordering[$category->parent_id][] = $category->id;
     }
     $pagination = $this->get('Pagination');
     $browse = JRequest::getInt('browse', 0);
     $browsefunction = JRequest::getVar('browsefunction', 'insertCategory');
     $this->assign('browse', $browse);
     $this->assign('browsefunction', $browsefunction);
     $this->assignRef('categories', $categories);
     $this->assignRef('pagination', $pagination);
     $this->assignRef('ordering', $ordering);
     $this->assign('state', JHTML::_('grid.state', $filter_state));
     $this->assign('search', $search);
     $this->assign('order', $order);
     $this->assign('saveOrder', $order == 'lft' && $orderDirection == 'asc');
     $this->assign('ordering', $ordering);
     $this->assign('orderDirection', $orderDirection);
     parent::display($tpl);
 }
Ejemplo n.º 16
0
 public function display($tpl = null)
 {
     // @rule: Test for user access if on 1.6 and above
     $this->checkAccess('easyblog.manage.migrator');
     $this->setHeading('COM_EASYBLOG_TITLE_MIGRATORS', '', 'fa-laptop');
     $layout = $this->getLayout();
     $this->set('config', $this->config);
     $htmlcontent = '';
     if (method_exists($this, $layout)) {
         $htmlcontent = $this->{$layout}();
         // return $this->$layout();
         //
     }
     $this->set('htmlcontent', $htmlcontent);
     parent::display('migrators/default');
 }
Ejemplo n.º 17
0
 public function display($tpl = null)
 {
     // @rule: Test for user access if on 1.6 and above
     if (EasyBlogHelper::getJoomlaVersion() >= '1.6') {
         if (!JFactory::getUser()->authorise('easyblog.manage.updater', 'com_easyblog')) {
             JFactory::getApplication()->redirect('index.php', JText::_('JERROR_ALERTNOAUTHOR'), 'error');
             JFactory::getApplication()->close();
         }
     }
     //initialise variables
     $document = JFactory::getDocument();
     $user = JFactory::getUser();
     $mainframe = JFactory::getApplication();
     $curl = function_exists('curl_multi_init');
     $this->assign('curl', $curl);
     echo parent::display($tpl);
 }
Ejemplo n.º 18
0
 function display($tpl = null)
 {
     // @rule: Test for user access if on 1.6 and above
     if (EasyBlogHelper::getJoomlaVersion() >= '1.6') {
         if (!JFactory::getUser()->authorise('easyblog.manage.category', 'com_easyblog')) {
             JFactory::getApplication()->redirect('index.php', JText::_('JERROR_ALERTNOAUTHOR'), 'error');
             JFactory::getApplication()->close();
         }
     }
     //initialise variables
     $document = JFactory::getDocument();
     $user = JFactory::getUser();
     $mainframe = JFactory::getApplication();
     $config = EasyBlogHelper::getConfig();
     $acl = EasyBlogACLHelper::getRuleSet();
     //Load pane behavior
     jimport('joomla.html.pane');
     $catId = JRequest::getVar('catid', '');
     $cat = EasyBlogHelper::getTable('Category', 'Table');
     $cat->load($catId);
     $this->cat = $cat;
     // Set default values for new entries.
     if (empty($cat->created)) {
         $date = EasyBlogDateHelper::getDate();
         $now = EasyBlogDateHelper::toFormat($date);
         $cat->created = $now;
         $cat->published = true;
     }
     $catRuleItems = EasyBlogHelper::getTable('CategoryAclItem', 'Table');
     $categoryRules = $catRuleItems->getAllRuleItems();
     $assignedACL = $cat->getAssignedACL();
     $parentList = EasyBlogHelper::populateCategories('', '', 'select', 'parent_id', $cat->parent_id, false, false, false, array($cat->id));
     $editor = JFactory::getEditor($config->get('layout_editor'));
     $this->assignRef('editor', $editor);
     $this->assignRef('cat', $cat);
     $this->assignRef('config', $config);
     $this->assignRef('acl', $acl);
     $this->assignRef('parentList', $parentList);
     $this->assignRef('categoryRules', $categoryRules);
     $this->assignRef('assignedACL', $assignedACL);
     parent::display($tpl);
 }
Ejemplo n.º 19
0
 function display($tpl = null)
 {
     // @rule: Test for user access if on 1.6 and above
     if (EasyBlogHelper::getJoomlaVersion() >= '1.6') {
         if (!JFactory::getUser()->authorise('easyblog.manage.theme', 'com_easyblog')) {
             JFactory::getApplication()->redirect('index.php', JText::_('JERROR_ALERTNOAUTHOR'), 'error');
             JFactory::getApplication()->close();
         }
     }
     //initialise variables
     $document = JFactory::getDocument();
     $user = JFactory::getUser();
     $mainframe = JFactory::getApplication();
     $config = EasyBlogHelper::getConfig();
     $themes = $this->getThemes();
     $this->assign('default', $config->get('layout_theme'));
     $this->assign('themes', $themes);
     $this->assign('search', '');
     parent::display($tpl);
 }
Ejemplo n.º 20
0
 function display($tpl = null)
 {
     // @rule: Test for user access if on 1.6 and above
     if (EasyBlogHelper::getJoomlaVersion() >= '1.6') {
         if (!JFactory::getUser()->authorise('easyblog.manage.acl', 'com_easyblog')) {
             JFactory::getApplication()->redirect('index.php', JText::_('JERROR_ALERTNOAUTHOR'), 'error');
             JFactory::getApplication()->close();
         }
     }
     //initialise variables
     $document = JFactory::getDocument();
     $user = JFactory::getUser();
     $mainframe = JFactory::getApplication();
     $model = EasyBlogHelper::getModel('Acl', true);
     $config = EasyBlogHelper::getConfig();
     $type = $mainframe->getUserStateFromRequest('com_easyblog.acls.filter_type', 'filter_type', 'group', 'word');
     //filtering
     $filter = new stdClass();
     $filter->type = $this->getFilterType($type);
     $filter->search = $mainframe->getUserStateFromRequest('com_easyblog.acls.search', 'search', '', 'string');
     //sorting
     $sort = new stdClass();
     $sort->order = $mainframe->getUserStateFromRequest('com_easyblog.acls.filter_order', 'filter_order', 'a.`id`', 'cmd');
     $sort->orderDirection = $mainframe->getUserStateFromRequest('com_easyblog.acls.filter_order_Dir', 'filter_order_Dir', '', 'word');
     $rulesets = $model->getRuleSets($type);
     $pagination = $model->getPagination($type);
     if ($type == 'assigned') {
         $document->setTitle(JText::_("COM_EASYBLOG_ACL_ASSIGN_USER"));
         JToolBarHelper::title(JText::_('COM_EASYBLOG_ACL_ASSIGN_USER'), 'acl');
     } else {
         $document->setTitle(JText::_("COM_EASYBLOG_ACL_JOOMLA_USER_GROUP"));
         JToolBarHelper::title(JText::_('COM_EASYBLOG_ACL_JOOMLA_USER_GROUP'), 'acl');
     }
     $this->assignRef('config', $config);
     $this->assignRef('rulesets', $rulesets);
     $this->assignRef('filter', $filter);
     $this->assignRef('sort', $sort);
     $this->assignRef('type', $type);
     $this->assignRef('pagination', $pagination);
     parent::display($tpl);
 }
Ejemplo n.º 21
0
 function display($tpl = null)
 {
     // @rule: Test for user access if on 1.6 and above
     if (EasyBlogHelper::getJoomlaVersion() >= '1.6') {
         if (!JFactory::getUser()->authorise('easyblog.manage.comment', 'com_easyblog')) {
             JFactory::getApplication()->redirect('index.php', JText::_('JERROR_ALERTNOAUTHOR'), 'error');
             JFactory::getApplication()->close();
         }
     }
     //initialise variables
     $document = JFactory::getDocument();
     $user = JFactory::getUser();
     $mainframe = JFactory::getApplication();
     $filter_state = $mainframe->getUserStateFromRequest('com_easyblog.comments.filter_state', 'filter_state', '*', 'word');
     $search = $mainframe->getUserStateFromRequest('com_easyblog.comments.search', 'search', '', 'string');
     $search = trim(JString::strtolower($search));
     $order = $mainframe->getUserStateFromRequest('com_easyblog.comments.filter_order', 'filter_order', 'ordering', 'cmd');
     $orderDirection = $mainframe->getUserStateFromRequest('com_easyblog.comments.filter_order_Dir', 'filter_order_Dir', '', 'word');
     //Get data from the model
     $comments = $this->get('Data');
     $pagination = $this->get('Pagination');
     //convert the status.
     if (count($comments) > 0) {
         for ($i = 0; $i < count($comments); $i++) {
             $item = $comments[$i];
             if ($item->published == '2') {
                 $item->isModerate = true;
                 $item->published = '0';
             } else {
                 $item->isModerate = false;
             }
         }
     }
     $this->assignRef('comments', $comments);
     $this->assignRef('pagination', $pagination);
     $this->assign('state', $this->getFilterState($filter_state));
     $this->assign('search', $search);
     $this->assign('order', $order);
     $this->assign('orderDirection', $orderDirection);
     parent::display($tpl);
 }
Ejemplo n.º 22
0
 function display($tpl = null)
 {
     // @rule: Test for user access if on 1.6 and above
     if (EasyBlogHelper::getJoomlaVersion() >= '1.6') {
         if (!JFactory::getUser()->authorise('easyblog.manage.tag', 'com_easyblog')) {
             JFactory::getApplication()->redirect('index.php', JText::_('JERROR_ALERTNOAUTHOR'), 'error');
             JFactory::getApplication()->close();
         }
     }
     //initialise variables
     $document = JFactory::getDocument();
     $user = JFactory::getUser();
     $mainframe = JFactory::getApplication();
     $filter_state = $mainframe->getUserStateFromRequest('com_easyblog.tags.filter_state', 'filter_state', '*', 'word');
     $search = $mainframe->getUserStateFromRequest('com_easyblog.tags.search', 'search', '', 'string');
     $search = trim(JString::strtolower($search));
     $order = $mainframe->getUserStateFromRequest('com_easyblog.tags.filter_order', 'filter_order', 'ordering', 'cmd');
     $orderDirection = $mainframe->getUserStateFromRequest('com_easyblog.tags.filter_order_Dir', 'filter_order_Dir', '', 'word');
     //Get data from the model
     $tags = $this->get('Data');
     $model = $this->getModel('Tags');
     for ($i = 0; $i < count($tags); $i++) {
         $tag = $tags[$i];
         $tag->count = $model->getUsedCount($tag->id);
         $tag->title = JString::trim($tag->title);
         $tag->alias = JString::trim($tag->alias);
     }
     $pagination = $this->get('Pagination');
     $browse = JRequest::getInt('browse', 0);
     $browsefunction = JRequest::getVar('browsefunction', 'insertTag');
     $this->assign('browse', $browse);
     $this->assign('browsefunction', $browsefunction);
     $this->assignRef('tags', $tags);
     $this->assignRef('pagination', $pagination);
     $this->assign('state', JHTML::_('grid.state', $filter_state));
     $this->assign('search', $search);
     $this->assign('order', $order);
     $this->assign('orderDirection', $orderDirection);
     parent::display($tpl);
 }
Ejemplo n.º 23
0
 function display($tpl = null)
 {
     // @rule: Test for user access if on 1.6 and above
     if (EasyBlogHelper::getJoomlaVersion() >= '1.6') {
         if (!JFactory::getUser()->authorise('easyblog.manage.teamblog', 'com_easyblog')) {
             JFactory::getApplication()->redirect('index.php', JText::_('JERROR_ALERTNOAUTHOR'), 'error');
             JFactory::getApplication()->close();
         }
     }
     //initialise variables
     $document = JFactory::getDocument();
     $user = JFactory::getUser();
     $mainframe = JFactory::getApplication();
     $id = JRequest::getInt('id');
     JHTML::_('behavior.modal', 'a.modal');
     $document = JFactory::getDocument();
     $document->addStyleSheet(JURI::root() . 'components/com_easyblog/assets/css/common.css');
     $team = EasyBlogHelper::getTable('TeamBlog', 'Table');
     $team->load($id);
     $this->team = $team;
     $blogAccess = array();
     $blogAccess[] = JHTML::_('select.option', '1', JText::_('COM_EASYBLOG_TEAM_MEMBER_ONLY'));
     $blogAccess[] = JHTML::_('select.option', '2', JText::_('COM_EASYBLOG_ALL_REGISTERED_USERS'));
     $blogAccess[] = JHTML::_('select.option', '3', JText::_('COM_EASYBLOG_EVERYONE'));
     $blogAccessList = JHTML::_('select.genericlist', $blogAccess, 'access', 'size="1" class="inputbox"', 'value', 'text', $team->access);
     $config = EasyBlogHelper::getConfig();
     $editor = JFactory::getEditor($config->get('layout_editor'));
     // get meta tags
     $metaModel = EasyBlogHelper::getModel('Metas');
     $meta = $metaModel->getMetaInfo(META_TYPE_TEAM, $id);
     $joomlaVersion = EasyBlogHelper::getJoomlaVersion();
     $this->assignRef('joomlaversion', $joomlaVersion);
     $this->assignRef('editor', $editor);
     $this->assignRef('team', $team);
     $this->assignRef('meta', $meta);
     $this->assignRef('config', $config);
     $this->assignRef('blogAccessList', $blogAccessList);
     parent::display($tpl);
 }
Ejemplo n.º 24
0
 function display($tpl = null)
 {
     // @rule: Test for user access if on 1.6 and above
     if (EasyBlogHelper::getJoomlaVersion() >= '1.6') {
         if (!JFactory::getUser()->authorise('easyblog.manage.teamblog', 'com_easyblog')) {
             JFactory::getApplication()->redirect('index.php', JText::_('JERROR_ALERTNOAUTHOR'), 'error');
             JFactory::getApplication()->close();
         }
     }
     //initialise variables
     $document = JFactory::getDocument();
     $user = JFactory::getUser();
     $mainframe = JFactory::getApplication();
     $config = EasyBlogHelper::getConfig();
     // get all the team request that this user assigned as admin.
     $requests = $this->get('Data');
     $pagination = $this->get('Pagination');
     $this->assignRef('requests', $requests);
     $this->assignRef('pagination', $pagination);
     $this->assignRef('config', $config);
     parent::display($tpl);
 }
Ejemplo n.º 25
0
 function display($tpl = null)
 {
     // @rule: Test for user access if on 1.6 and above
     if (EasyBlogHelper::getJoomlaVersion() >= '1.6') {
         if (!JFactory::getUser()->authorise('easyblog.manage.acl', 'com_easyblog')) {
             JFactory::getApplication()->redirect('index.php', JText::_('JERROR_ALERTNOAUTHOR'), 'error');
             JFactory::getApplication()->close();
         }
     }
     $mainframe = JFactory::getApplication();
     $model = $this->getModel('Acl');
     $document = JFactory::getDocument();
     $cid = JRequest::getVar('cid', '', 'REQUEST');
     $type = JRequest::getVar('type', '', 'REQUEST');
     $add = JRequest::getVar('add', '', 'REQUEST');
     JHTML::_('behavior.modal', 'a.modal');
     JHTML::_('behavior.tooltip');
     if ((empty($cid) || empty($type)) && empty($add)) {
         $mainframe->redirect('index.php?option=com_easyblog&view=acls', JText::_('Invalid Id or acl type. Please try again.'), 'error');
     }
     $rulesets = $model->getRuleSet($type, $cid, $add);
     if ($type == 'assigned') {
         $document->setTitle(JText::_("COM_EASYBLOG_ACL_ASSIGN_USER"));
         JToolBarHelper::title(JText::_('COM_EASYBLOG_ACL_ASSIGN_USER'), 'acl');
     } else {
         $document->setTitle(JText::_("COM_EASYBLOG_ACL_JOOMLA_USER_GROUP"));
         JToolBarHelper::title(JText::_('COM_EASYBLOG_ACL_JOOMLA_USER_GROUP'), 'acl');
     }
     $joomlaVersion = EasyBlogHelper::getJoomlaVersion();
     $filter = EasyBlogHelper::getTable('AclFilter');
     $filter->load($cid, $type);
     $this->assignRef('filter', $filter);
     $this->assignRef('joomlaversion', $joomlaVersion);
     $this->assignRef('rulesets', $rulesets);
     $this->assignRef('type', $type);
     $this->assignRef('add', $add);
     parent::display($tpl);
 }
Ejemplo n.º 26
0
 /**
  * Displays the ACL form
  *
  * @since	4.0
  * @access	public
  */
 public function form()
 {
     $model = EB::model('Acl');
     $id = JRequest::getInt('id');
     $add = JRequest::getVar('add');
     if (empty($id) && empty($add)) {
         EB::info()->set(JText::_('COM_EASYBLOG_ACL_INVALID_ID_PROVIDED'), 'error');
         return $this->app->redirect('index.php?option=com_easyblog&view=acls');
     }
     // Get a list of rule sets.
     $ruleset = $model->getInstalledRules($id, $add);
     $groups = $model->getGroups();
     $this->setHeading('COM_EASYBLOG_TITLE_ACL', '', 'fa-lock');
     $this->doc->setTitle(JText::_("COM_EASYBLOG_ACL_JOOMLA_USER_GROUP"));
     JToolBarHelper::title(JText::_('COM_EASYBLOG_ACL_JOOMLA_USER_GROUP'), 'acl');
     $filter = EB::table('ACLFilter');
     $filter->load($id);
     $this->set('groups', $groups);
     $this->set('filter', $filter);
     $this->set('ruleset', $ruleset);
     $this->set('add', $add);
     parent::display('acls/form');
 }
Ejemplo n.º 27
0
 function display($tpl = null)
 {
     // @rule: Test for user access if on 1.6 and above
     if (EasyBlogHelper::getJoomlaVersion() >= '1.6') {
         if (!JFactory::getUser()->authorise('easyblog.manage.meta', 'com_easyblog')) {
             JFactory::getApplication()->redirect('index.php', JText::_('JERROR_ALERTNOAUTHOR'), 'error');
             JFactory::getApplication()->close();
         }
     }
     //initialise variables
     $document = JFactory::getDocument();
     $user = JFactory::getUser();
     $mainframe = JFactory::getApplication();
     //Load pane behavior
     jimport('joomla.html.pane');
     $metatId = JRequest::getVar('id', '');
     $meta = EasyBlogHelper::getTable('meta', 'Table');
     $meta->load($metatId);
     // assign title
     $meta->title = $this->_getItemTitle($meta->id);
     $this->meta =& $meta;
     $this->assignRef('meta', $meta);
     parent::display($tpl);
 }
Ejemplo n.º 28
0
 public function form()
 {
     $app = JFactory::getApplication();
     parent::display('new_theme');
 }
Ejemplo n.º 29
0
 public function teamblogs()
 {
     $this->setHeading('COM_EASYBLOG_SETTINGS_TAB_TEAMBLOGS');
     $this->set('namespace', 'settings/teamblogs/default');
     parent::display('settings/form');
 }
Ejemplo n.º 30
0
 /**
  * Displays the linkedin process to setup auto posting
  *
  * @since	4.0
  * @access	public
  * @return	
  */
 public function linkedin()
 {
     // Add the button
     JToolbarHelper::apply('linkedin.save');
     // Set page details
     JToolbarHelper::title(JText::_('COM_EASYBLOG_AUTOPOSTING_LINKEDIN_TITLE'));
     $this->setHeading('COM_EASYBLOG_AUTOPOSTING_LINKEDIN_TITLE');
     $associated = EB::oauth()->associated('linkedin');
     // Initialize the default value
     $companies = array();
     $client = EB::oauth()->getClient('linkedin');
     if ($associated) {
         $oauth = EB::table('oauth');
         $oauth->load(array('type' => 'linkedin', 'system' => true));
         $client->setAccess($oauth->access_token);
         // Get the company data
         $data = $client->company('?is-company-admin=true');
         $result = $data['linkedin'];
         $parser = JFactory::getXML($result, false);
         $result = $parser->children();
         $companies = array();
         if ($result) {
             foreach ($result as $item) {
                 $company = new stdClass();
                 $company->id = (int) $item->id;
                 $company->title = (string) $item->name;
                 $companies[] = $company;
             }
         }
     }
     $storedCompanies = explode(',', $this->config->get('integrations_linkedin_company'));
     $this->set('client', $client);
     $this->set('storedCompanies', $storedCompanies);
     $this->set('companies', $companies);
     $this->set('associated', $associated);
     parent::display('autoposting/linkedin/default');
 }