how to over-ride a root file in a plugin?


i am part way through integrating some changes that i made to the groups plugin into my theme plugin.. (ajaxing the main groups list).. and one of the files i have changed is in the root of the plugin, rather than in a views folder.. 

i have not found a way to over-ride this file directly in another plugin.. does anyone know how?

e.g. /mod/groups/all.php

i haven't looked at every possibility.. but would perhaps any of these work?:





  • Anyone may correct me if I am wrong, but, in this scenario, all.php is not part of a view and therefore can not be overridden.

    Perhaps this is a feature that should be suggested to be in 1.8/1.9/2.0? The only way to display all users, even those without an icon/avatar, in the custom_index New Members area, is to modify one of the main files in the mod - one that is not in the view.

  • ReWrite rule to goto the "override" script - no magic..

  • @Dhrup ... Elaborate please? Thanks.

  • If U R familiar with Apache's mod_ReWrite stuffs - the answer is already above.

    If not..

    Then it becomes 60% 'rocket science' - will take me 10 - 15 mins to do this myself; 45-60 mins to teach.. etc.

    So... ?

    ? how experienced and comfortable R U with Apache mod_rewrite syntax ?

  • I know what apache mod_rewrite is, but, desite my somewhat extensive PHP experience, I am not very familiar with mod_rewrite. I know it can be quite powerful.

    From what I understand about your above post, are you saying to have people overwrite the original mod's php file, i.e. all.php, with another one?


    If not, then yes, please elaborate.


    If you are trying to say to just use mod_rewrite, then I would have to disagree. Although it is possible to do it that way, it would be much more user/programmer friendly, and much more organized, if it could be extended in the same way that views can be.


    Thanks again,


  • You can certainly do this via mod-rewrite... however I prefer to re-register the page handler for groups with my own page handler for groups. You can then have your new page handler for groups direct requests for pg/groups/all from mod/groups/all.php to mod/yourtheme/myall.php or what ever you want to name it. If you are not familiar with how this works get back to me and I will explain...


Beginning Developers

Beginning Developers

This space is for newcomers, who wish to build a new plugin or to customize an existing one to their liking