Modular Extension with Spark
September 4, 2011 | In: CI, CodeIgniter, MX, Modular Extension, spark
Last time we made our CodeIgniter “sparked” and it went all good. But now when we need to use the Modular Extension, we encounter a bug, but don’t worry, we have a fix for that.
Open the file MY_loader.php for MX and you will see something like this below:
class MY_Loader extends MX_Loader {}
The fix:
Copy the entire content of the file MY_Loader.php from spark into MY_Loader.php of MX.
And that’s it!
Share on Facebook

4 Responses to Modular Extension with Spark
Olli
September 13th, 2011 at 3:43 pm
Sorry, but what do you mean by saying “Copy the entire content of the file MY_Loader.php from spark”… where is the spark “MY_loader.php” located? i can’t find it…
zeratool
September 14th, 2011 at 11:10 am
Hi Olli,
Thanks for the comment, you can get that spark’s MY_Loader content from here :
– http://getsparks.org/static/install/MY_Loader.php.txt
and you will put that under $app/core/MY_Loader.php
HTH
zeratool
September 14th, 2011 at 11:20 am
Hi Oli,
Also because when you install MX, it has its own MY_Loader.php with these content:
require APPPATH.”third_party/MX/Loader.php”;
class MY_Loader extends MX_Loader {}
You will copy the content of spark’s MY_Loader as the body of the class like this:
require APPPATH.”third_party/MX/Loader.php”;
class MY_Loader extends MX_Loader {
// content from spark here
}
zeratool
April 21st, 2012 at 4:57 pm
Oli,
$CI/application/core/MY_Loader.php
– you will create this new file.