-
What is an extension?
One of the fundamental ways of implementing cross-application integration with the IPS4 framework is the concept of extensions. Put simply, an extension is a way for an application to implement specific behavior in specific parts of the suite. For example, there's an extension that allows an application to specify how its content is handled by the search system, and another that allows the application to build elements to be displayed on the "Edit Member" screen in the
-
What it does
Since a lot of functionality in the IPS Community Suite (such as reports, warnings, and more) is handled centrally, other applications (both IPS and third-party) need some way to register themselves with the core so that it can be handled appropriately. The ContentRouter extension is where this happens.
At its most basic, the ContentRouter simply registers the content item classes so that the core can work with them.
For more information on the ContentRouter, consult
-
What it is
The CreateMenu extension allows you to add extra submission links to the global "Create" menu at the top of every page.
How to use it
The class should contain a single method, getItems(), which will return an array of entries for the create menu. The array key should be the language key used for the content item, and the value should be an array with the following keys:
link: (required) This is the link that clicking the menu item entry will take you to
tit
-
What it is
A Dashboard extension allows you to add a widget to the AdminCP dashboard, which the administrator can optionally enable or hide, and reposition on their AdminCP dashboard to the location they want the widget to display.
How to use
The class defines two methods that you must implement.
/**
* Can the current user view this dashboard item?
*
* @return bool
*/
public function canView()
{
return TRUE;
}
Th
-
What it is
An EditorLocations extension allows your application to define a location that an editor instance may be used in. This is important for multiple reasons:
An administrator may want to allow certain editor buttons to be available in some areas but not others
You may want to allow HTML to be used in some editors but not others, independent of group permissions
You may want to allow the administrator to control whether attachments can be uploaded in some editors
-
What it is
An EditorMedia extension is designed to allow users to share content from your application within any editor in the suite using the "Insert other media" menu at the bottom left. By default, the user's existing attachments are available for them to share, and if Gallery is installed then any images the user has uploaded in Gallery are also available to be easily shared.
How to use
The extension must define two methods
/**
* Get Counts
*
* @p
-
What it is
FileStorage extensions allow you to define a type of file that will be stored, which in turn allows administrators determine where and how to store them (for instance, to store some files on Amazon S3 and some files locally in a specific directory). It is imperative that every type of file has its own storage extension to prevent files from getting orphaned later, or being removed by the software because the extension used does not properly map to where the files are being stored
-
What it is
FrontNavigation extensions are used to add new tabs to the front end navigation system, tying in directly with the menu manager in the AdminCP. Navigation tabs can show or hide based on permissions and other criteria, activate (or not) based on custom factors, and can support submenus as well.
How to use
Most front navigation extensions are fairly simple, and represent a single link to an area of the site. We will start by outlining how these work: you will need 5 basic
-
What it is
MobileNavigation extensions are used to add new tabs to the mobile app navigation menu, tying in directly with the menu manager in the AdminCP.
How to use
Many of the same methods are implemented as the core/FrontNavigation extension so if you are familiar with this extension you already have a head start.
Implemented methods in the mobile navigation extension are as follows;
/**
* Can the currently logged in user acces
-
What it is
GroupForm extensions allow you to add form elements to the group configuration form in the AdminCP, and then process the values supplied for those form elements in order to format and/or store the configuration. This allows you to easily add additional per-group settings for your application, if needed.
How to use
/**
* Process Form
*
* @param \IPS\Helpers\Form $form The form
* @param \IPS\Member\Group $group Exi
-
What it is
GroupLimits extensions allow your application an opportunity to take a group setting and then determine what ultimate value a user who belongs to multiple groups should be given. For instance, if a user is in a group who is allowed to post content and in a group who is not allowed to post content, then the user should be permitted to post content (because the group setting merges take the best value possible). While this simple use case scenario is handled out of the box, other s
-
What it is
IncomingEmail extensions allow your application an opportunity to parse incoming emails and perform an action based on this. For example, Commerce has the ability to parse incoming emails in order to allow clients to email replies to tickets which will automatically be stored as replies within Commerce to the associated support request.
You must set up POP3 fetching of emails or piping of incoming emails into the software in order for the incoming emails to be processed by I
-
What it does
An AchievementAction extension allows you to define custom actions for Achievement Rules.
Note that you do not ever have to think directly about points or badges. You just tell the system about your actions, and when they happen. The framework will handle including your actions in the UI that allows administrators to configure what points and badges are awarded from there, and handle giving them out (although you don't nee to worry about this, details of how this happ
-
What it is
IpAddresses extensions allow your application to tie into the AdminCP and ModeratorCP IP address lookup areas to show when an IP address has been registered in your application, or all IP addresses used by a specific member. If your application does not store any IP addresses, you will not need to use this extension. If your application stores IP addresses outside of Content Item classes it is recommended that you create one or more IpAddresses extensions to allow administrators
-
What it is
A LiveSearch extension allows administrators to search through your application in the AdminCP using the global live search at the top of every page. This can be useful if your application has data which an administrator may be attempting to find (such as category names or department titles).
How to use
The extension will contain 4 methods you will define
/**
* Constructor
*
* @return void
*/
public function __construct()
-
What it is
MemberFilter extensions allow your application to create filter form elements to be used when bulk emailing members, and when configuring group promotion steps. MemberFilter extensions may be used elsewhere by the Suite in future releases. If your application has a filterable status that may be useful for identifying members (e.g. to promote or send emails to the member based upon), a MemberFilter extension may be beneficial. For example, Blog has a MemberFilter extension that wi
-
What it is
MemberHistory extensions accept member history records that have been stored and translate the data for display.
How to use
The extension defines 2 methods, and then you will need to store member history records separately when appropriate.
The parseLogType column accepts the log type as the $value parameter and the log data (the row from the database) as the $row parameter, and is expected to return a human-understandable representation of the log type. For insta
-
What it is
A MemberSync extension allows your application an opportunity to perform actions when member accounts change. When members are deleted your application may need to remove data associated with the member, or when member's log out you may need to sync this state change to an external service. The MemberSync extension type provides several callback methods to accomplish these tasks.
How to use
When creating a MemberSync extension you need only use the methods that are rele
-
What it is
The MetaData extension type is a very generic extension type that, at its core, is designed to facilitate the addition of meta data associated with content items. If your application does not have any content items, then this extension type will not be of use to you.
The best way to see how you might use this extension is to review some existing implementations, including the core extensions FeaturedComments (which allows moderators to feature comments within individual cont
-
What it is
The MFAArea extension allows you to protect certain resources within your application behind multi-factor authentication (MFA), if enabled for the site. Commerce uses this, for example, to require MFA when users access certain restricted areas. Using an extension allows administrators to explicitly require or not require MFA for your sensitive pages, giving them greater control and flexibility over the MFA system as a whole.
How to use
The extension defines one method,
-
What it is
ModCp extensions allow you to add new pages to the moderator control panel (ModeratorCP) on the front end. This can be beneficial if there are special areas of your application that moderators may need to handle, for example banning users from a chat room or allowing moderators to process form submissions in your application.
How to use it
The extension defines two basic methods.
/**
* Returns the primary tab key for the navigation bar
*
*
-
What it is
The ModCpMemberManagement extension type allows your application to add a new tab to the ModeratorCP > Member Management page available to moderators (with permission). By default, there are tabs here in the ModeratorCP to manage banned, mod-queued and posting-restricted members, however your application may have a need to allow moderators to manage members with respect to your application as well.
How to use
When you create the extension, two basic methods are defin
-
What it does
An AdvertisementLocations extension allows you to define locations and settings for advertisements in order to allow you to insert advertisements in specific locations within your application. The forums application uses this, for example, to allow advertisements to be shown after the first post in a topic and in the topic listing.
How to use
When you create a new instance of this application extension, you will need to define two methods (which will already be define
-
What it is
ModeratorPermissions extensions allow you to add additional moderator permissions that administrators will be able to set on a per-moderator basis when configuring moderators in the AdminCP. You could use this to allow administrators to specify which moderators can ban users from a chat room, for instance, or to specify which moderators can approve applications in your application.
How to use
When you create an instance of this extension you can define 3 methods.
-
What it is
The Notifications extension class allows your application to define new types of notifications that can be sent (and which users can configure how to receive), as well as process those notifications to define the values shown to users who have received such notifications.
How to use
When you create the extension, two methods will be present which you should define.
/**
* Get configuration
*
* @param \IPS\Member $member The member