• Warning. This is only my way.  In fact, I am used with plugin to use local (batch) and global (e_shortcodes) together, so this can be simplified by using just one of them.

    Real example:

    Plugin name:  pnews

    Local shortcodes in shortcodes/batch folder

    File name:  pnews_shortcodes.php

    Class name and definition:

    class plugin_pnews_pnews_shortcodes extends news_shortcodes {}  

    Global e_shortcodes:

    class pnews_shortcodes extends plugin_pnews_pnews_shortcodes {}

    You can override existing shortcodes or add new ones. Plugin global ones you can override via theme shortcodes.


    $sc = e107::getScBatch('pnews');


    $sc->setVars($row);  $sc->setScVar('news_item', $row);

    It really works. I can use in plugin template core news shortcodes, customized core news shortcodes, my local shortcodes and my global shortcodes.

    Awesome.  I was just looking at result and I couldn't believe. 


Username or Email:


Missing Code

[ ]
[ ]
[ ]
Forum Statistics
Total posts:  17
Topics:  15
Forum replies:  2
Forum thread views:  5073
Average posts per day:  0
  • Guests: 3
  • Members: 0
  • Members: 20
  • Newest Member: petra
  • Most ever online: 38
    Guests: 38 Members: 0 on Wednesday 03 August 2016 - 01:21:08