Forums | Mahara Community
Developers
/
Export: rename folder
28 June 2019, 3:01
I'm trying to modify the export plugin for special needs.
I would like to know if it is possible to rename the folder export in the theme.
Thank you!!!
28 June 2019, 11:27
Hi
Currently there is no way to load custom version of html export for plugin
However, in htdocs/export/html/lib.php around line 143 looks to be where it fetches all the plugin export/html/lib.php files
You could alter things there to fetch the newexport/html/lib.php for a particular plugin
But what would be nicer is if you placed the newexport/html/lib.php into a htdocs/local/export/html/ directory as something like plugintype.lib.php and check for that file and use that one, if it exists, instead of the original
so before line 143 have something like
if ( -- some check for the local file -- && safe_require(-- the local file --)) {
... load the local version in a similar way to current code ...
}
else if (safe_require('export', 'html/' . $plugin, 'lib.php', 'require_once', true)) {
... curent code ...
}
Hope that helps
Cheers
Robert
01 July 2019, 19:53
Hello Robert,
Thanks for your answer..!
I'll try this and I'll keep you updated