Reference
This chapter contains useful information about available menu item locations, hooks and other stuff which you will need when developing your plugin.
Menu item locations
These are available “menu item” locations where you can add your own menu items. Such as a new settings link, or list options.
Menu item location | Notes |
---|---|
Admin.Settings | Adds a menu item to the left-side menu of the admin settings section |
Admin.TopMenu | Adds a menu item to the top menu of the admin area |
Admin.TopDropMenu | Adds a menu item to the drop down menu on the top menu |
Admin.TopRightMenu | Adds a menu item to the top right menu in admin area |
User.List.Options | Adds a menu item to subscriber list options |
User.Settings | Adds a menu item to the user settings section |
User.TopMenu | Adds a menu item to the top menu of the user area |
User.TopDropMenu | Adds a menu item to the drop down menu on top menu of user area |
Campaign.Navigation.Reports | Adds a menu item to campaign reports screen |
Campaign.Navigation.ReportOptions | Adds a menu item to campaign report options drop down menu |
Campaign.Navigation.Options | Adds a menu item to campaign options menu |
User.Settings.Integrations | Adds a menu item to user settings integrations section (v4.6.4+) |
User.Overview.QuickAccess | Adds a menu item to user area overview page (to the right side) (v4.6.4+) |
Form item locations
These are available “form item” locations where you can add new form elements, such as adding a new user group limit.
Form item location | Notes |
---|---|
FormItem.AddTo.Admin.UserGroupLimitsForm | Adds new form items to user group create and edit “Limits” tab |
Action hook listeners
“Action hooks” will be triggered during a certain process. You can execute a specific code in your plugin. For example, when an email campaign is sent, you can execute your plugin method and inform the administrator by email. Action hooks can not effect the process.
Hook listener | Parameters and notes |
---|---|
Cron.Bounce | No input parameters |
Cron.Executer | No input parameters |
Track.Open | $ArrayList, $ArrayCampaign, $ArrayAutoResponder |
Cron.FBL | No input parameters |
Cron.General | No input parameters |
Cron.Bounce | No input parameters |
Cron.FBL | No input parameters |
Cron.Requests | No input parameters |
Cron.Requests | No input parameters |
Cron.SendEngine | No input parameters |
Cron.Sync | No input parameters |
Cron.TransactionalSend | No input parameters |
Cron.General | No input parameters |
Cron.SendEngine | No input parameters |
Extras.Mailgun.Event.Pre | No input parameters |
Extras.Mailgun.Event.Post | No input parameters |
Extras.Mailjet.Event.Pre | No input parameters |
Extras.Mailjet.Event.Post | No input parameters |
Extras.Sendgrid.Event.Pre | No input parameters |
Extras.Sendgrid.Event.Post | No input parameters |
Administrator.Login.Pre | $Username, $Password, |
Administrator.Login.Fail | $Username, $Password |
Administrator.Login.Post | $ArrayAdmin |
Administrator.Update.Pre | $AdminID, $Username, $Password, $EmailAddress, $Name |
Administrator.Update.Post | $AdminID |
Attachment.Delete.Post | $UserID, $AttachmentID |
Autoresponder.Create.Post | $NewAttachmentID |
Autoresponder.Update.Post | $AutoResponderID |
Autoresponder.Delete.Post | $ArrayAutoResponders |
Campaign.Copy.Post | $NewCampaignID |
Campaign.Create.Post | $NewCampaignID |
Campaign.Update.Post | $CampaignID |
Campaign.Delete.Post | $ArrayCampaigns |
Client.Create.Post | $NewClientID |
Client.Login.Post | $ClientID |
Client.Update.Post | $ClientID |
Client.Delete.Post | $ArrayClients |
CustomField.Create.Post | $NewCustomFieldID |
CustomField.Update.Post | $CustomFieldID |
CustomField.Delete.Post | $ArrayCustomFields |
Email.Create.Post | $NewEmailID |
Email.Delete.Pre | $UserID, $EmailID |
Email.DesignPreview.Create.Post | $NewJobID |
Email.DesignPreview.Delete.Post | $UserID, $JobID |
Email.Create.Post | $NewEmailID |
Email.Template.Create.Post | $NewEmailID |
Email.Template.Delete.Post | $ArrayTemplates |
Email.Template.Update.Post | $TemplateID |
Email.Update.Post | $EmailID |
List.Create.Post | $NewListID |
List.Update.Post | $ListID |
List.Delete.Post | $ArrayLists |
MediaLibrary.Upload.Post | $NewMediaID |
Threshold.SubscriberImport | $ArrayUser, $TotalImported, $TotalData, $TotalDuplicates, $TotalFailed |
User.Create | $NewUserID |
User.Login.Post | $UserID |
User.Update.Post | $UserID |
UserGroup.Delete.Post | $ArrayUserGroup |
User.Delete.Post | $ArrayUsers |
Delete.Attachment | $ArrayCriterias |
Delete.AutoResponder | $UserID, $ArrayAutoResponderIDs, $ListID, $EmailID |
Delete.Campaign | $UserID, $ArrayCampaignIDs, $EmailID |
Delete.Client | $UserID, $ArrayClientIDs |
Delete.CustomField | $UserID, $CustomFieldIDs, $ListID |
Delete.Email | $ArrayCriterias |
Delete.DesignPreviewJob | $ArrayCriterias |
Delete.List | $UserID, $ArraySubscriberListIDs |
Delete.MediaLibraryItem | $ArrayMedia, $UserID |
Delete.PaymentLogs | $UserID |
Email.Send.Stop | ‘Campaign’ constant |
Delete.Segments | $UserID, $ArraySegmentIDs, $ListID |
Delete.Subscriber | $SubscriberListIDs |
Delete.Subscriber.Active | $SubscriberListID |
Delete.Subscriber.HardBounced | $SubscriberListID |
Delete.Subscriber.Suppressed | $SubscriberListID |
Delete.Subscriber.NotOptedIn | $SubscriberListID, $Days |
Delete.Subscriber.ByEmail | $SubscriberListID, $ArrayEmailAddresses |
Delete.Subscriber.ByID | $SubscriberListID, $ArraySubscriberIDs |
Delete.Subscriber.SuppressedSubscribersByID | $SubscriberListID, $ArraySuppressionIDs |
Delete.Subscriber.Segment | $SubscriberListID, $SegmentID |
Delete.SuppresionList | $ListID, $UserID |
Delete.Tag | $OwnerUserID, $ArrayTagIDs |
Delete.Template | $ArrayTemplateIDs |
Delete.Theme | $ArrayThemeIDs |
Delete.TransactionEmail | $ListID, $EmailID, $SubscriberID, $AutoResponderID |
Delete.UserGroup | $UserGroupID |
Delete.User | $ArrayUserIDs |
Delete.WebserviceIntegration | $UserID, $ArrayURLIDs, $ListID |
Threshold.CampaignRecipients | $ArrayUser, $TotalRecipients, $CampaignID |
Cron.TransactionalSend.AfterDelivery | $Email, $ArrayUser, $ArrayList, $ArraySubscriber, $ArrayAutoResponder |
Threshold.CampaignRecipients | $ArrayUser, $TotalRecipients, $CampaignID |
Cron.TransactionalSend.AfterDelivery | $ArrayEmail, $ArrayUser, $ArrayList, $ArraySubscriber, $ArrayAutoResponder |
UserGroup.Create.Post | $UserGroup, $PostItems |
UserGroup.Update.Post | $UserGroup, $PostItems |
Campaign.OnView | $Campaign |
OctAutomation.MessageDelivery.QuotaExceeded | $User, $ThisPeriodSentEmails, $PeriodLimit |
UI.Campaign.Details | $Campaign |
UI.Campaigns.Browse | No input parameters |
User.Login.ValidationError | No input parameters (v4.6.4+) |
User.Login.InvalidUser | $ErrorCode (v4.6.4+) |
Client.Login.ValidationError | No input parameters (v4.6.4+) |
Client.Login.InvalidUser | $ErrorCode (v4.6.4+) |
Admin.Login.ValidationError | No input parameters (v4.6.4+) |
Admin.Login.InvalidUser | $ErrorCode (v4.6.4+) |
Filter hook listeners
“Filter hooks” are just the same as action hooks with one difference. Any variables passed into the filter hook are received back in the same order. For example, during the email sending process, if a filter hook exists and $Subject, $HTMLBody, $PlainBody parameters are passed in, your plugin method which is hooked into that listener should return these three parameters in the same order. In this way, you can change the process. For example, you can remove specific words from the email content or you can pause the email campaign.
Hook listener | Parameters and notes |
---|---|
Email.Send.Before | $Subject, $HTMLContent, $PlainContent, $ArraySubscriber |
Email.Send.EachRecipient | $Content, $Subject, $HTMLContent, $ArraySubscriber, $Type |
MysqlQueryGetRowsFilter | $SQLQuery |
MysqlCriteriaFilter | $ArrayCriteria |
PersonalizationTags.List.Campaigns | $AvailableLinkTags |
PersonalizationTags.$MODE.Subject | $SubjectTags |
PersonalizationTags.$MODE.Content | $ContentTags |
Campaign.Email.Send.Before | $Subject, $HTMLContent, $PlainContent, $ArraySubscriber, $CampaignID (v4.6.4+) |
Campaign.Email.Send.EachRecipient | $Subject, $HTMLBody, $PlainBody, $ArraySubscriber, $Email, $ContentType, $ArrayUser, $ArrayCampaign, $ArrayList |
PaymentReceipt.Email.PaymentLinks | $PaymentLinks |
UserGroup.Update.FieldValidator | $FormRules |
SubscriberRuleFields | $SegmentRulePluginFields |
Personalization.Content | $StringToPersonalize, $ArrayPersonalizationScope, $ArraySubscriber, $ArrayUser, $ArrayList, $ArrayCampaign, $ArrayAutoResponder, $IsPreview, $ArrayEmail, $DisablePersonalization, (v4.6.4+) |
Constants
Constant | Description |
---|---|
DATA_PATH | Data directory path |
DATA_URL | Data directory URL |
LIBRARY_PATH | Library directory path |
PLUGIN_PATH | Plugin directory path |
PLUGIN_URL | Plugin directory URL |
MD5_SALT | Salt for encryption |
TIME_ZONE_LIST | Time zone list separated by |
LANGUAGE | Language set in the system |
GEO_LOCATION_DATA_PATH | Path to the IP location database file |
APP_PATH | Oempro installation path |
APP_URL | Oempro URL |
PRODUCT_VERSION | Oempro version |
LICENSE_KEY | Oempro license key |
HTACCESS_ENABLED | User friendly URL enabled (true/false) |
DEMO_MODE_ENABLED | Whether demo mode is enabled or not |
OEMPRO_PASSWORD_SALT | Salt for encryption |
Global methods
Global method | Description |
---|---|
InterfaceAppURL($Return = false) | The Oempro url. Based on the htaccess pretty url status, it points to the front-end system directly |
InterfaceInstallationURL($Return = false) | Oempro’s installation url. No matter if pretty url is enabled or not, it points to Oempro’s root folder |
Using the Oempro API inside your plugins
Oempro’s powerful API is also available in your plugins. This allows you to use powerful features without re-writing all those algorithms again.
In order to enable API access in your plugin, first load the API object in your plugin. You can load the API object in “loader” method or in the method where you need to use the API:
Core::LoadObject('api');
Once API object is loaded, you are ready to access the API. Here’s an example for Subscriber.Optin API call:
$JsonResponse = API::call(array(
'format' => 'json',
'command' => 'subscriber.optin',
'parameters'=> array(
'listid' => $ArraySubscriberList['ListID'],
'subscriberid' => $ArrayParameters['SubscriberID'],
'mode' => $ArrayParameters['Mode']
)
)
);