Help Center
Find answers or browse our knowledge base.
Latest Questions
FIles structure of an addon
ScriptsTribe Plugin System – File Documentation
This documentation explains the purpose of each file and folder in the plugin system structure. Use it as a reference when building or maintaining add-ons.
1. Core Module Files (modules/addonid/)
- index.php – The main entry page of the addon. Loads logic for frontend routes.
- any_other_page.php – Example of additional public pages the addon may include.
- init.php – Global initializer; runs on every request when addon is active.
- user.init.php – Runs only for logged-in users, typically to assign variables or blocks in user dashboard.
- profile.init.php – Hook for profile pages (injects blocks, tabs, etc.).
- event.init.php / events.init.php – Hooks into single event page or event listings.
- page.init.php / pages.init.php – Hooks into single page or page listings.
- group.init.php / groups.init.php – Hooks into single group or group listings.
- blog.init.php / blogs.init.php – Hooks into single blog post or blog listings.
- market.init.php – Hooks for marketplace pages.
- forums.init.php – Hooks for forums pages.
- jobs.init.php – Hooks for jobs pages.
- db.sql – Database schema for fresh install.
- update.sql – Database upgrade script for version updates.
- droptable.sql – Tables to drop when uninstalling.
- install.php – Installs DB schema (calls db.sql).
- uninstall.php – Removes DB schema (calls droptable.sql).
- update.php – Executes update.sql when plugin is upgraded.
- plugin.php – Plugin metadata (id, label, description, author, etc.).
- version.json – Version data and changelog info.
- verify.php – License verification handler.
- .htaccess – Rewrite rules if addon has its own pages.
- admin.php – Admin area of addon (automatically injected into global admin).
- user_settings.php – Frontend user settings page for the addon.
- page_settings.php, event.settings.php, group.settings.php – Settings tabs for those entities.
- db_changes.php – Custom DB change script (beyond install/update.sql).
2. Hooks (modules/addonid/hooks/)
- user_settings_tab.php – Adds a tab in user settings.
- event_tab.php – Adds a tab on event pages.
- event_settings_tab.php – Adds tab in event settings.
- group_tab.php – Adds tab on group pages.
- group_settings_tab.php – Adds tab in group settings.
- page_tab.php – Adds tab on page profiles.
- page_settings_tab.php – Adds tab in page settings.
- profile_tab.php – Adds extra tab on user profile.
- post_to_feed.php – Hook for adding posts or content directly into the newsfeed.
3. Assets (modules/addonid/assets/)
- img/preview.png – Addon preview image for admin listing.
- js/addonid.js – Custom JavaScript for the addon.
- css/addonid.css – Custom styles for the addon.
4. AJAX (modules/addonid/ajax/)
- anything_ajax.php – Handles AJAX requests for the addon (e.g., form submissions, live actions).
5. Theme Templates (content/themes/{$theme}/templates/addonid/)
- index.tpl – Main frontend template for addon’s index.php.
- any_other_page.tpl – Template for additional pages.
Sidebars (content/themes/{$theme}/templates/addonid/sidebars/)
Used to insert blocks in specific places:
- home_right_top.tpl, home_right_bottom.tpl, home_content.tpl
- profile_left_top.tpl, profile_left_bottom.tpl, profile_content.tpl
- forums_right_top.tpl, forums_left_bottom.tpl, forums_content.tpl
Menus (content/themes/{$theme}/templates/addonid/menus/)
- main_menu.tpl, user_menu.tpl, admin_menu.tpl
- footer_menu.tpl, mobile_bottom_menu.tpl, top_notification_menu.tpl
Tabs (content/themes/{$theme}/templates/addonid/tabs/)
- User settings: user_settings_tab_link.tpl, user_settings_tab_content.tpl
- Profile: profile_tab_link.tpl, profile_tab_content.tpl
- Event: event_tab_link.tpl, event_tab_content.tpl
- Event settings: event_settings_tab_link.tpl, event_settings_tab_content.tpl
- Group: group_tab_link.tpl, group_tab_content.tpl
- Group settings: group_settings_tab_link.tpl, group_settings_tab_content.tpl
- Page: page_tab_link.tpl, page_tab_content.tpl
- Page settings: page_settings_tab_link.tpl, page_settings_tab_content.tpl
6. Summary
Each addon is self-contained inside modules/addonid/
. Hooks connect your addon into Sngine pages, assets extend functionality, and templates define frontend output. This modular approach ensures flexibility and maintainability across all addons.
Was this answer helpful?
You must login to vote.
0 found this helpful,
0 did not
How could it be better?
What went wrong?
Thank you for your feedback!