Article suggestions
  1. Home
  2. Section: Developer Hub
  3. Training - Add an Admin Menu Link to Your Custom Plugin

Training - Add an Admin Menu Link to Your Custom Plugin

Training - Add an Admin Menu Link to Your Custom Plugin
  • avatar
Written by Chan Nier
Updated on February 19, 2025

 Link: https://support.brilliantdirectories.com/support/solutions/articles/12000024699

Database Structure

  • Description
    • This table inludes all the link records to access installed plugins in the website’s admin through the go.php link structure
  • Storage Engine
    • InnoDB
  • Collation
    • utf8_unicode_ci
  • Table Name
    • plugin_records
  • Columns
    • plugin_record_id (PRIMARY)
    • active
      • 0 or 1 for active or inactive. Inactive records will not be taken into account for display
    • variable_name (UNIQUE)
    • nick_name
      • Name that will be shown to the admin
    • link_url
      • Url to access. EG: /admin/go.php?widget=XXXXXXXXXXX

 

How to Create / Add a Plugin to the "Plugins" Menu Item in the Admin Area

  • Login to the website's directory database
  • If the `plugin_records` table does not exist, run the following SQL to create the plugin_records table:
    CREATE TABLE IF NOT EXISTS `plugin_records` (
          `plugin_record_id` bigint(20) NOT NULL AUTO_INCREMENT,
          `active` tinyint(1) NOT NULL,
          `variable_name` varchar(80) COLLATE utf8_unicode_ci NOT NULL,
          `nick_name` varchar(80) COLLATE utf8_unicode_ci NOT NULL,
          `link_url` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
          PRIMARY KEY (`plugin_record_id`),
          UNIQUE KEY `variable_name` (`variable_name`)
        ) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='This table has all the link records to access widgets with the go.php file' AUTO_INCREMENT=1;
    SQL
  • Insert the information for your plugin link as required following the column structure indicated above

The link_url value is a complete link instead of the widget name because some special cases may require sending GET parameters from the start. If you want to add a new record on the database you need to do it manually, there is not an UI to add records to this new table.


Thank you for leaving a rating!
Did you find this article helpful?
0 out of 0 people found this article helpful so far
Can't find what you're looking for? Get in touch
How can we help?
Send your question below and we'll get back to you as soon as possible.
Cancel
translation missing: en.kb.default.contact_form_error
×
Thanks for your message!
Thanks for your message!
×