Chapter 7. Core Plugins

07-07-26 10:37

This chapter describes in detail the built-in plugins of Seditio CMS included in the official system distribution. You will learn about their purpose, the database table structures they use, features of integration through the system of hooks, as well as SEF URLs and configuration parameters.


7.1. The Role of Core Plugins in the Seditio Ecosystem

Unlike modules (such as page or forums), plugins in Seditio serve to expand functionality and customize layouts without changing the original core source code. Plugins are connected dynamically at the call locations of hooks (for more details on the hook mechanism and manifests, see Chapter 8. Plugin Architecture and Development).

The core automatically manages access rights (ACL), configuration, and localization for plugins (for more details on plugin localization, see Chapter 11. Localization and Internationalization).


7.2. comments (Comments System)

The comments plugin adds comment functionality to pages and forum topics.

  • Database Table (sed_com):
    • com_id (INT, Primary Key) — unique comment ID.
    • com_code (VARCHAR) — unique code of the commented resource (e.g., p123 for page ID 123 or f456 for forum topic ID 456).
    • com_author (VARCHAR) — author name (or guest nickname).
    • com_authorid (INT) — user ID in the sed_users table (0 for guests).
    • com_text (TEXT) — comment text.
    • com_date (INT) — UNIX timestamp of the creation time.
    • com_ip (VARCHAR) — author's IP address.
  • Hooks Used:
    • page.tags — outputs comments and comment form on page details.
    • forums.posts.tags — outputs comments in forum topics.
    • ajax — asynchronous submission and loading of comments list without page reload (invoked at /plug?ajx=comments or index.php?module=plug&ajx=comments).
  • SEF URLs:
    • Comments management in the admin panel: /admin/comments or index.php?module=admin&m=comments.
    • Plugin configuration: /admin/config?n=edit&o=plug&p=comments or index.php?module=admin&m=config&n=edit&o=plug&p=comments.

7.3. ratings (Content Ratings)

The ratings plugin implements a five-star content rating system for pages by site users.

  • Database Tables:
    • sed_ratings — stores cumulative statistics of page ratings:
      • rating_code (VARCHAR, Primary Key) — code of the rated resource (e.g., p123).
      • rating_average (DECIMAL) — average score of the content.
      • rating_repeats (INT) — number of users who voted.
    • sed_rated — log of votes to prevent duplicate voting:
      • rated_code (VARCHAR) — resource code.
      • rated_userid (INT) — ID of the voter.
      • rated_value (INT) — score value (from 1 to 5).
      • rated_ip (VARCHAR) — voter's IP address (used to limit guest flooding).
  • Hooks Used:
    • page.tags — renders rating widget and stars in page templates.
    • ajax — asynchronous vote logging (invoked at /plug?ajx=ratings or index.php?module=plug&ajx=ratings).

7.4. tags (Tags Cloud)

The tags plugin organizes keywords (tags) for classifying pages and forum topics.

  • Database Table (sed_tags):
    • tag_id (INT, Primary Key) — record ID.
    • tag_code (VARCHAR) — code of the associated object (e.g., p123).
    • tag_text (VARCHAR) — tag text in lowercase (indexed for fast searching).
  • Operation Logic:
    • When saving a page, the plugin parses the tag input field, splits the string by a comma separator, and updates the sed_tags table.
    • The tags cloud is generated by calculating the logarithmic weight of each tag's popularity and is output via the global {PHP.out.tags_cloud} tag.
  • SEF URLs:
    • List of materials by a specific tag: /tags/tag_name or index.php?module=tags&t=tag_name.

7.5. recentitems (Recent Items)

The recentitems plugin generates lists of the latest pages and forum topics for display on the homepage or in widgets.

  • Configuration Details:
    • The plugin configuration defines the limit of output elements, the time interval of relevance, and a list of page categories to exclude from display.
  • Hooks Used:
    • index.tags — integrates lists into the homepage template index.tpl.
  • SEF URLs:
    • Widget configuration: /admin/config?n=edit&o=plug&p=recentitems or index.php?module=admin&m=config&n=edit&o=plug&p=recentitems.

7.6. search (Full-text Search)

The search plugin provides a form and logic for full-text search across pages and forums.

  • Search Features:
    • Searching pages checks page_title, page_text, page_desc, as well as custom extrapoles (CCK) values.
    • Searching forums analyzes topic titles (ft_title) and post texts (fp_text).
    • Results are output paginated with search terms highlighted.
  • SEF URLs:
    • Search page and results output: /search or index.php?module=search.

7.7. trashcan (Recycle Bin)

The trashcan plugin provides temporary storage for deleted pages, comments, and forum posts for quick recovery.

  • Database Table (sed_trash):
    • tr_id (INT, Primary Key) — ID of the record in the trashcan.
    • tr_type (VARCHAR) — object type (page, comment, forum_topic, forum_post).
    • tr_title (VARCHAR) — object title at the time of deletion.
    • tr_info (TEXT) — metadata (deletion author ID, operation date).
    • tr_datas (LONGTEXT) — serialized array of object data retrieved from the DB prior to physical deletion.
  • SEF URLs:
    • Trashcan viewing and data recovery in the admin area: /admin/trashcan or index.php?module=admin&m=trashcan.

7.8. sedcaptcha (Captcha Protection)

The sedcaptcha plugin generates graphical verification codes to protect forms from automatic spam and parsing.

  • Operation Logic:
    • Generates a random sequence of characters and numbers, saving its hash in the user session.
    • Uses built-in PHP GD extension functions to render the image with noise (dots, lines) and font distortion.
    • Prior to form submission, matches the sent value against the one saved in the session.
  • SEF URLs:
    • Image generation link: /plug?r=sedcaptcha or index.php?module=plug&r=sedcaptcha.

7.9. ckeditor (Visual WYSIWYG Editor)

The ckeditor plugin integrates the CKEditor visual editor into text form areas.

  • Integration with PFS (Personal File System):
    • The plugin connects JS drivers to integrate with the PFS uploader. Clicking the «Insert image» icon opens the PFS window, allowing you to upload a file and insert it into the page text in a single click (for details on PFS, see Chapter 12. Personal File System (PFS) and Media Processing).
  • Toolbar Customization:
    • The editor toolbar is configured in the plugins/ckeditor/ckeditor.config.js file depending on the user group (minimal toolbar for regular users on forums, advanced toolbar for administrators).

7.10. jevix (User Content Typographical Filter)

The jevix plugin performs deep HTML filtering and automatic typography on texts submitted by users.

  • Main Features:
    • Parses text and cleanses it of unwanted tags, XSS injections, and malicious JS scripts.
    • Automatically replaces hyphens with dashes, corrects quotes, and inserts non-breaking spaces after prepositions.
    • Configures allowed HTML tags and their attributes separately for pages and comments.
  • Hooks Used:
    • page.add.parse — processes text when saving a page.
    • comments.new.parse — processes text before writing a comment to the DB.

7.11. news (News Feeds)

The news plugin is designed to organize the news feed structure on the homepage or in subsections.

  • Operation Logic:
    • Extracts page publications from page categories specified in the configuration.
    • Generates news TPL tags supporting pagination and outputs them to the index.tpl template.
  • SEF URLs:
    • Main page with news pagination: /news/news-list?d=page or index.php?d=page.

7.12. rss (Export to XML RSS 2.0)

The rss plugin exports page content and forum topics into standard XML RSS 2.0 format for external aggregators.

  • Export Features:
    • Exports latest pages from selected categories preserving HTML layout (or as plain text depending on configuration).
    • Exports latest forum topics.
  • SEF URLs:
    • RSS page feed: /rss or index.php?module=rss.
    • RSS feed of a selected category: /rss/news or index.php?module=rss&c=news.
    • RSS forum feed: /rss/forums or index.php?module=rss&m=forums.

7.13. contact (Feedback Form)

The contact plugin outputs a feedback page allowing visitors to send messages.

  • Features:
    • Field verification, captcha protection (sedcaptcha).
    • Sends messages to email addresses of administrators specified in settings.
    • Records correspondence history in the database.
  • SEF URLs:
    • Contact page: /contact or index.php?module=contact.

7.14. smtp (Mail Sending via SMTP)

The smtp plugin replaces the standard mail sending PHP function mail() with sending via a secure external SMTP server.

  • Operation Features:
    • Integrates the PHPMailer library into the CMS core.
    • Authorization settings (SMTP Auth, login, password), encryption (SSL/TLS), and port are defined in the plugin configuration panel.
    • Helps bypass hosting email limit restrictions and reduces the risk of emails landing in spam.

7.15. sitemap (XML Sitemap)

The sitemap plugin automatically generates a dynamic sitemap.xml file for search engine indexation.

  • Operation Logic:
    • Scans category structure, active pages list, and forum sections.
    • Compiles XML structure incorporating priority (priority) and last modified dates (lastmod).
  • SEF URLs:
    • Link to sitemap: /sitemap.xml or index.php?module=sitemap.

7.16. similarpages (Similar Pages)

The similarpages plugin selects and outputs a list of similar pages to improve internal linking.

  • Selection Principles:
    • Locating similar materials is performed based on tag matching (tags) or finding pages in the same category.
    • Results output is cached to minimize database load.
  • Hooks Used:
    • page.tags — embeds the similar pages widget into the page.tpl template.

7.17. thanks (Thanks System)

The thanks plugin allows users to thank authors for useful forum posts or page publications.

  • Database Table (sed_thanks):
    • th_id (INT, Primary Key) — thanks record ID.
    • th_touser (INT) — ID of the thanked user.
    • th_fromuser (INT) — ID of the thanking user.
    • th_date (INT) — UNIX timestamp of the event.
    • th_item (INT) — ID of the forum post (or page).
  • Hooks Used:
    • forums.posts.tags — outputs the «Thanks» button and list of thanking users below the message.
    • ajax — asynchronous thanks submission (invoked at /plug?ajx=thanks or index.php?module=plug&ajx=thanks).

7.18. uploader (Asynchronous File Uploader)

The uploader plugin extends the Personal File System (PFS) with asynchronous file uploading via Drag & Drop.

  • Features:
    • Realized based on AJAX file uploads, integrated with core Upload API (for details on asynchronous upload, see Chapter 12. Personal File System (PFS) and Media Processing).
    • Displays upload progress bars and automatically generates image previews.
  • Hooks Used:
    • pfs.tags — outputs Drag & Drop widget in the PFS manager window.

7.19. whosonline (Activity Monitor «Who's Online»)

The whosonline plugin records and displays lists of users and guests currently browsing the site.

  • Database Table (sed_online):
    • online_ip (VARCHAR) — visitor's IP address.
    • online_user (VARCHAR) — username (or «Guest»).
    • online_userid (INT) — user ID (0 for guests).
    • online_lastactive (INT) — UNIX timestamp of the last activity.
    • online_location (VARCHAR) — current site section (determined by GET URL parameters).
    • online_sublocation (VARCHAR) — additional location info (e.g., forum topic title).
  • SEF URLs:
    • Online users list page: /plug/whosonline or index.php?module=plug&e=whosonline.

7.20. skineditor (Skin Editor in the Control Panel)

The skineditor plugin provides administrators with a tool to view and edit skin template files directly from the control panel.

  • Features:
    • Displays files of the active skin in the skins/ directory.
    • Edits HTML markup of templates (.tpl), stylesheets (.css), and JS scripts with syntax highlighting.
    • Automatically creates backups of edited files before saving.
  • SEF URLs:
    • Editor panel: /admin/skineditor or index.php?module=admin&m=skineditor.

7.21. cleaner (Automatic DB Cleanup)

The cleaner plugin performs routine database cleanup in the background.

  • Operation Features:
    • Runs on the common.main hook with a probability specified in the configuration (e.g., 1 run per 100 page views).
    • Deletes expired guest sessions from the sed_online table.
    • Clears old sed_log records older than the configured age.
    • Cleans temporary cache files in the datas/cache/ directory.

7.22. Other Built-in Plugins

  • adminqv (Quick View) — displays widgets of general site statistics, latest logs, and quick configuration options on the homepage of the control panel.
  • letteravatar (Letter Avatars) — automatically generates avatars with the first letter of the username for registered members who have not uploaded a custom avatar.
  • massmovetopics (Mass Move Topics) — provides forum moderators with a tool for batch moving topics from one forum category to another in a single click.
  • otherpages (Other Pages) — forms a list of random or most viewed pages from selected categories for sidebar widgets.
  • passrecover (Access Recovery) — processes password recovery requests, sending a one-time validation key to the linked email.
  • robots (robots.txt Editor) — allows dynamically modifying robots.txt contents directly from the plugin configuration panel in the admin area.
  • slider (Image Slider) — displays an adaptive slider on the homepage based on media files uploaded to PFS.
  • statistics (Site Statistics) — gathers and outputs detailed general statistics of the CMS (total count of pages, forum topics, posts, comments, users, and uploaded file sizes).
  • syntaxhighlight (Syntax Highlighting) — connects JavaScript libraries to highlight code inside [code] BB-code tags in page and forum posts.
  • syscheck (System Diagnostics) — outputs a report on the server meeting Seditio system requirements (PHP, DBMS versions, extensions, directory write permissions).
  • ipsearch (IP Search) — admin panel tool that quickly locates geographic and ISP details for a given user IP address using external API services.

Ratings:
(0.00)

No comments yet