Exemple #1
0
 /**
  * Constructor
  */
 function __construct($aModule)
 {
     parent::__construct($aModule);
     $this->_oConfig->init($this->_oDb);
     $this->_oTemplate->init($this);
     $this->_iOwnerId = 0;
     //--- Define Membership Actions ---//
     defineMembershipActions(array('timeline repost', 'timeline post comment', 'timeline delete comment'), 'ACTION_ID_');
 }
Exemple #2
0
 /**
  * Constructor
  */
 function BxWallModule($aModule)
 {
     parent::BxDolModule($aModule);
     $this->_oConfig->init($this->_oDb);
     $this->_oTemplate->init($this);
     $this->_iOwnerId = 0;
     $this->_sJsPostObject = $this->_oConfig->getJsObject('post');
     $this->_sJsViewObject = $this->_oConfig->getJsObject('view');
     $this->_sJsOutlineObject = $this->_oConfig->getJsObject('outline');
     //--- Define Membership Actions ---//
     defineMembershipActions(array('timeline post comment', 'timeline delete comment'), 'ACTION_ID_');
 }
Exemple #3
0
 /**
  * Constructor
  */
 function BxWallModule($aModule)
 {
     parent::BxDolModule($aModule);
     $this->_oConfig->init($this->_oDb);
     $this->_bJsMode = false;
     $this->_iOwnerId = 0;
     $this->_aHandlers = array();
     foreach ($this->_oDb->getHandlers() as $aHandler) {
         $this->_aHandlers[$aHandler['alert_unit'] . '_' . $aHandler['alert_action']] = $aHandler;
     }
     $this->_sJsPostObject = 'oWallPost';
     $this->_sJsViewObject = 'oWallView';
     //--- Define Membership Actions ---//
     defineMembershipActions(array('wall post comment', 'wall delete comment'), 'ACTION_ID_');
 }
Exemple #4
0
 /**
  * Constructor
  */
 function __construct($aModule)
 {
     parent::__construct($aModule);
     //--- Define Membership Actions ---//
     defineMembershipActions(array('feedback delete'), 'ACTION_ID_');
 }
 function _defineActions()
 {
     defineMembershipActions(array('groups view group', 'groups browse', 'groups search', 'groups add group', 'groups comments delete and edit', 'groups edit any group', 'groups delete any group', 'groups mark as featured', 'groups approve groups', 'groups broadcast message'));
 }
 function _defineActions()
 {
     defineMembershipActions(array('use simple messenger'));
 }
Exemple #7
0
 function _defineActions()
 {
     defineMembershipActions(array('avatar upload', 'avatar edit any', 'avatar delete any'));
 }
 function _isMembershipEnabledFor($iProfileId, $sMembershipActionConstant, $isPerformAction = false)
 {
     defineMembershipActions(array('photos add', 'photos view', 'sounds view', 'videos view'));
     if (!defined($sMembershipActionConstant)) {
         return false;
     }
     $aCheck = checkAction($iProfileId ? $iProfileId : $_COOKIE['memberID'], constant($sMembershipActionConstant), $isPerformAction);
     return $aCheck[CHECK_ACTION_RESULT] == CHECK_ACTION_RESULT_ALLOWED;
 }
Exemple #9
0
 /**
  * Constructor
  */
 function BxArlModule($aModule)
 {
     parent::BxDolTextModule($aModule);
     //--- Define Membership Actions ---//
     defineMembershipActions(array('articles delete'), 'ACTION_ID_');
 }
Exemple #10
0
function defineForumActions()
{
    defineMembershipActions(array('forum public read', 'forum public post', 'forum private read', 'forum private post', 'forum search', 'forum edit all', 'forum delete all', 'forum make sticky', 'forum del topics', 'forum move topics', 'forum hide topics', 'forum unhide topics', 'forum hide posts', 'forum unhide posts', 'forum files download'));
}
 /**
  * Define all membership actions
  *
  * @return void
  */
 function _defineActions()
 {
     defineMembershipActions(array('shoutbox use', 'shoutbox delete messages', 'shoutbox block by ip'));
 }
Exemple #12
0
 /**
  * Constructor
  */
 function BxFdbModule($aModule)
 {
     parent::BxDolTextModule($aModule);
     //--- Define Membership Actions ---//
     defineMembershipActions(array('feedback delete'), 'ACTION_ID_');
 }
 function _defineActions()
 {
     defineMembershipActions(array('events view', 'events browse', 'events search', 'events add', 'events comments delete and edit', 'events edit any event', 'events delete any event', 'events mark as featured', 'events approve', 'events broadcast message'));
 }
 function _defineActions()
 {
     defineMembershipActions(array('clonetwo view clonetwo', 'clonetwo browse', 'clonetwo search', 'clonetwo add clonetwo', 'clonetwo comments delete and edit', 'clonetwo edit any clonetwo', 'clonetwo delete any clonetwo', 'clonetwo mark as featured', 'clonetwo approve clonetwo', 'clonetwo broadcast message'), 'ML_');
 }
Exemple #15
0
 function _defineActions()
 {
     defineMembershipActions(array('create polls'));
 }
Exemple #16
0
 function _defineActions()
 {
     defineMembershipActions(array('ads view', 'ads browse', 'ads search', 'ads add', 'ads edit any ad', 'ads delete any ad', 'ads approving'));
 }
 function _defineActions()
 {
     $aActionList = $this->_defineActionsArray();
     defineMembershipActions($aActionList);
 }
Exemple #18
0
 function _isMembershipEnabledFor($sMembershipActionConstant)
 {
     defineMembershipActions(array('photos add', 'sounds add', 'videos add', 'files add'));
     if (!defined($sMembershipActionConstant)) {
         return false;
     }
     $aCheck = checkAction(getLoggedId(), constant($sMembershipActionConstant));
     return $aCheck[CHECK_ACTION_RESULT] == CHECK_ACTION_RESULT_ALLOWED;
 }
 function _defineActions()
 {
     defineMembershipActions(array('blog view', 'blog post view', 'blogs browse', 'blogs posts browse', 'blog post search', 'blog post add', 'blog posts edit any post', 'blog posts delete any post', 'blog posts approving', 'blog posts comments delete and edit'));
 }
Exemple #20
0
 function _defineActions()
 {
     defineMembershipActions(array('send messages'));
 }
 function _defineActions()
 {
     defineMembershipActions(array('store view product', 'store browse', 'store search', 'store add product', 'store edit any product', 'store delete any product', 'store mark as featured', 'store approve product', 'store broadcast message'));
 }
 function _defineActions()
 {
     defineMembershipActions(array('sites view', 'sites browse', 'sites search', 'sites add', 'sites edit any site', 'sites delete any site', 'sites mark as featured', 'sites approve'));
 }
 function processMembershipChecksForMediaUploads(&$aInputs)
 {
     $isAdmin = $GLOBALS['logged']['admin'] && isProfileActive($this->_iProfileId);
     defineMembershipActions(array('photos add', 'sounds add', 'videos add', 'files add'));
     if (defined('BX_PHOTOS_ADD')) {
         $aCheck = checkAction(getLoggedId(), BX_PHOTOS_ADD);
     }
     if (!defined('BX_PHOTOS_ADD') || $aCheck[CHECK_ACTION_RESULT] != CHECK_ACTION_RESULT_ALLOWED && !$isAdmin) {
         unset($aInputs['thumb']);
     }
     $a = array('images' => 'PHOTOS', 'videos' => 'VIDEOS', 'sounds' => 'SOUNDS', 'files' => 'FILES');
     foreach ($a as $k => $v) {
         if (defined("BX_{$v}_ADD")) {
             $aCheck = checkAction(getLoggedId(), constant("BX_{$v}_ADD"));
         }
         if ((!defined("BX_{$v}_ADD") || $aCheck[CHECK_ACTION_RESULT] != CHECK_ACTION_RESULT_ALLOWED) && !$isAdmin) {
             unset($this->_aMedia[$k]);
             unset($aInputs['header_' . $k]);
             unset($aInputs[$k . '_choice']);
             unset($aInputs[$k . '_upload']);
         }
     }
 }
Exemple #24
0
function getUserPerm($sUser, $sType, $sAction, $iForumId)
{
    global $logged;
    $iMemberId = $logged['member'] || $logged['admin'] ? $_COOKIE['memberID'] : 0;
    $isOrcaAdmin = $logged['admin'];
    $isLoggedIn = $iMemberId ? 1 : 0;
    defineMembershipActions(array('forum public read', 'forum public post', 'forum private read', 'forum private post', 'forum search', 'forum edit all', 'forum delete all', 'forum make sticky', 'forum del topics', 'forum move topics', 'forum hide topics', 'forum unhide topics', 'forum hide posts', 'forum unhide posts', 'forum files download'));
    $isPublicForumReadAllowed = ($aCheck = checkAction($iMemberId, BX_FORUM_PUBLIC_READ, true)) && CHECK_ACTION_RESULT_ALLOWED == $aCheck[CHECK_ACTION_RESULT] ? 1 : 0;
    $isPublicForumPostAllowed = $isLoggedIn && ($aCheck = checkAction($iMemberId, BX_FORUM_PUBLIC_POST, true)) && CHECK_ACTION_RESULT_ALLOWED == $aCheck[CHECK_ACTION_RESULT] ? 1 : 0;
    $isPrivateForumReadAllowed = $isLoggedIn && ($aCheck = checkAction($iMemberId, BX_FORUM_PRIVATE_READ, true)) && CHECK_ACTION_RESULT_ALLOWED == $aCheck[CHECK_ACTION_RESULT] ? 1 : 0;
    $isPrivateForumPostAllowed = $isLoggedIn && ($aCheck = checkAction($iMemberId, BX_FORUM_PRIVATE_POST, true)) && CHECK_ACTION_RESULT_ALLOWED == $aCheck[CHECK_ACTION_RESULT] ? 1 : 0;
    $isEditAllAllowed = ($aCheck = checkAction($iMemberId, BX_FORUM_EDIT_ALL, true)) && CHECK_ACTION_RESULT_ALLOWED == $aCheck[CHECK_ACTION_RESULT] ? 1 : 0;
    $isDelAllAllowed = ($aCheck = checkAction($iMemberId, BX_FORUM_DELETE_ALL, true)) && CHECK_ACTION_RESULT_ALLOWED == $aCheck[CHECK_ACTION_RESULT] ? 1 : 0;
    return array('read_public' => $isOrcaAdmin || $isPublicForumReadAllowed, 'post_public' => $isOrcaAdmin || $isPublicForumPostAllowed ? 1 : 0, 'edit_public' => $isOrcaAdmin || $isEditAllAllowed ? 1 : 0, 'del_public' => $isOrcaAdmin || $isEditAllAllowed ? 1 : 0, 'read_private' => $isOrcaAdmin || $isPrivateForumReadAllowed ? 1 : 0, 'post_private' => $isOrcaAdmin || $isPrivateForumPostAllowed ? 1 : 0, 'edit_private' => $isOrcaAdmin || $isEditAllAllowed ? 1 : 0, 'del_private' => $isOrcaAdmin || $isDelAllAllowed ? 1 : 0, 'edit_own' => 1, 'del_own' => 1, 'download_' => $isOrcaAdmin || ($aCheck = checkAction($iMemberId, BX_FORUM_FILES_DOWNLOAD, true)) && CHECK_ACTION_RESULT_ALLOWED == $aCheck[CHECK_ACTION_RESULT] ? 1 : 0, 'search_' => $isOrcaAdmin || ($aCheck = checkAction($iMemberId, BX_FORUM_SEARCH, true)) && CHECK_ACTION_RESULT_ALLOWED == $aCheck[CHECK_ACTION_RESULT] ? 1 : 0, 'sticky_' => $isOrcaAdmin || ($aCheck = checkAction($iMemberId, BX_FORUM_MAKE_STICKY, true)) && CHECK_ACTION_RESULT_ALLOWED == $aCheck[CHECK_ACTION_RESULT] ? 1 : 0, 'del_topics_' => $isOrcaAdmin || ($aCheck = checkAction($iMemberId, BX_FORUM_DEL_TOPICS, true)) && CHECK_ACTION_RESULT_ALLOWED == $aCheck[CHECK_ACTION_RESULT] ? 1 : 0, 'move_topics_' => $isOrcaAdmin || ($aCheck = checkAction($iMemberId, BX_FORUM_MOVE_TOPICS, true)) && CHECK_ACTION_RESULT_ALLOWED == $aCheck[CHECK_ACTION_RESULT] ? 1 : 0, 'hide_topics_' => $isOrcaAdmin || ($aCheck = checkAction($iMemberId, BX_FORUM_HIDE_TOPICS, true)) && CHECK_ACTION_RESULT_ALLOWED == $aCheck[CHECK_ACTION_RESULT] ? 1 : 0, 'unhide_topics_' => $isOrcaAdmin || ($aCheck = checkAction($iMemberId, BX_FORUM_HIDE_TOPICS, true)) && CHECK_ACTION_RESULT_ALLOWED == $aCheck[CHECK_ACTION_RESULT] ? 1 : 0, 'hide_posts_' => $isOrcaAdmin || ($aCheck = checkAction($iMemberId, BX_FORUM_HIDE_TOPICS, true)) && CHECK_ACTION_RESULT_ALLOWED == $aCheck[CHECK_ACTION_RESULT] ? 1 : 0, 'unhide_posts_' => $isOrcaAdmin || ($aCheck = checkAction($iMemberId, BX_FORUM_HIDE_TOPICS, true)) && CHECK_ACTION_RESULT_ALLOWED == $aCheck[CHECK_ACTION_RESULT] ? 1 : 0);
}