本文整理汇总了PHP中EB::privacy方法的典型用法代码示例。如果您正苦于以下问题:PHP EB::privacy方法的具体用法?PHP EB::privacy怎么用?PHP EB::privacy使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EB
的用法示例。
在下文中一共展示了EB::privacy方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: checkPrivacy
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;
}
示例2: isAccessible
/**
* 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;
}
示例3:
</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;
示例4: defined
* 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>
示例5: defined
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>