Override lib directory of one plugin in my plugin

Hi everyone.

I'm Newbie in elgg. I need your help.

I must override an existing file that located in lib directory of plugin in my plugin. I've learned how can I override css or view file in my plugin but nowhere talks about overriding lib dirctory of one plugin.

for example I installed pluginA into my project and I wanna override the lib directory of this plugin in my plugin.

Plz help me !!!!

  • You cant override the files located inside lib folder. If you are looking to replace the page handlers then use elgg_unregister_page_handler() and then register new pagehandler for the corresponding paths with elgg_register_page_handler()

    PS : Avoid duplicate threads.

  • You dont override a library, just dont load it. There will be calls to elgg_register_library() and elgg_load_library() in the plugin. Just comment them out. The plugin probably wont work then so follow that procedure to register and load your new library.


  • Thank you Team Webgalli and Mark.

  • also, if the library is registered using elgg_register_library() you can simply call elgg_register_library with the same identifier and point it to your new file.  Then whenever elgg_load_library is called it will be your library that's loaded instead.

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