Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Can someone give a quick overview how plugins work?

edited January 2010 in Vanilla 2.0 - 2.8
I'm curious how plugins work in vanilla.

Is there any documentation that covers it?

Where in the source code should I be looking to get an idea?

Comments

  • lucluc ✭✭
    In the documentation tab, there's documentation (quick start AND full info) about plugins.

    You didn't look a lot.
  • edited January 2010
    Hi. I've looked at the documentation and I just find two pages talking about the plugins. But I still didn't know how to make plugins. For example, where can I see what events are currently supported by Vanilla 2.0?
  • lucluc ✭✭
    edited January 2010
    grep "FireEvent"

    /var/www/gardenvanilla2$ grep "FireEvent" */*/*
    library/core/class.controller.php: $this->FireEvent('BeforeAddModule');
    library/core/class.controller.php: $this->FireEvent('AfterAddModule');
    library/core/class.dispatcher.php: $this->FireEvent('AfterEnabledApplication');
    library/core/class.handshakeauthenticator.php: $this->FireEvent('Authenticated');
    library/core/class.handshakeauthenticator.php: $this->FireEvent('AfterGetHandshakeData');
    library/core/class.locale.php: $this->FireEvent('BeforeTranslate');
    library/core/class.passwordauthenticator.php: $this->FireEvent('Authenticated');
    library/core/class.pluggable.php: * access to the object throwing the event (see FireEvent() below).
    library/core/class.pluggable.php: public function FireEvent($EventName) {
    /var/www/gardenvanilla2$ grep "FireEvent" */*/*/*
    applications/conversations/models/class.conversationmessagemodel.php: $this->FireEvent('BeforeGet');
    applications/conversations/models/class.conversationmodel.php: $this->FireEvent('BeforeGet');
    applications/garden/controllers/appcontroller.php: $this->FireEvent('GetAppSettingsMenuItems');
    applications/garden/controllers/message.php: $this->FireEvent('AfterGetAssetData');
    applications/garden/controllers/message.php: $this->FireEvent('AfterGetLocationData');
    applications/garden/controllers/profile.php: $this->FireEvent('AddProfileTabs');
    applications/garden/controllers/profile.php: $this->FireEvent('AfterPreferencesDefined');
    applications/garden/controllers/profile.php: $this->FireEvent('AfterAddSideMenu');
    applications/garden/controllers/settings.php: $this->FireEvent('DefineAdminPermissions');
    applications/garden/controllers/settings.php: $this->FireEvent('DashboardData');
    applications/garden/models/class.activitymodel.php: $this->FireEvent('BeforeGet');
    applications/garden/models/class.activitymodel.php: $this->FireEvent('BeforeGetComments');
    applications/garden/models/class.usermodel.php: $this->FireEvent('BeforeGetActiveUsers');
    applications/garden/models/class.usermodel.php: $this->FireEvent('SessionQuery');
    applications/garden/models/class.usermodel.php: $this->FireEvent('BeforeSaveValidation');
    applications/garden/models/class.usermodel.php: $this->FireEvent('BeforeSave');
    applications/garden/models/class.usermodel.php: $this->FireEvent('AfterSave');
    applications/garden/models/class.usermodel.php: $this->FireEvent('BeforeValidateCredentials');
    applications/garden/views/admin.master.php: <?php $this->FireEvent('AfterBody'); ?>
    applications/garden/views/default.master.php: <?php $this->FireEvent('AfterBody'); ?>
    applications/vanilla/controllers/appcontroller.php: $this->FireEvent('GetAppSettingsMenuItems');
    applications/vanilla/controllers/discussion.php: $this->FireEvent('BeforeDiscussionRender');
    applications/vanilla/controllers/post.php: $this->FireEvent('BeforeCommentRender');
    applications/vanilla/controllers/settings.php: $this->FireEvent('GetAppSettingsMenuItems');
    applications/vanilla/models/class.commentmodel.php: * @param boolean $FireEvent Whether or not to fire the event.
    applications/vanilla/models/class.commentmodel.php: public function CommentQuery($FireEvent = TRUE) {
    applications/vanilla/models/class.commentmodel.php: if($FireEvent)
    applications/vanilla/models/class.commentmodel.php: $this->FireEvent('AfterCommentQuery');
    applications/vanilla/models/class.commentmodel.php: $this->FireEvent('BeforeGet');
    applications/vanilla/models/class.commentmodel.php: $this->FireEvent('BeforeGetCount');
    applications/vanilla/models/class.commentmodel.php: $this->FireEvent('BeforeGetOffset');
    applications/vanilla/models/class.commentmodel.php: $this->FireEvent('AfterSaveComment');
    applications/vanilla/models/class.commentmodel.php: $this->FireEvent('BeforeUpdateCommentCount');
    applications/vanilla/models/class.commentmodel.php: $this->FireEvent('DeleteComment');
    applications/vanilla/models/class.discussionmodel.php: $this->FireEvent('AfterDiscussionSummaryQuery');
    /var/www/gardenvanilla2$ grep "FireEvent" */*/*/*/*
    applications/garden/views/modules/userinfo.php: $this->FireEvent('OnBasicInfo');
    applications/garden/views/profile/info.php:$this->FireEvent('BeforeInfo');
    applications/garden/views/profile/info.php: $this->FireEvent('OnBasicInfo');
    applications/garden/views/profile/info.php:$this->FireEvent('AfterInfo');
    applications/vanilla/views/discussion/comments.php:$this->FireEvent('BeforeCommentsRender');
    applications/vanilla/views/discussion/helper_functions.php: $Sender->FireEvent('CommentOptions');
    applications/vanilla/views/discussion/helper_functions.php: $Sender->FireEvent('AfterCommentMeta');
    applications/vanilla/views/discussion/helper_functions.php: $Sender->FireEvent('AfterCommentBody');
    applications/vanilla/views/discussions/helper_functions.php: $Sender->FireEvent('DiscussionOptions');
    applications/vanilla/views/discussions/helper_functions.php: $Sender->FireEvent('AfterDiscussionTitle');
    applications/vanilla/views/discussions/helper_functions.php: $Sender->FireEvent('DiscussionMeta');
    applications/vanilla/views/post/comment.php: $this->FireEvent('AfterFormButtons');
    applications/vanilla/views/post/discussion.php: $this->FireEvent('AfterFormButtons');
  • Ok, thanks. It realy helps. :)
  • MarkMark Vanilla Staff
    Once our phpdoc comments are complete, we'll be generating a class reference that everyone can refer to. That should help greatly as well :)
Sign In or Register to comment.