当前位置: 首页>>代码示例>>PHP>>正文


PHP EB::privacy方法代码示例

本文整理汇总了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;
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:20,代码来源:category.php

示例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;
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:21,代码来源:post.php

示例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;
开发者ID:knigherrant,项目名称:decopatio,代码行数:31,代码来源:dialog.edit.php

示例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>
开发者ID:knigherrant,项目名称:decopatio,代码行数:30,代码来源:privacy.php

示例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>
开发者ID:knigherrant,项目名称:decopatio,代码行数:31,代码来源:form.more.php


注:本文中的EB::privacy方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。