/**
  * Class constructor ;
  *
  * @param   : $sPageName (string)  - page name (need for the page builder);
  * @param	: $aCommunicatorSettings (array)  - contain some necessary data ;
  * 					[ member_id	] (integer) - logged member's ID;
  * 					[ communicator_mode ] (string) - page mode ;
  * 					[ person_switcher ] (string) - switch the person mode - from me or to me ;
  * 					[ sorting ] (string) - type of message's sort ;
  * 					[ page ] (integer) - contain number of current page ;
  * 					[ per_page ] (integer) - contain per page number for current page ;
  * 					[ alert_page ] (integer) - contain number of current alert's page 
  */
 function BxBaseCommunicator($sPageName, &$aCommunicatorSettings)
 {
     // call the parent constructor ;
     parent::BxDolCommunicator($sPageName, $aCommunicatorSettings);
     //fill array with tamplates name;
     $this->aUsedTemplates = array('communicator_page' => 'communicator_page.html', 'communicator_settings' => 'communicator_settings.html', 'communicator_settings_page' => 'communicator_page_top_settings.html');
 }
Example #2
0
 /**
  * Class constructor ;
  *
  * @param	: $aCommunicatorSettings (array)  - contain some necessary data ;
  * 					[ member_id	] (integer) - logged member's ID;
  * 					[ communicator_mode ] (string) - page mode ;
  * 					[ person_switcher ] (string) - switch the person mode - from me or to me ;
  * 					[ sorting ] (string) - type of message's sort ;
  * 					[ page ] (integer) - contain number of current page ;
  * 					[ per_page ] (integer) - contain per page number for current page ;
  * 					[ alert_page ] (integer) - contain number of current alert's page
  */
 function BxBaseCommunicator($aCommunicatorSettings)
 {
     parent::BxDolCommunicator($aCommunicatorSettings);
     //fill array with tamplates name;
     $this->aUsedTemplates = array('communicator_page' => 'communicator_page.html', 'communicator_page_fr' => 'communicator_page_fr.html', 'communicator_settings' => 'communicator_settings.html', 'communicator_settings_page' => 'communicator_page_top_settings.html');
 }
Example #3
0
/**
 * Unblock profile
 *
 * @param $sourceID
 * @param $targetID
 * @return unknown_type
 */
function PageListUnBlock($iProfileId, $iMemberId = 0)
{
    $sOutputCode = '';
    $iProfileId = (int) $iProfileId;
    $iMemberId = (int) $iMemberId;
    if (!$iMemberId || !getProfileInfo($iMemberId)) {
        return MsgBox(_t('_Failed to apply changes'));
    }
    bx_import('BxDolCommunicator');
    $oCommunicator = new BxDolCommunicator(array('member_id' => $iMemberId));
    if ($oCommunicator->_deleteRequest('sys_block_list', $iProfileId)) {
        $sOutputCode = MsgBox(_t('_User was removed from block list'));
    } else {
        $sOutputCode = MsgBox(_t('_Failed to apply changes'));
    }
    return $sOutputCode;
}