How to create simple plugin / Plugins in active mode / Forums

  • I was asked how to insert this:

    to e107 head. The best option is create plugin for this.

    This is example how quickly it can be done when you know how e107 works.  What is time consuming is finalizing plugin for release.

    So steps are: 

    A. Preparing

    1. go to your [e107_]plugins folder
    2. create empty folder with desired name f.e. jm_cbox (use unique name)

    Tip: copy there some filled plugin.xml file from other plugin (f.e. _blank plugin), otherwise you will need fill all fields manually

    Jm Cbox 01

    B. Generating

    1. Go to Plugin Manager / Plugin Builder

    Select your folder and click go

    Jm Cbox 02

    Note: if it's missing, it's because admin_config.php file is available. If you need to regenerate plugin, just rename old admin_config.php to something else

    3. Skip sql files, we have no database tables

    4. Fill data for plugin.xml

    (I don't know what is purpose of most of fields, I just fill them with something to go futher.)

    Note: if you let empty second field LAN, your plugin will not be displayed in plugin list. You need put there something with LAN_ alhough you have no language files. Don't forget to change this in generated xml file later.

    Jm Cbox 03

    5. Click on second tab Preferencies

    - fill at least one preferencie.
    I can image more prefs for this, but because I am trying to have simple and quick solution, one for code will be enough.

    Jm Cbox 04

    6. Addons

    Note: I often generate more files that is needed, you can easy deleted them later

    jm_cbox_menu - Menu item for use in the menu manager.
    e_header - if you need to insert css and js into header
    e_shortcode - Add a global shortcode which can be used site-wide. (use sparingly) , not sure if I use menu or shorcode

    7. Click on Generate

    If you see message that jm_cbox_ui $pluginName: is not valid. (jm_cbox) , it's plugin is not installed.

    C. Installation

    After installation configuration should work. Admin now fully works too.  Yes, it will need to improve titles, help field etc, but for now it's enough Just insert your iframe code to pref field and save it.

    Jm Cbox 05

    D. Frontend

    Now fun starts.


  • Frontend

    Ok, this is about personal preferencies, each plugin developer can do this different way. This applies for my plugins.

    WARNING:  I am used to PSPad, now I am trying different editor. 2 days or so... 



  • jm_cbox_menu.php

    At first check if your menu works,  add it to some menu area and you should see title jm_cbox and message Hello world.

    If you don't see it, resolve it at first.

    1. add to menu shorcode for code from preferencies.  (e_shortcode can be used everywhere, there is local alternative too)

    2. check if content of your shortcode is displayed (message Hello world from shortcodes)


    Jm Cbox 06

    3. finalize content of shortcode


    Jm Cbox 07

    4. finalize content of menu.

    Sorry, I somehow messed recording. But you can get idea from code.


    Jm Cbox 08

    Jm Cbox 09

    To create this took 20 minutes, to create this post 2 hours, to finish this plugin it could be take 2 days. 

    So learn and do it yourself.

    Source code to this point:


Moderator(s): Jimako
Search just forum
You must be logged in to post comments on this site - please either log in from the Login box or from here.

  • Jimako
    Jimako  1 week ago

    New version of metatag plugin is tested now here... some messages can be see from time to time :)

  • Jimako
    Jimako  2 weeks ago

    There is new theme mdbootstrap in my github repository for anybody who want to learn new way how to build e107 theme. It's built with focusing on step by step. Anybody who have interest, just let know about you and start ask questions while I am on the beginning.

  • Jimako
    Jimako  2 weeks ago

    For download something, you need to subscribe class Real e107 user in your profile. (if you didn't get message on homepage)

  • Jimako
    Jimako  1 month ago

    @Moc I changed settings to PM available for class Real e107 user (class able to download free things) and I added you this class. And created issue because I have no idea how this should work.

  • Jimako
    Jimako  1 month ago

    @Moc Could be possible that Mention plugin stopped to work? No mail notification. Sorry.