= Extension points Trac offers an increasing number of ''extension points'' that allow you to plugin custom extensions for various functions. This functionality is based on the [TracDev/ComponentArchitecture component architecture] and particularly good introductions can be found at the following sections: * [TracDev/ComponentArchitecture#Declaringanextensionpoint Declaring an extension point] * [TracDev/ComponentArchitecture#Pluggingintoanextensionpoint Plugging in to an extension point] * [TracDev/ComponentArchitecture#HowcomponentsareusedinTracscode How components are used in Trac's code] == Trac Extension Points Below you find a list of extension points available in Trac. If you want to contribute documentation on any of the below described extension point interfaces, feel free to add the documentation. Please use the template [wiki:PageTemplates/TracDev/PluginDevelopment/ExtensionPoints] when authoring new documentation. ||='''Extension Point Interface'''[[br]]'''Source''' =||='''Description''' =|| ||[wiki:TracDev/PluginDevelopment/ExtensionPoints/trac.admin.api.IAdminCommandProvider trac.admin.api.IAdminCommandProvider][[br]]([source:/trunk/trac/admin/api.py#/IAdminCommandProvider source])||Allows plugins to add additional commands to the trac-admin console command.|| ||[wiki:TracDev/PluginDevelopment/ExtensionPoints/trac.admin.api.IAdminPanelProvider trac.admin.api.IAdminPanelProvider][[br]]([source:trunk/trac/admin/api.py#/IAdminPanelProvider source])||Allows plugins to add additional admin panels to the web-based administration module.|| ||[wiki:TracDev/PluginDevelopment/ExtensionPoints/trac.attachment.IAttachmentChangeListener trac.attachment.IAttachmentChangeListener][[br]]([source:trunk/trac/attachment.py#/IAttachmentChangeListener source])||Observe attachment add, delete and reparent operations.|| ||[wiki:TracDev/PluginDevelopment/ExtensionPoints/trac.attachment.IAttachmentManipulator trac.attachment.IAttachmentManipulator][[br]]([source:trunk/trac/attachment.py#/IAttachmentManipulator source])||Validate uploaded attachments before being stored in database.|| ||[wiki:TracDev/PluginDevelopment/ExtensionPoints/trac.attachment.ILegacyAttachmentPolicyDelegate trac.attachment.ILegacyAttachmentPolicyDelegate][[br]]([source:trunk/trac/attachment.py#/ILegacyAttachmentPolicyDelegate source])||Participate in legacy permission checking for attachments.|| ||[wiki:TracDev/PluginDevelopment/ExtensionPoints/trac.db.api.IDatabaseConnector trac.db.api.IDatabaseConnector][[br]]([source:/trunk/trac/db/api.py#/IDatabaseConnector source])||By implementing this interface you can add additional database backends to the system. Currently available are backends for MySQL, PostgreSQL and SQLITE2/3.|| ||[wiki:TracDev/PluginDevelopment/ExtensionPoints/trac.env.IEnvironmentSetupParticipant trac.env.IEnvironmentSetupParticipant][[br]]([source:trunk/trac/env.py#/IEnvironmentSetupParticipant source])||Plugins that provide their own data models must implement this interface to be able to create the required tables in the database on either the creation of a new environment, or during the upgrade of an existing environment.|| ||[wiki:TracDev/PluginDevelopment/ExtensionPoints/trac.env.ISystemInfoProvider trac.env.ISystemInfoProvider][[br]]([source:trunk/trac/env.py#/ISystemInfoProvider source])||Provide system information displayed on the "About Trac" page and in internal error reports.|| ||[wiki:TracDev/PluginDevelopment/ExtensionPoints/trac.mimeview.api.IContentConverter trac.mimeview.api.IContentConverter][[br]]([source:trunk/trac/mimeview/api.py#/IContentConverter source])||Allows plugins to implement conversion strategies for arbitrary content types. (NOTE: API is likely to change in the future)|| ||[wiki:TracDev/PluginDevelopment/ExtensionPoints/trac.mimeview.api.IHTMLPreviewAnnotator trac.mimeview.api.IHTMLPreviewAnnotator][[br]]([source:trunk/trac/mimeview/api.py#/IHTMLPreviewAnnotator source])||Allows plugins to add additional information to an XHTML representation of a given file, for example meta data on the file and so on.|| ||[wiki:TracDev/PluginDevelopment/ExtensionPoints/trac.mimeview.api.IHTMLPreviewRenderer trac.mimeview.api.IHTMLPreviewRenderer][[br]]([source:trunk/trac/mimeview/api.py#/IHTMLPreviewRenderer source])||Allows plugins to provide support for rendering specific content of a specific type as HTML (used for TracSyntaxColoring and image preview).|| ||[wiki:TracDev/PluginDevelopment/ExtensionPoints/trac.notification.api.IEmailSender trac.notification.api.IEmailSender][[br]]([source:trunk/trac/notification/api.py#/IEmailSender source])||Implement this interface to be able to send notification mails.|| ||[wiki:TracDev/PluginDevelopment/ExtensionPoints/trac.notification.api.INotificationDistributor trac.notification.api.INotificationDistributor][[br]]([source:trunk/trac/notification/api.py#/INotificationDistributor source])||Implement this interface to distribute notifications over other channels.|| ||[wiki:TracDev/PluginDevelopment/ExtensionPoints/trac.notification.api.INotificationFormatter trac.notification.api.INotificationFormatter][[br]]([source:trunk/trac/notification/api.py#/INotificationFormatter source])||Implement this interface to convert notification events to different formats.|| ||[wiki:TracDev/PluginDevelopment/ExtensionPoints/trac.notification.api.INotificationSubscriber trac.notification.api.INotificationSubscriber][[br]]([source:trunk/trac/notification/api.py#/INotificationSubscriber source])||Implement this interface for new subscription rules.|| ||[wiki:TracDev/PluginDevelopment/ExtensionPoints/trac.notification.api.IEmailAddressResolver trac.notification.api.IEmailAddressResolver][[br]]([source:trunk/trac/notification/api.py#/IEmailAddressResolver source])||Implement this interface to lookup email addresses for users.|| ||[wiki:TracDev/PluginDevelopment/ExtensionPoints/trac.notification.api.IEmailDecorator trac.notification.api.IEmailDecorator][[br]]([source:trunk/trac/notification/api.py#/IEmailDecorator source])||Implement this interface to add or tweak email headers.|| ||[wiki:TracDev/PluginDevelopment/ExtensionPoints/trac.perm.IPermissionGroupProvider trac.perm.IPermissionGroupProvider][[br]]([source:trunk/trac/perm.py#/IPermissionGroupProvider source])||Implement this extension point interface when you can provide information on groups that a given user is a member of.|| ||[wiki:TracDev/PluginDevelopment/ExtensionPoints/trac.perm.IPermissionPolicy trac.perm.IPermissionPolicy][[br]]([source:trunk/trac/perm.py#/IPermissionPolicy source])||By implementing this interface you can do more finely grained permission checks.|| ||[wiki:TracDev/PluginDevelopment/ExtensionPoints/trac.perm.IPermissionRequestor trac.perm.IPermissionRequestor][[br]]([source:trunk/trac/perm.py#/IPermissionRequestor source])||Plugins can use this extension point to define additional "actions", or permission roles, for the permission system.|| ||[wiki:TracDev/PluginDevelopment/ExtensionPoints/trac.perm.IPermissionStore trac.perm.IPermissionStore][[br]]([source:trunk/trac/perm.py#/IPermissionStore source])||Plugins can use this extension point to implement a storage for permissions and also to handle user authorization.|| ||[wiki:TracDev/PluginDevelopment/ExtensionPoints/trac.prefs.api.IPreferencePanelProvider trac.prefs.api.IPreferencePanelProvider][[br]]([source:trunk/trac/prefs/api.py#/IPreferencePanelProvider source])||Allows plugins to add additional preferences panels to the user's preferences page.|| ||[wiki:TracDev/PluginDevelopment/ExtensionPoints/trac.resource.IResourceManager trac.resource.IResourceManager][[br]]([source:trunk/trac/resource.py#/IResourceManager source])||Allows plugins to take over full control of the realms that they provide, incl. also introducing new resource types to the system.|| ||[wiki:TracDev/PluginDevelopment/ExtensionPoints/trac.search.api.ISearchSource trac.search.api.ISearchSource][[br]]([source:trunk/trac/search/api.py#/ISearchSource source])||Allows plugins to provide additional searchable (re)sources to the system.|| ||[wiki:TracDev/PluginDevelopment/ExtensionPoints/trac.ticket.api.IMilestoneChangeListener trac.ticket.api.IMilestoneChangeListener][[br]]([source:trunk/trac/ticket/api.py#/IMilestoneChangeListener source])||Allows plugins to listen on changes to either existing or newly created milestones.|| ||[wiki:TracDev/PluginDevelopment/ExtensionPoints/trac.ticket.api.ITicketActionController trac.ticket.api.ITicketActionController][[br]]([source:trunk/trac/ticket/api.py#/ITicketActionController source])||Allows plugins to participate in a ticket's workflow.|| ||[wiki:TracDev/PluginDevelopment/ExtensionPoints/trac.ticket.api.ITicketChangeListener trac.ticket.api.ITicketChangeListener][[br]]([source:trunk/trac/ticket/api.py#/ITicketChangeListener source])||Extension point interface for components that require notification on when tickets are created, modified, or deleted.|| ||[wiki:TracDev/PluginDevelopment/ExtensionPoints/trac.ticket.api.ITicketManipulator trac.ticket.api.ITicketManipulator][[br]]([source:trunk/trac/ticket/api.py#/ITicketManipulator source])||Allows plugins to both prepare tickets on creation and also to validate them prior to that they get stored in the database.|| ||[wiki:TracDev/PluginDevelopment/ExtensionPoints/trac.ticket.roadmap.ITicketGroupStatsProvider trac.ticket.roadmap.ITicketGroupStatsProvider][[br]]([source:trunk/trac/ticket/roadmap.py#/ITicketGroupStatsProvider source])||Allows plugins to implement their own scheme of ticket stats, and provide that to the system via the !RoadmapModule.|| ||[wiki:TracDev/PluginDevelopment/ExtensionPoints/trac.timeline.ITimelineEventProvider trac.timeline.ITimelineEventProvider][[br]]([source:trunk/trac/timeline/api.py#/ITimelineEventProvider source])||Allows plugins to contribute events to the [wiki:TracTimeline timeline].|| ||[wiki:TracDev/PluginDevelopment/ExtensionPoints/trac.versioncontrol.api.IRepositoryConnector trac.versioncontrol.api.IRepositoryConnector][[br]]([source:trunk/trac/versioncontrol/api.py#/IRepositoryConnector source])||Support a new version control system.|| ||[wiki:TracDev/PluginDevelopment/ExtensionPoints/trac.versioncontrol.api.IRepositoryChangeListener trac.versioncontrol.api.IRepositoryChangeListener][[br]]([source:trunk/trac/versioncontrol/api.py#/IRepositoryChangeListener source])||Components implementing this interface are notified when new changesets are added to a repository, and when metadata for changesets is modified. [wiki:TracDev/ApiChanges/0.12#IRepositoryChangeListener more here]|| ||[wiki:TracDev/PluginDevelopment/ExtensionPoints/trac.versioncontrol.api.IRepositoryProvider trac.versioncontrol.api.IRepositoryProvider][[br]]([source:trunk/trac/versioncontrol/api.py#/IRepositoryProvider source])||Provide information about known version control repositories.|| ||[wiki:TracDev/PluginDevelopment/ExtensionPoints/trac.versioncontrol.web_ui.browser.IPropertyRenderer trac.versioncontrol.web_ui.browser.IPropertyRenderer][[br]]([source:trunk/trac/versioncontrol/web_ui/browser.py#/IPropertyRenderer source])||Render node properties in TracBrowser and TracChangeset views.|| ||[wiki:TracDev/PluginDevelopment/ExtensionPoints/trac.versioncontrol.web_ui.changeset.IPropertyDiffRenderer trac.versioncontrol.web_ui.changeset.IPropertyDiffRenderer][[br]]([source:trunk/trac/versioncontrol/web_ui/changeset.py#/IPropertyDiffRenderer source])||Render differences between node properties in TracBrowser and TracChangeset views.|| ||[wiki:TracDev/PluginDevelopment/ExtensionPoints/trac.web.api.IAuthenticator trac.web.api.IAuthenticator][[br]]([source:trunk/trac/web/api.py#/IAuthenticator source])||Allows plugins to authenticate users and HTTP sessions thereof. The first authenticator able to authenticate a user is the authoritative authenticator, meaning that other authenticators available in the system will not be called. Users that cannot be authenticated by the request and an associated session thereof are called 'anonymous'.|| ||[wiki:TracDev/PluginDevelopment/ExtensionPoints/trac.web.api.IRequestFilter trac.web.api.IRequestFilter][[br]]([source:trunk/trac/web/api.py#/IRequestFilter source])||Allows plugins to both preprocess and postprocess HTTP requests.|| ||[wiki:TracDev/PluginDevelopment/ExtensionPoints/trac.web.api.IRequestHandler trac.web.api.IRequestHandler][[br]]([source:trunk/trac/web/api.py#/IRequestHandler source])||Allows plugins to process HTTP requests.|| ||[wiki:TracDev/PluginDevelopment/ExtensionPoints/trac.web.api.ITemplateStreamFilter trac.web.api.ITemplateStreamFilter][[br]]([source:trunk/trac/web/api.py#/ITemplateStreamFilter source])||Allows plugins to filter existing [genshi: Genshi] streams prior to that the template will be rendered.|| ||[wiki:TracDev/PluginDevelopment/ExtensionPoints/trac.web.chrome.INavigationContributor trac.web.chrome.INavigationContributor][[br]]([source:trunk/trac/web/chrome.py#/INavigationContributor source])||Allows plugins to extend the navigation menus of the web interface.|| ||[wiki:TracDev/PluginDevelopment/ExtensionPoints/trac.web.chrome.ITemplateProvider trac.web.chrome.ITemplateProvider][[br]]([source:trunk/trac/web/chrome.py#/ITemplateProvider source])||Extension point interface for components that provide their own templates and accompanying static resources.|| ||[wiki:TracDev/PluginDevelopment/ExtensionPoints/trac.wiki.api.IWikiChangeListener trac.wiki.api.IWikiChangeListener][[br]]([source:trunk/trac/wiki/api.py#/IWikiChangeListener source])||Allows plugins to observe creation, modification and renaming (since trac-0.12), and deletion of wiki pages.|| ||[wiki:TracDev/PluginDevelopment/ExtensionPoints/trac.wiki.api.IWikiMacroProvider trac.wiki.api.IWikiMacroProvider][[br]]([source:trunk/trac/wiki/api.py#/IWikiMacroProvider source])||Allows plugins to contribute WikiMacros to Trac.|| ||[wiki:TracDev/PluginDevelopment/ExtensionPoints/trac.wiki.api.IWikiPageManipulator trac.wiki.api.IWikiPageManipulator][[br]]([source:trunk/trac/wiki/api.py#/IWikiPageManipulator source])||Allows plugins to validate wiki pages prior to that they get stored in the database.|| ||[wiki:TracDev/PluginDevelopment/ExtensionPoints/trac.wiki.api.IWikiSyntaxProvider trac.wiki.api.IWikiSyntaxProvider][[br]]([source:trunk/trac/wiki/api.py#/IWikiSyntaxProvider source])||Plugins can extend this extension point to add custom syntax rules to the wiki formatting system. In particular, this allows registration of additional TracLinks types.|| You can view a complete list of the provided and implemented extension points by Trac or plugins installed in your Trac environment using the [th:TracDeveloperPlugin TracDeveloperPlugin].