Cheetah
Public Member Functions | Public Attributes | List of all members
ChShoutBoxModule Class Reference
Inheritance diagram for ChShoutBoxModule:
ChWsbModule

Public Member Functions

 __construct (&$aModule)
 
 actionWriteMessage ($sObject, $iHandler)
 
 actionBlockMessage ($sObject, $iHandler, $iMessageId=0)
 
 actionDeleteMessage ($sObject, $iHandler, $iMessageId=0)
 
 actionGetMessages ($sObject, $iHandler, $iLastMessageId=0)
 
 actionAdministration ()
 
 serviceGetShoutBox ($sObject='ch_shoutbox', $iHandler=0)
 
 serviceResponseProfileDelete ($oAlert)
 
 serviceUpdateObjects ($sModuleUri='all', $bInstall=true)
 
 _getLastMessages ($sObject, $iHandler, $iLastId=0)
 
 _defineActions ()
 
 isShoutBoxAllowed ($sObject, $iHandler, $iMemberId, $isPerformAction=false)
 
 isShoutBoxDeleteAllowed ($sObject, $iHandler, $iMemberId, $isPerformAction=false)
 
 isShoutBoxBlockIpAllowed ($sObject, $iHandler, $iMemberId, $isPerformAction=false)
 
 _checkObjectAndHandler ($sObject, &$iHandler)
 
 _runCheckAllowedCustom ($sObject, $iHandler, $iMemberId, $isPerformAction, $sCode)
 
- Public Member Functions inherited from ChWsbModule
 __construct ($aModule)
 
 isLogged ()
 
 getUserId ()
 
 getUserPassword ()
 
 getTitleKey ($sUri)
 
 serviceGetBaseUrl ()
 

Public Attributes

 $sModuleName
 
 $aModuleInfo
 
 $sPathToModule
 
 $iMemberId
 
 $aUsedTemplates = array()
 
 $_aObjects = array()
 
- Public Attributes inherited from ChWsbModule
 $_aModule
 
 $_oDb
 
 $_oTemplate
 
 $_oConfig
 

Additional Inherited Members

- Static Public Member Functions inherited from ChWsbModule
static getInstance ($sClassName)
 
static getTitle ($sUri)
 

Detailed Description

Shoutbox module by Cheetah

This module allow user to send messages that will show on site's home page. This is default module and Cheetah can not work properly without this module.

Profile's Wall: no wall events

Spy: no spy events

Memberships/ACL: use shoutbox - CH_USE_SHOUTBOX

Service methods:

Generate shoutbox window.

See also
ChShoutBoxModule::serviceGetShoutBox(); ChWsbService::call('shoutbox', 'get_shoutbox');

Alerts:

no alerts here;

Definition at line 46 of file ChShoutBoxModule.php.

Constructor & Destructor Documentation

◆ __construct()

ChShoutBoxModule::__construct ( $aModule)

Class constructor ;

Parameters
:$aModule(array) - contain some information about this module; [ id ] - (integer) module's id ; [ title ] - (string) module's title ; [ vendor ] - (string) module's vendor ; [ path ] - (string) path to this module ; [ uri ] - (string) this module's URI ; [ class_prefix ] - (string) this module's php classes file prefix ; [ db_prefix ] - (string) this module's Db tables prefix ; [ date ] - (string) this module's date installation ;

Definition at line 78 of file ChShoutBoxModule.php.

Member Function Documentation

◆ _checkObjectAndHandler()

ChShoutBoxModule::_checkObjectAndHandler (   $sObject,
$iHandler 
)

Definition at line 435 of file ChShoutBoxModule.php.

◆ _defineActions()

ChShoutBoxModule::_defineActions ( )

Define all membership actions

Returns
void

Definition at line 346 of file ChShoutBoxModule.php.

◆ _getLastMessages()

ChShoutBoxModule::_getLastMessages (   $sObject,
  $iHandler,
  $iLastId = 0 
)

Get list of last messages;

Parameters
:$sObject- object name
:$iHandler- handler id
:$iLastId(integer) - last message's Id;
Returns
: (text) - html presentation data;

Definition at line 334 of file ChShoutBoxModule.php.

◆ _runCheckAllowedCustom()

ChShoutBoxModule::_runCheckAllowedCustom (   $sObject,
  $iHandler,
  $iMemberId,
  $isPerformAction,
  $sCode 
)

Definition at line 442 of file ChShoutBoxModule.php.

◆ actionAdministration()

ChShoutBoxModule::actionAdministration ( )

Generate shoutbox's admin page ;

Returns
: (text) - Html presentation data ;

Definition at line 226 of file ChShoutBoxModule.php.

◆ actionBlockMessage()

ChShoutBoxModule::actionBlockMessage (   $sObject,
  $iHandler,
  $iMessageId = 0 
)

Block message

Parameters
$sObjectobject name
$iHandlerhandler id
$iMessageIdinteger
Returns
void

Definition at line 139 of file ChShoutBoxModule.php.

◆ actionDeleteMessage()

ChShoutBoxModule::actionDeleteMessage (   $sObject,
  $iHandler,
  $iMessageId = 0 
)

Delete message

Parameters
$sObjectobject name
$iHandlerhandler id
$iMessageIdinteger
Returns
void

Definition at line 174 of file ChShoutBoxModule.php.

◆ actionGetMessages()

ChShoutBoxModule::actionGetMessages (   $sObject,
  $iHandler,
  $iLastMessageId = 0 
)

Get all latest messages;

Parameters
:$sObject- object name
:$iHandler- handler id
:$iLastMessageId(integer) - last message's Id;
Returns
: (text) - in JSON format;

Definition at line 203 of file ChShoutBoxModule.php.

◆ actionWriteMessage()

ChShoutBoxModule::actionWriteMessage (   $sObject,
  $iHandler 
)

Write new message;

Parameters
$sObjectobject name
$iHandlerhandler id
Returns
text (error message if have some troubles)

Definition at line 97 of file ChShoutBoxModule.php.

◆ isShoutBoxAllowed()

ChShoutBoxModule::isShoutBoxAllowed (   $sObject,
  $iHandler,
  $iMemberId,
  $isPerformAction = false 
)

Check membership level for current type if users (use shotbox);

Parameters
:$iMemberId(integer) - member's Id;
:$isPerformAction(boolean) - if isset this parameter that function will amplify the old action's value;
Returns
boolean

Definition at line 360 of file ChShoutBoxModule.php.

◆ isShoutBoxBlockIpAllowed()

ChShoutBoxModule::isShoutBoxBlockIpAllowed (   $sObject,
  $iHandler,
  $iMemberId,
  $isPerformAction = false 
)

Check membership level for current type if users (block by ip);

Parameters
:$iMemberId(integer) - member's Id;
:$isPerformAction(boolean) - if isset this parameter that function will amplify the old action's value;
Returns
boolean

Definition at line 414 of file ChShoutBoxModule.php.

◆ isShoutBoxDeleteAllowed()

ChShoutBoxModule::isShoutBoxDeleteAllowed (   $sObject,
  $iHandler,
  $iMemberId,
  $isPerformAction = false 
)

Check membership level for current type if users (delete any of messages in shotbox);

Parameters
:$iMemberId(integer) - member's Id;
:$isPerformAction(boolean) - if isset this parameter that function will amplify the old action's value;
Returns
boolean

Definition at line 387 of file ChShoutBoxModule.php.

◆ serviceGetShoutBox()

ChShoutBoxModule::serviceGetShoutBox (   $sObject = 'ch_shoutbox',
  $iHandler = 0 
)

Generate the shoutbox window

Parameters
$sObjectobject name
$iHandlerhandler id

Definition at line 273 of file ChShoutBoxModule.php.

◆ serviceResponseProfileDelete()

ChShoutBoxModule::serviceResponseProfileDelete (   $oAlert)

Delete messages of removed profile

Parameters
$oAlertobject
Returns
boolean

Definition at line 289 of file ChShoutBoxModule.php.

◆ serviceUpdateObjects()

ChShoutBoxModule::serviceUpdateObjects (   $sModuleUri = 'all',
  $bInstall = true 
)

Update shoutbox objects for a module(s)

Definition at line 303 of file ChShoutBoxModule.php.

Member Data Documentation

◆ $_aObjects

ChShoutBoxModule::$_aObjects = array()

Definition at line 63 of file ChShoutBoxModule.php.

◆ $aModuleInfo

ChShoutBoxModule::$aModuleInfo

Definition at line 51 of file ChShoutBoxModule.php.

◆ $aUsedTemplates

ChShoutBoxModule::$aUsedTemplates = array()

Definition at line 60 of file ChShoutBoxModule.php.

◆ $iMemberId

ChShoutBoxModule::$iMemberId

Definition at line 57 of file ChShoutBoxModule.php.

◆ $sModuleName

ChShoutBoxModule::$sModuleName

Definition at line 48 of file ChShoutBoxModule.php.

◆ $sPathToModule

ChShoutBoxModule::$sPathToModule

Definition at line 54 of file ChShoutBoxModule.php.


The documentation for this class was generated from the following file: