public function checkPrivacy() { $obj = new stdClass(); $obj->allowed = true; $obj->message = ''; $my = JFactory::getUser(); if ($this->private == '1' && $my->id == 0) { $obj->allowed = false; $obj->error = EB::privacy()->getErrorHTML(); } else { if ($this->private == '2') { $cats = EasyBlogHelper::getPrivateCategories(); if (in_array($this->id, $cats)) { $obj->allowed = false; $obj->error = JText::_('COM_EASYBLOG_PRIVACY_NOT_AUTHORIZED_ERROR'); } } } return $obj; }
/** * Determines if the post is accessible by the current user viewing the post * * @since 5.0 * @access public * @param string * @return */ public function isAccessible() { $allowed = EB::privacy()->checkPrivacy($this); if (!$allowed->allowed) { return $allowed; } // Check against the primary category permissions $category = $this->getPrimaryCategory(); if ($category->private != 0) { $allowed = $category->checkPrivacy(); } return $allowed; }
</label> <div class="col-md-5"> <?php echo $parents; ?> </div> </div> <div class="form-group"> <label class="col-md-3 control-label"><?php echo JText::_('COM_EASYBLOG_DASHBOARD_CATEGORIES_PRIVACY'); ?> </label> <div class="col-md-5"> <?php echo JHTML::_('select.genericlist', EB::privacy()->getOptions('category'), 'private', 'size="1" class="form-control input-sm"', 'value', 'text', $category->private); ?> </div> </div> <?php foreach ($rules as $rule) { ?> <div class="form-group"> <label class="col-md-3 control-label"><?php echo JText::_('COM_EASYBLOG_CATEGORIES_ACL_' . $rule->action . '_TITLE'); ?> </label> <div class="col-md-5"> <select multiple="multiple" name="category_acl_<?php echo $rule->action;
* See COPYRIGHT.php for copyright notices and details. */ defined('_JEXEC') or die('Unauthorized Access'); ?> <div class="eb-composer-field row"> <label for="private" class="eb-composer-field-label col-sm-5" data-eb-provide="popover" data-title="<?php echo JText::_('COM_EASYBLOG_COMPOSER_VISIBILITY'); ?> " data-content="<?php echo JText::_('COM_EASYBLOG_COMPOSER_VISIBILITY_HELP'); ?> " data-placement="left" data-html="true"> <?php echo JText::_('COM_EASYBLOG_COMPOSER_VISIBILITY'); ?> </label> <div class="eb-composer-field-content col-sm-6"> <?php echo JHTML::_('select.genericlist', EB::privacy()->getOptions('', $post->created_by), 'access', 'size="1" class="form-control input select"', 'value', 'text', $post->access); ?> </div> </div>
defined('_JEXEC') or die('Unauthorized Access'); ?> <div data-quickpost-extended> <div class="eb-quick-text-more hide" data-quickpost-extended-panel> <div class="form-group"> <div class="col-md-6"> <?php echo $this->html('form.category', 'category_id', 'category_id', '', ' data-quickpost-category'); ?> </div> <div class="col-md-6"> <?php if ($this->acl->get('enable_privacy')) { ?> <?php echo JHTML::_('select.genericlist', EB::privacy()->getOptions(), 'access', 'class="form-control" data-quickpost-privacy', 'value', 'text', $this->config->get('main_blogprivacy')); ?> <?php } ?> </div> </div> <div class="form-group"> <div class="col-md-12"> <textarea class="form-control" rows="1" placeholder="<?php echo JText::_('COM_EASYBLOG_MICROBLOG_TAGS_PLACEHOLDER'); ?> " data-quickpost-tags></textarea> </div> </div> </div>