Skip to Content Skip to Menu

API Triggers List - Comprehensive ??

  • jwwicks
  • jwwicks
  • OFFLINE
  • Posts: 27
  • Thanks: 0
  • Karma: 1
13 years 11 months ago #148293 by jwwicks
API Triggers List - Comprehensive ?? was created by jwwicks
Hello Fellow CBers,

Here's the list of plugin triggers I found in the CB 1.3.1 source using find and grep...

[code:1]
$_PLUGINS->trigger( 'onAfterAcceptConnection', array($userid,$connectionid,$ueConfig,$ueConfig));
$_PLUGINS->trigger( 'onAfterAddConnection', array($this->referenceid,$connectionid,$ueConfig,$ueConfig));
$_PLUGINS->trigger( 'onAfterBackendUsersList', array( 1, &$rows, &$pageNav, &$search, &$lists, $option, $select_tag_attribs ) );
$_PLUGINS->trigger( 'onAfterCheckCbDb', true );
$_PLUGINS->trigger( 'onAfterCheckCbFieldsDb', true );
$_PLUGINS->trigger( 'onAfterDeleteUser', array( $user, true ) );
$_PLUGINS->trigger( 'onAfterDenyConnection', array($userid,$connectionid,$ueConfig,$ueConfig));
$_PLUGINS->trigger( 'onAfterEditATab', array( &$oContent, &$oTab, &$user, &$postdata, $output, $formatting, $reason, $tabbed ) );
$_PLUGINS->trigger( 'onAfterEmailUserForm', array( &$rowFrom, &$rowTo, &$warning, 1 )); //$ui=1
$_PLUGINS->trigger( 'onAfterFieldsFetch', array( &$fields, &$user, $reason, $tabid, $fieldIdOrName ) );
$_PLUGINS->trigger( 'onAfterFixDb', array( $dryRun ) );
$_PLUGINS->trigger( 'onAfterLogin', array( &$row, $loggedIn ) );
$_PLUGINS->trigger( 'onAfterLoginForm', array( $name_lenght, $pass_lenght, $horizontal, $class_sfx, &$params ) );
$_PLUGINS->trigger( 'onAfterLogout', array( $myUser, true ) );
$_PLUGINS->trigger( 'onAfterLogoutForm', array( $name_lenght, $pass_lenght, $horizontal, $class_sfx, &$params ) );
$_PLUGINS->trigger( 'onAfterNewUser', array( &$this, &$this, false, true ) );
$_PLUGINS->trigger( 'onAfterPrepareViewTabs', array( &$this->tabsContents, &$this->tabsToDisplay[$position], &$user, $position, $tabid ) );
$_PLUGINS->trigger( 'onAfterRemoveConnection', array($userid,$connectionid,$ueConfig,$ueConfig));
$_PLUGINS->trigger( 'onAfterSyncUser', true );
$_PLUGINS->trigger( 'onAfterTabsFetch', array( &$tabsCache, &$user, $reason ) );
$_PLUGINS->trigger( 'onAfterTabsFetch', array( &$this->tabsToDisplay[$position], &$user, 'profile' ) );
$_PLUGINS->trigger( 'onAfterUpdateUser', array( &$this, &$this, $oldUserComplete ) );
$_PLUGINS->trigger( 'onAfterUserApproval', array( $row, $approved, true ) );
$_PLUGINS->trigger( 'onAfterUserApproval', array( $user, true, true ) );
$_PLUGINS->trigger( 'onAfterUserApproval', array($row,false,true));
$_PLUGINS->trigger( 'onAfterUserAvatarUpdate', array( &$user, &$user, $isModerator, $newFileName ) );
$_PLUGINS->trigger( 'onAfterUserAvatarUpdate', array(&$row,&$row,$isModerator,$newFileName) );
$_PLUGINS->trigger( 'onAfterUserConfirm', array( $this, true ) );
$_PLUGINS->trigger( 'onAfterUserProfileDisplay', array($user,true));
$_PLUGINS->trigger( 'onAfterUserProfileEditDisplay', array( $user, $tabcontent ) );
$_PLUGINS->trigger( 'onAfterUserRegistration', array( &$this, &$this, true ) );
$_PLUGINS->trigger( 'onAfterUserRegistrationMailsSent', array( &$userComplete, &$userComplete, &$messagesToUser, $ueConfig, $ueConfig, true));
$_PLUGINS->trigger( 'onAfterUserUpdate', array( &$this, &$this, $oldUserComplete ) );
$_PLUGINS->trigger( 'onAfterUsernameReminder', array( &$result, &$res ) );
$_PLUGINS->trigger( 'onAfterUsersListFieldsSql', array( &$columns, &$allFields, &$tableReferences ) );
$_PLUGINS->trigger( 'onBeforeAcceptConnection', array($userid,$connectionid,$ueConfig,$ueConfig));
$_PLUGINS->trigger( 'onBeforeAddConnection', array($this->referenceid,$connectionid,$ueConfig,$ueConfig,&$umsg));
$_PLUGINS->trigger( 'onBeforeBackendUserEmail', array( &$user, &$emailSubject, &$emailBody, $mode, &$extraStrings, $simulationMode ) );
$_PLUGINS->trigger( 'onBeforeBackendUsersEmailForm', array( &$rows, &$pageNav, &$search, &$lists, &$cid, &$emailSubject, &$emailBody, &$inputTextExtras, &$select_tag_attribs, $simulationMode, $option ) );
$_PLUGINS->trigger( 'onBeforeBackendUsersEmailStart', array( &$rows, $total, $search, $lists, $cid, &$emailSubject, &$emailBody, &$inputTextExtras, $simulationMode, $option ) );
$_PLUGINS->trigger( 'onBeforeBackendUsersListBuildQuery', array( &$tablesSQL, &$joinsSQL, &$tablesWhereSQL, $option ) );
$_PLUGINS->trigger( 'onBeforeDeleteUser', array( $user ) );
$_PLUGINS->trigger( 'onBeforeDenyConnection', array($userid,$connectionid,$ueConfig,$ueConfig));
$_PLUGINS->trigger( 'onBeforeDisplayUsersList', array( &$row, &$users, &$columns, &$allFields, &$lists, $listid, &$search, &$option_itemid, 1 ) ); // $uid = 1
$_PLUGINS->trigger( 'onBeforeEditATab', array( &$oContent, &$oTab, &$user, &$postdata, $output, $formatting, $reason, $tabbed ) );
$_PLUGINS->trigger( 'onBeforeEmailUser', array( &$rowFrom, &$rowTo, 1 )); //$ui=1
$_PLUGINS->trigger( 'onBeforeEmailUserForm', array( &$rowFrom, &$rowTo, 1 )); //$ui=1
$_PLUGINS->trigger( 'onBeforeFirstLogin', array( &$row, $username, $password, &$return ));
$_PLUGINS->trigger( 'onBeforeFixDb', array( $dryRun ) );
$_PLUGINS->trigger( 'onBeforeFixFieldsDb', array( $dryRun ) );
$_PLUGINS->trigger( 'onBeforeLogin', array( &$username, &$password ) );
$_PLUGINS->trigger( 'onBeforeLoginFormDisplay', array( &$postvars, $regErrorMSG ) );
$_PLUGINS->trigger( 'onBeforeLogout', array( $myUser ) );
$_PLUGINS->trigger( 'onBeforeNewPassword', array( $user_id, &$newpass, &$subject, &$message ));
$_PLUGINS->trigger( 'onBeforeNewUser', array( &$this, &$this, false ) );
$_PLUGINS->trigger( 'onBeforeRegisterForm', array( $option, $emailpass, &$regErrorMSG, $fieldsQuery ) );
$_PLUGINS->trigger( 'onBeforeRegisterFormDisplay', array( &$user, $regErrorMSG ) );
$_PLUGINS->trigger( 'onBeforeRemoveConnection', array($userid,$connectionid,$ueConfig,$ueConfig));
$_PLUGINS->trigger( 'onBeforeSyncUser', true );
$_PLUGINS->trigger( 'onBeforeUpdateUser', array( &$this, &$this, &$oldUserComplete ) );
$_PLUGINS->trigger( 'onBeforeUserActive', array( &$user, $ui, $cause, $mailToAdmins, $mailToUser ));
$_PLUGINS->trigger( 'onBeforeUserApproval', array( $row, $approved ) );
$_PLUGINS->trigger( 'onBeforeUserApproval', array( $user, true ) );
$_PLUGINS->trigger( 'onBeforeUserApproval', array($row,false));
$_PLUGINS->trigger( 'onBeforeUserAvatarUpdate', array( &$row, &$row, $isModerator, &$_FILES ) );
$_PLUGINS->trigger( 'onBeforeUserAvatarUpdate', array( &$user, &$user, $isModerator, &$value ) );
$_PLUGINS->trigger( 'onBeforeUserBlocking', array( $row, $actionValue ) );
$_PLUGINS->trigger( 'onBeforeUserConfirm', array( $this ) );
$_PLUGINS->trigger( 'onBeforeUserProfileDisplay', array( &$user, 1, $cbUserIsModerator, $cbMyIsModerator ) );
$_PLUGINS->trigger( 'onBeforeUserProfileEditDisplay', array( &$user, 1 ) );
$_PLUGINS->trigger( 'onBeforeUserProfileEditDisplay', array( &$user, 2 ) );
$_PLUGINS->trigger( 'onBeforeUserProfileRequest', array(&$user,1));
$_PLUGINS->trigger( 'onBeforeUserRegistration', array( &$this, &$this ) );
$_PLUGINS->trigger( 'onBeforeUserUpdate', array( &$this, &$this, &$oldUserComplete, &$oldUserComplete ) );
$_PLUGINS->trigger( 'onBeforeUsernameReminder', array( $userIdUsername->id, &$subject, &$message ));
$_PLUGINS->trigger( 'onBeforeUsersListBuildQuery', array( &$tablesSQL, &$joinsSQL, &$tablesWhereSQL ) );
$_PLUGINS->trigger( 'onBeforeUsersListQuery', array( &$queryFrom, 1, $listid ) ); // $uid = 1
$_PLUGINS->trigger( 'onDoLoginNow', array( $username, $password, $rememberMe, &$row, &$loggedIn, &$resultError, &$messagesToUser, &$alertmessages, &$return ) );
$_PLUGINS->trigger( 'onDoLogoutNow', array( &$loggedOut, &$myUser, &$return ) );
$_PLUGINS->trigger( 'onDuringLogin', array( &$row, 1, &$returnPluginsOverrides ) );
$_PLUGINS->trigger( 'onFieldIcons', array( &$this, &$field, &$user, $output, $reason, $tag, $type, $value, $additional, $allValues, &$displayFieldIcons, $required ) );
$_PLUGINS->trigger( 'onInputFieldHtmlRender', array( $htmlInput, $htmlIcons, $this, $field, $user, $reason, $tag, $type, $inputName, $value, $additional, $htmlDescription, $allValues, $displayFieldIcons, $oReq ) );
$_PLUGINS->trigger( 'onLogChange', array( 'update', 'user', 'field', &$user, &$this->_plugin, &$field, $oldValues, $newValues, $reason ) );
$_PLUGINS->trigger( 'onLoginAuthentication', array( &$username, &$password, &$row, $loginType, &$foundUser, &$stopLogin, &$resultError, &$messagesToUser, &$alertmessages, &$return ) );
$_PLUGINS->trigger( 'onLostPassForm', array( 1 ));
$_PLUGINS->trigger( 'onNewPassword', array($user_id,$newpass));
$_PLUGINS->trigger( 'onPrepareMenus', array( &$user ) );
$_PLUGINS->trigger( 'onSaveUserError', array( &$this, $this->_error, $reason ) );
$_PLUGINS->trigger( 'onStartNewPassword', array( &$checkusername, &$confirmEmail ));
$_PLUGINS->trigger( 'onStartSaveUserRegistration', array() );
$_PLUGINS->trigger( 'onStartUsersList', array( &$listid, &$row, &$search, &$limitstart, &$limit ) );
$_PLUGINS->trigger( 'onUserActive', array( &$user, $ui, $cause, $mailToAdmins, $mailToUser ) );
[/code:1]

Now if we can just get a wiki here on CB we could document these ourselves ???

A person who never made a mistake never tried anything new. - Albert Einstein

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
13 years 11 months ago #148382 by krileon
Replied by krileon on topic Re:API Triggers List - Comprehensive ??
List of triggers and how to use them can also be found at the following tutorial. There are more triggers then that however which are built using variables.

www.allmysocials.com/tutorials/item/228-event-triggers


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • jwwicks
  • jwwicks
  • OFFLINE
  • Posts: 27
  • Thanks: 0
  • Karma: 1
13 years 11 months ago #148437 by jwwicks
Replied by jwwicks on topic Re:API Triggers List - Comprehensive ??
Hi krileon,

That link doesn't have anything about how to use them. This is especially troublesome when you consider API functions like:

'onAfterUserAvatarUpdate', array( &$user, &$user, $isModerator, $newFileName )

Where two instances of a userObject are passed to the function but CB's documentation supplies no clue as to what the second instance is used for.

The API is extremely poorly documented. I believe this has been a request from 3PD for quite some time. It's one of the reasons I quit recommending CB or subscribing.

Jw

A person who never made a mistake never tried anything new. - Albert Einstein

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
13 years 11 months ago #148542 by krileon
Replied by krileon on topic Re:API Triggers List - Comprehensive ??
We've plans for an API documentation, but it is quite a lot to document. Nearly as much effort goes into making proper documentation as it does to write CB it self. It takes time to be done properly.

Am sorry you do not feel the API is adequately documented. I've tried to help with this by turning my personal site into a developers resource.

I plan to add more information when I've more time. I will add the variable usage to each trigger as suggested.

I however have to comment that nothing is stopping you from contributing to the community as you've done with this post. CB is open source and thus community driven; that means we need the communities help to make CB better. This can include documentation work.

Where two instances of a userObject are passed to the function but CB's documentation supplies no clue as to what the second instance is used for.

As far as I am aware the second instance doesn't do anything aside from provide 2 instances of $user object. It could even be a Goof, but the API is in use so we can not simply just change it without breaking integrations.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • jwwicks
  • jwwicks
  • OFFLINE
  • Posts: 27
  • Thanks: 0
  • Karma: 1
13 years 11 months ago #148617 by jwwicks
Replied by jwwicks on topic Re:API Triggers List - Comprehensive ??
Actually I did volunteer to do just that but never heard from you folks.

Seems trivial, we'll not trivial, to add comment blocks and run phpDocumentor as part of the release process.

Jw

A person who never made a mistake never tried anything new. - Albert Einstein

Please Log in or Create an account to join the conversation.

  • nant
  • nant
  • OFFLINE
  • Posts: 12339
  • Thanks: 1467
  • Karma: 877
13 years 11 months ago #148623 by nant
Replied by nant on topic Re:API Triggers List - Comprehensive ??
jwwicks wrote:

Actually I did volunteer to do just that but never heard from you folks.

Seems trivial, we'll not trivial, to add comment blocks and run phpDocumentor as part of the release process.

Jw


Sorry for missing you offer to help.

Please PM me your email address and I will send you the current internal version of the API document for your review.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum