Fork me on GitHub

Overriding System Plugins  Bottom

  • I understand the performance issues involving searching several paths for the existence of pnRender plugins, but is there any way to override a system (or core) plugin?

    I tried copying function.pnimg.php to config/plugins, but the following bit from pnRender.class.php will never allow it to execute because it's found in the system/pnRender path:

    Code

    // plugin paths are ordered so that we find the vast majority of plugins with as few path
            // searches as possible
            $pluginpaths = array('system/pnRender/plugins',
                                 'system/Theme/plugins',
                                 'config/plugins',
                                 "themes/$theme/templates/modules/$module/plugins",
                                 "themes/$theme/plugins",
                                 "$modpath/" . $this->module[$module]['directory'] ."/pntemplates/plugins");


    Back in the PN days, I had to edit the version in pnRender directly.

    --
    Chris Stevens, CEO
    OpenTaxi Systems LLC
    866.OPENTAXI
    www.opentaxi.com
    On-Demand Air Taxi Reservations Platform, Flight Reservations, Consulting.
  • You're right, there's no way to override it, but if you want to do it, change the order of the paths for your site. Generally speaking to change this in the Core has a big impact looking always on config/plugins...

    --
    - Mateo T. -
    Mis principios... son mis fines
  • I'll probably just port over my mods within function.pnimg and leave the path ordering alone for the remaining plugins. Thanks for the confirmation, though.

    --
    Chris Stevens, CEO
    OpenTaxi Systems LLC
    866.OPENTAXI
    www.opentaxi.com
    On-Demand Air Taxi Reservations Platform, Flight Reservations, Consulting.
  • Just for completeness of this thread, I had planned to use config/images as a common location for images shared among several similar themes along with a modified pnRender/plugins/function.pnimg.php.

    The system won't let the browser access files in that location directly (see config/.htaccess), so I created a common area in the themes directory and will add a custom plugin to config/plugins to give me back the correct path.

    Hope this helps.

    --
    Chris Stevens, CEO
    OpenTaxi Systems LLC
    866.OPENTAXI
    www.opentaxi.com
    On-Demand Air Taxi Reservations Platform, Flight Reservations, Consulting.

This list is based on users active over the last 60 minutes.