|
Cheetah
|
Public Member Functions | |
| __construct ($aModule, $aPollSettings=array()) | |
| getModulePath () | |
| getOwnerBlock ($iPollOwner, $aPollInfo) | |
| genMemberAdministration () | |
| genToggleElements () | |
| getManagePollsPage ($bApproval=true) | |
| showAdminActionsPanel ($sWrapperId, $aButtons, $sCheckboxName='entry', $bSelectAll=true, $bSelectAllChecked=false) | |
| getPrivatePollBlock (&$aPollInfo) | |
| getPollBlock (&$aPollInfo, $bAjaxQuery=false, $bViewMode=false, $bAdminMode=false) | |
| getInitPollPage ($bDynamic=true) | |
| proccesData () | |
| getCreationForm () | |
| getCustomActionButton () | |
| getEditForm () | |
| actionResultsList ($iPollID) | |
| actionGetQuestions ($iPollID) | |
| actionSetAnswer ($iPollID, $iVoteNumber) | |
| actionSharePopup ($iEntryId=0) | |
| actionDeletePoll ($iPollId) | |
| actionGetPollBlock ($iPollId, $bViewMode=false) | |
| actionViewCalendar ($iYear=0, $iMonth=0, $iDay=0) | |
| actionCalendar ($iYear=null, $iMonth=null) | |
| actionCategories () | |
| actionTag ($sTag='') | |
| actionTags () | |
| getAdminForm () | |
| actionAdministration () | |
| actionSetOption ($iPollId, $sAction='approval') | |
| getSettingsForm () | |
| searchTags ($sTag, $sExtraParam='', $bUseInitPart=true) | |
| searchCategories ($sCategory, $sExtraParam=null, $bUseInitPart=true) | |
| searchFeatured ($bUseInitPart=true, $iLimit=0) | |
| searchFeaturedHome ($bUseInitPart=true) | |
| searchPopular ($bUseInitPart=true) | |
| searchMy ($bUseInitPart=true) | |
| searchAll ($iLimit=0, $iPerLine=0, $bUseInitPart=true, $sCaption=null, $bShowEmptyMsg=true) | |
| searchProfilePolls ($iProfileId, $iLimit=6, $bUseInitPart=true, $bShowEmptyMsg=true) | |
| searchAllProfilePolls ($iProfileId, $iLimit=0, $iPerLine=0, $bUseInitPart=true) | |
| searchByDate ($sCaption, $iYear, $iMonth, $iDay, $bUseInitPart=true) | |
| showSearchResult ($sBlockCaption, $sExtraParam=null, $iPerPage=5, $bShowPagination=true, $iPerLine=0, $bUseDesignBox=true, $bShowEmptyMsg=true) | |
| createPoll ($sPollQuestion, $sPollAnswers, $sPollResults, $sTags, $iCommentGroupValue, $iVoteGroupValue, $sCategory, $iViewGroupValue) | |
| editPoll ($iPollId, $sPollQuestion, $sPollAnswers, $sCategory, $bActive=true, $bApprove=false, $sTags=null, $iCommentGroupValue=3, $iVoteGroupValue=3, $iViewGroupValue=3) | |
| deletePoll ($iId) | |
| serviceGetPolls ($sAction, $iProfileId=0) | |
| serviceGetMemberMenuLink ($iMemberId=false) | |
| serviceGetMemberMenuLinkAddContent ($iMemberId=false) | |
| serviceEditActionButton ($iMemberId, $iPollId) | |
| serviceDeleteActionButton ($iMemberId, $iPollId) | |
| serviceGetSubscriptionParams ($sAction, $iEntryId) | |
| serviceGetWallPost ($aEvent) | |
| serviceGetWallPostOutline ($aEvent) | |
| serviceGetWallAddComment ($aEvent) | |
| serviceGetWallPostComment ($aEvent) | |
| serviceGetWallData () | |
| _getWallContent ($aItem, $bAsArray=false) | |
| serviceGetSpyData () | |
| serviceGetSpyPost ($sAction, $iObjectId=0, $iSenderId=0, $aExtraParams=array()) | |
| _getSpyArray ($iObjectId, $iSenderId, $sLangKey, $sActivityType='content_activity', $iRecipientId=0) | |
| genPollsList (&$aActivePolls) | |
| isPollCreateAlowed ($iMemberId=false, $isPerformAction=false) | |
| isAllowedShare (&$aDataEntry) | |
| _defineActions () | |
Public Member Functions inherited from ChWsbModule | |
| __construct ($aModule) | |
| isLogged () | |
| getUserId () | |
| getUserPassword () | |
| getTitleKey ($sUri) | |
| serviceGetBaseUrl () | |
Public Attributes | |
| $sHomeUrl | |
| $aUsedTemplates | |
| $aPollSettings | |
| $aModuleInfo | |
| $sActionAnswer = null | |
| $sPathToModule = null | |
| $oPrivacy = null | |
| $sPollHomeTitleLenght = 70 | |
| $iPollsForPerLine = 3 | |
| $oSearch | |
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) |
Poll module by Cheetah
This module allow users to create some of polls. This is default module and Cheetah can not work properly without this module.
Profile's Wall: no wall events
Spy: 'add poll' events are displayed on spy's page
Memberships/ACL: no levels here;
Service methods:
Generate polls list.
Generate poll's link into member menu in 'profile' section (this link will show the number of profile's polls).
Will draw edit poll's button ;
Will draw delete poll's button ;
will return all needed systems alerts for 'spy' module;
will return sys alerts' answer on some action for 'spy' module;
Alerts: Alerts type/unit - 'ch_poll' The following alerts are rised
vote - vote for some of poll $iPollID - poll's Id $iVoteNumber - vote number
delete_poll - delete poll $iPollId - poll's id
add - add new poll $iPollID - poll's Id
edit - edit poll $iPollId - poll's Id
Definition at line 116 of file ChPollModule.php.
| ChPollModule::__construct | ( | $aModule, | |
$aPollSettings = array() |
|||
| ) |
Constructor ;
| : | $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 ; |
| : | $aPollSettings | (array) - contain some needed poll's settings; [ admin_mode ] - (boolean) check admin mode ; [ member_id ] - (integer) logged member's id ; [ page_columns ] - (integer) number of poll's columns for per page ; [ per_page ] - (integer) number of poll's elements for per page ; [ page ] - (integer) current page ; [ action ] - (string) contain some specific actions for pools ; |
Definition at line 166 of file ChPollModule.php.
| ChPollModule::_defineActions | ( | ) |
Definition at line 2520 of file ChPollModule.php.
| ChPollModule::_getSpyArray | ( | $iObjectId, | |
| $iSenderId, | |||
| $sLangKey, | |||
$sActivityType = 'content_activity', |
|||
$iRecipientId = 0 |
|||
| ) |
Function will get array for spy module
| : | $iObjectId | (integer) - poll's Id; |
| : | $iSenderId | (integer) - alert's sender id's; |
| : | $sLangKey | (string) - language key; |
| : | $sActivityType | (string) - type of activity; |
Definition at line 2447 of file ChPollModule.php.
| ChPollModule::_getWallContent | ( | $aItem, | |
$bAsArray = false |
|||
| ) |
Definition at line 2354 of file ChPollModule.php.
| ChPollModule::actionAdministration | ( | ) |
Function will generate the poll's admin page ;
Definition at line 1451 of file ChPollModule.php.
Definition at line 1240 of file ChPollModule.php.
| ChPollModule::actionCategories | ( | ) |
Definition at line 1255 of file ChPollModule.php.
| ChPollModule::actionDeletePoll | ( | $iPollId | ) |
Function will delete poll;
| : | $iPollID | (integer) - poll's Id ; |
Definition at line 1187 of file ChPollModule.php.
| ChPollModule::actionGetPollBlock | ( | $iPollId, | |
$bViewMode = false |
|||
| ) |
Function will return generated poll's block ;
| : | $iPollId | (integer) - poll's block id; |
| : | $bViewMode | (boolean) - view mode (need for single poll block); |
Definition at line 1208 of file ChPollModule.php.
| ChPollModule::actionGetQuestions | ( | $iPollID | ) |
Function will generate list with questions ;
| : | $iPollID | (integer) - poll's Id ; |
Definition at line 1056 of file ChPollModule.php.
| ChPollModule::actionResultsList | ( | $iPollID | ) |
Function will generate the poll's vote results list ;
| : | $iPollID | (integer) - poll's Id ; |
Definition at line 998 of file ChPollModule.php.
| ChPollModule::actionSetAnswer | ( | $iPollID, | |
| $iVoteNumber | |||
| ) |
Function will receive and save the poll's vote result ;
| : | $iPollID | (integer) - poll's Id ; |
| : | $iVoteNumber | (integer) - poll's vote number ; |
Definition at line 1105 of file ChPollModule.php.
| ChPollModule::actionSetOption | ( | $iPollId, | |
$sAction = 'approval' |
|||
| ) |
Method for ajax perform actions (approval/disaproval - featured/unfeatured) from actions button ;
Definition at line 1494 of file ChPollModule.php.
| ChPollModule::actionSharePopup | ( | $iEntryId = 0 | ) |
Share poll
| $iEntryId | integer |
Definition at line 1143 of file ChPollModule.php.
| ChPollModule::actionTag | ( | $sTag = '' | ) |
Function will generate tag's search result;
| ($sTag) - tag |
Definition at line 1275 of file ChPollModule.php.
| ChPollModule::actionTags | ( | ) |
Function will generate page with all poll's tags list
Definition at line 1290 of file ChPollModule.php.
| ChPollModule::actionViewCalendar | ( | $iYear = 0, |
|
$iMonth = 0, |
|||
$iDay = 0 |
|||
| ) |
Function will generate page with nedded polls by date;
Definition at line 1220 of file ChPollModule.php.
| ChPollModule::createPoll | ( | $sPollQuestion, | |
| $sPollAnswers, | |||
| $sPollResults, | |||
| $sTags, | |||
| $iCommentGroupValue, | |||
| $iVoteGroupValue, | |||
| $sCategory, | |||
| $iViewGroupValue | |||
| ) |
Function will create new poll ;
| : | $sPollQuestion | (string) - poll's qiestion ; |
| : | $sPollAnswers | (string) - poll's answers list ; |
| : | $sPollResults | (string) - poll's vote result list ; |
| : | $sTags | (string) - poll's tags; |
| : | $iCommentGroupValue | (integer) - poll's comment privacy group value; |
| : | $iVoteGroupValue | (integer) - poll's vote privacy group value; |
| : | $iViewGroupValue | (integer) - poll's view privacy group value; |
Definition at line 1847 of file ChPollModule.php.
| ChPollModule::deletePoll | ( | $iId | ) |
Definition at line 1960 of file ChPollModule.php.
| ChPollModule::editPoll | ( | $iPollId, | |
| $sPollQuestion, | |||
| $sPollAnswers, | |||
| $sCategory, | |||
$bActive = true, |
|||
$bApprove = false, |
|||
$sTags = null, |
|||
$iCommentGroupValue = 3, |
|||
$iVoteGroupValue = 3, |
|||
$iViewGroupValue = 3 |
|||
| ) |
Function will edit poll's information ;
| : | $iPollId | (integer) - poll's Id ; |
| : | $sPollQuestion | (string) - poll's qiestion ; |
| : | $sPollAnswers | (string) - poll's answers list ; |
| : | $bActive | (boolean) - is active or not ; |
| : | $bApprove | (boolean) - approve or not ; |
Definition at line 1912 of file ChPollModule.php.
| ChPollModule::genMemberAdministration | ( | ) |
Function will generate block of member's administration;
Definition at line 263 of file ChPollModule.php.
| ChPollModule::genPollsList | ( | & | $aActivePolls | ) |
Function will generate polls columns;
| : | $aActivePolls | (array) - active polls list; |
| : | $iBlockStep | (integer) - number of elements for per line; |
Definition at line 2484 of file ChPollModule.php.
| ChPollModule::genToggleElements | ( | ) |
Definition at line 318 of file ChPollModule.php.
| ChPollModule::getAdminForm | ( | ) |
Definition at line 1307 of file ChPollModule.php.
| ChPollModule::getCreationForm | ( | ) |
Function will generate the poll's creation form ;
Definition at line 686 of file ChPollModule.php.
| ChPollModule::getCustomActionButton | ( | ) |
Function will generate custom Button;
Definition at line 817 of file ChPollModule.php.
| ChPollModule::getEditForm | ( | ) |
Function will generate the edit poll's form ;
Definition at line 832 of file ChPollModule.php.
| ChPollModule::getInitPollPage | ( | $bDynamic = true | ) |
Function will generate poll's init page ;
| $bDynamic | boolean |
Definition at line 545 of file ChPollModule.php.
| ChPollModule::getManagePollsPage | ( | $bApproval = true | ) |
Function will get manage poll's page;
| : | $bApproval | (boolean) - only approavl polls needed; |
Definition at line 350 of file ChPollModule.php.
| ChPollModule::getModulePath | ( | ) |
Function will return path to current module;
Definition at line 225 of file ChPollModule.php.
| ChPollModule::getOwnerBlock | ( | $iPollOwner, | |
| $aPollInfo | |||
| ) |
Function will generate information about the poll's onwer;
| : | $iPollOwner | (integer) - poll's owner id; |
| : | $aPollInfo | (array) - poll's information; |
Definition at line 237 of file ChPollModule.php.
| ChPollModule::getPollBlock | ( | & | $aPollInfo, |
$bAjaxQuery = false, |
|||
$bViewMode = false, |
|||
$bAdminMode = false |
|||
| ) |
Function will generate the pool block;
| : | $aPollInfo | (array) - contain some poll's information ; [ id_poll ] - (integer) poll's Id; [ id_profile ] - (integer) poll's owner Id; [ PollDate ] - (string) poll's date creation; [ sec ] - (integer) poll's date creation in seconds; |
| : | $bAjaxQuery | (boolean) - if isset this param that script will use different template; |
Definition at line 445 of file ChPollModule.php.
| ChPollModule::getPrivatePollBlock | ( | & | $aPollInfo | ) |
Function will generate private block;
| : | $aPollInfo | (array) - contain some poll's information ; [ id_poll ] - (integer) poll's Id; [ id_profile ] - (integer) poll's owner Id; [ PollDate ] - (string) poll's date creation; [ sec ] - (integer) poll's date creation in seconds; |
Definition at line 429 of file ChPollModule.php.
| ChPollModule::getSettingsForm | ( | ) |
Function will generate global settings form ;
Definition at line 1520 of file ChPollModule.php.
| ChPollModule::isAllowedShare | ( | & | $aDataEntry | ) |
Definition at line 2512 of file ChPollModule.php.
Function will check membership level for current type if users;
| : | $iMemberId | (integer) - member's Id; |
| : | $isPerformAction | (boolean) - if isset this parameter that function will amplify the old action's value; |
Definition at line 2503 of file ChPollModule.php.
| ChPollModule::proccesData | ( | ) |
Function will procces all recevied poll's data;
Definition at line 588 of file ChPollModule.php.
| ChPollModule::searchAll | ( | $iLimit = 0, |
|
$iPerLine = 0, |
|||
$bUseInitPart = true, |
|||
$sCaption = null, |
|||
$bShowEmptyMsg = true |
|||
| ) |
Function will search all polls;
| : | $iLimit | (integer) - limit of returning polls; |
| : | $iPerLine | (integer) - number elements for per line; |
| : | $bUseInitPart | (boolean) - if isset this param, function will add poll's js part; |
Definition at line 1694 of file ChPollModule.php.
| ChPollModule::searchAllProfilePolls | ( | $iProfileId, | |
$iLimit = 0, |
|||
$iPerLine = 0, |
|||
$bUseInitPart = true |
|||
| ) |
Function will search all profile's polls;
| : | $iProfileId | (integer) - profile's Id; |
| : | $iLimit | (integer) - limit of returning polls; |
| : | $iPerLine | (integer) - number elements for per line; |
| : | $bUseInitPart | (boolean) - if isset this param, function will add poll's js part; |
Definition at line 1743 of file ChPollModule.php.
| ChPollModule::searchByDate | ( | $sCaption, | |
| $iYear, | |||
| $iMonth, | |||
| $iDay, | |||
$bUseInitPart = true |
|||
| ) |
Function will search all polls by date;
| $sCaption | string | |
| : | $iYear | (integer) - nedded year; |
| : | $iMonth | (integer) - nedded month; |
| : | $iDay | (integer) - nedded day; |
| : | $bUseInitPart | (boolean) - if isset this param, function will add poll's js part; |
Definition at line 1773 of file ChPollModule.php.
Function will search poll used the recived category name;
| : | $sCategory | (string) - poll's category; |
| : | $sExtraParam | (string) - extra URI params; |
| : | $bUseInitPart | (boolean) - if isset this param, function will add poll's js part; |
Definition at line 1579 of file ChPollModule.php.
| ChPollModule::searchFeatured | ( | $bUseInitPart = true, |
|
$iLimit = 0 |
|||
| ) |
Function will search featured polls;
| : | $bUseInitPart | (boolean) - if isset this param, function will add poll's js part; |
Definition at line 1602 of file ChPollModule.php.
| ChPollModule::searchFeaturedHome | ( | $bUseInitPart = true | ) |
Function will search featured polls;
| : | $bUseInitPart | (boolean) - if isset this param, function will add poll's js part; |
Definition at line 1623 of file ChPollModule.php.
| ChPollModule::searchMy | ( | $bUseInitPart = true | ) |
Function will all profile's polls;
| : | $bUseInitPart | (boolean) - if isset this param, function will add poll's js part; |
Definition at line 1667 of file ChPollModule.php.
| ChPollModule::searchPopular | ( | $bUseInitPart = true | ) |
Function will search featured polls;
| : | $bUseInitPart | (boolean) - if isset this param, function will add poll's js part; |
Definition at line 1646 of file ChPollModule.php.
| ChPollModule::searchProfilePolls | ( | $iProfileId, | |
$iLimit = 6, |
|||
$bUseInitPart = true, |
|||
$bShowEmptyMsg = true |
|||
| ) |
Function will search all polls;
| : | $iProfileId | (integer) - profile's id; |
| : | $bUseInitPart | (boolean) - if isset this param, function will add poll's js part; |
Definition at line 1720 of file ChPollModule.php.
| ChPollModule::searchTags | ( | $sTag, | |
$sExtraParam = '', |
|||
$bUseInitPart = true |
|||
| ) |
Function will search poll used the recived tag;
| : | $sTag | (string) - tag text; |
| : | $sExtraParam | (string) - extra URI params; |
| : | $bUseInitPart | (boolean) - if isset this param, function will add poll's js part; |
Definition at line 1553 of file ChPollModule.php.
| ChPollModule::serviceDeleteActionButton | ( | $iMemberId, | |
| $iPollId | |||
| ) |
Function will check is member owner of recived poll script will return edit link;
Definition at line 2083 of file ChPollModule.php.
| ChPollModule::serviceEditActionButton | ( | $iMemberId, | |
| $iPollId | |||
| ) |
Function will check is member owner of recived poll script will return edit link;
Definition at line 2066 of file ChPollModule.php.
| ChPollModule::serviceGetMemberMenuLink | ( | $iMemberId = false | ) |
Definition at line 2025 of file ChPollModule.php.
| ChPollModule::serviceGetMemberMenuLinkAddContent | ( | $iMemberId = false | ) |
Definition at line 2043 of file ChPollModule.php.
| ChPollModule::serviceGetPolls | ( | $sAction, | |
$iProfileId = 0 |
|||
| ) |
Function will generate polls list ;
| : | $sAction | (string) - action name ; |
| : | $iProfileId | (integer) - profile's Id; |
Definition at line 1996 of file ChPollModule.php.
| ChPollModule::serviceGetSpyData | ( | ) |
Definition at line 2372 of file ChPollModule.php.
| ChPollModule::serviceGetSpyPost | ( | $sAction, | |
$iObjectId = 0, |
|||
$iSenderId = 0, |
|||
$aExtraParams = array() |
|||
| ) |
Function will get post data for spy module;
Definition at line 2397 of file ChPollModule.php.
| ChPollModule::serviceGetSubscriptionParams | ( | $sAction, | |
| $iEntryId | |||
| ) |
Definition at line 2097 of file ChPollModule.php.
| ChPollModule::serviceGetWallAddComment | ( | $aEvent | ) |
Definition at line 2226 of file ChPollModule.php.
| ChPollModule::serviceGetWallData | ( | ) |
Definition at line 2335 of file ChPollModule.php.
| ChPollModule::serviceGetWallPost | ( | $aEvent | ) |
Definition at line 2119 of file ChPollModule.php.
| ChPollModule::serviceGetWallPostComment | ( | $aEvent | ) |
DEPRICATED, saved for backward compatibility
Definition at line 2283 of file ChPollModule.php.
| ChPollModule::serviceGetWallPostOutline | ( | $aEvent | ) |
Definition at line 2184 of file ChPollModule.php.
| ChPollModule::showAdminActionsPanel | ( | $sWrapperId, | |
| $aButtons, | |||
$sCheckboxName = 'entry', |
|||
$bSelectAll = true, |
|||
$bSelectAllChecked = false |
|||
| ) |
Definition at line 381 of file ChPollModule.php.
| ChPollModule::showSearchResult | ( | $sBlockCaption, | |
$sExtraParam = null, |
|||
$iPerPage = 5, |
|||
$bShowPagination = true, |
|||
$iPerLine = 0, |
|||
$bUseDesignBox = true, |
|||
$bShowEmptyMsg = true |
|||
| ) |
Function will draw the search result;
| : | $sBlockCaption | (string) - block's caption; |
| : | $iPerPage | (integer) - per page value; |
| : | $bShowPagination | (boolean) - if isset this parameter, that function will generate pagination block; |
| : | $iPerLine | (integer) - number of elements for per line; |
| : | $bUseDesignBox | (boolean) - if isset this parameter that rsult will return into design box; |
Definition at line 1808 of file ChPollModule.php.
| ChPollModule::$aModuleInfo |
Definition at line 127 of file ChPollModule.php.
| ChPollModule::$aPollSettings |
Definition at line 124 of file ChPollModule.php.
| ChPollModule::$aUsedTemplates |
Definition at line 121 of file ChPollModule.php.
| ChPollModule::$iPollsForPerLine = 3 |
Definition at line 142 of file ChPollModule.php.
| ChPollModule::$oPrivacy = null |
Definition at line 136 of file ChPollModule.php.
| ChPollModule::$oSearch |
Definition at line 144 of file ChPollModule.php.
| ChPollModule::$sActionAnswer = null |
Definition at line 130 of file ChPollModule.php.
| ChPollModule::$sHomeUrl |
Definition at line 118 of file ChPollModule.php.
| ChPollModule::$sPathToModule = null |
Definition at line 133 of file ChPollModule.php.
| ChPollModule::$sPollHomeTitleLenght = 70 |
Definition at line 139 of file ChPollModule.php.