Creating your own add-ons

 

You can create you own add-ons very easy by using the template.add as your basis. Replace <file> with the name of you file and save the file with extension .add. Now uncomment the sub you want to catch. We added the template file below

#Template for a MCC addon
#Replace <file> with the name of the file without the extention.
#Un remark the functions you want to implement

#Called from within the main function of MCC after user is validated
#sub <file>_Main { my ($action) = @_; }
#Called from within the main function of MCC just before action is validated
#sub <file>_Init{}

#Add HTML to admin menu. Create table or line and add it to $subsmain
#sub <file>_AdminMenu{}
#sub <file>_AdminPanel{}
#sub <file>_AdminLine{}

#Add items to the settings page, Create row and add it to $subsmain
#sub <file>_SettingsPage{}

#Save items of settings page. Add settings stuff in $addonsettings
#sub <file>_SettingsSave{}

#The functions are called when one of the items is changed
#$action-> 1=add,2=modify,3=delete
#sub <file>_Members { my ($action,$member) = @_; }
#sub <file>_Groups { my ($action,$group) = @_; }
#sub <file>_Areas { my ($action,$area) = @_; }

#Called after a member has succesfully login
#sub <file>_Login { my ($member) = @_; }
#Called after a member has succesfully login once a day
#sub <file>_NewDateLogin { my ($member) = @_; }

#Add HTML to RegisterPage or Profile, Create table and add it to $subsmain
#sub <file>_RegisterPage{}
#sub <file>_RegisterSave{}
#sub <file>_ProfilePage{}
#sub <file>_ProfileSave{}

#Add HTML to HomePage, $place 1=toolbar,2=before index,3=after index
#sub <file>_HomePage{ my ($place) = @_; }

#Handle a request to other area
#sub <file>_RequestAccess { my ($member,$area,$onoff) = @_;}
1;