Modular Extensions - Version 4.3 - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22) +--- Thread: Modular Extensions - Version 4.3 (/showthread.php?tid=6550) |
Modular Extensions - Version 4.3 - El Forum - 07-11-2008 [eluser]sophistry[/eluser] wow! that's all it was? i looked at the load_class() function and it seemed to have some logic to stop re-loading classes that had already been loaded. i guess there was something else going on. so, in case you were wondering... i made the patches and i now have a working ME system in place! running on PHP4. i feel like a kid on christmas eve making plans for all the new toys. ;-) hmnnn... which module shall i build out first? which of them is the best candidate for testing nesting capabilities? how can i restructure an existing app to break off some pieces into a module? ah... the possibilities. i'll try to make some wiki changes as i go along learning this thing so that others may benefit in my wake. thanks for all your work on this cool tool wiredesignz, i'll let you know how it goes. Modular Extensions - Version 4.3 - El Forum - 07-11-2008 [eluser]wiredesignz[/eluser] You're welcome sophistry and thanks for your input, you make the community a better place by contributing too. Cheers Modular Extensions - Version 4.3 - El Forum - 07-12-2008 [eluser]Chicken's Egg[/eluser] May be I'm going to ask a very silly question - in that case forgive me being a newbie - but how do you separate front- and back-end (admin-section) using modules? Background of this question: I am thinking of a website where pages and content get separated. So when calling for www.mydomain/page/ I would like to route this url to my default controller. This controller looks in a database which modules are used to create the content of this page, calls the controllers of those modules to receive the content, puts it together and finally displays the page as requested. I think this can be done with Modular Extensions. But, this is a description of the frond-end of the application. And before that can ever work, I must have a way to create the content-blocks and pages first. And that's where I'm stuck. I searched this forum and the wiki and have read a lot of good things about this project. But unfortunately I didn't find the answer. [edit] I finally found a post I can use, all-though this solution means that I have to write two separate applications. I would rather use one application. PS Would it be a good idea to create hyperlinks from the wiki-page to some of this forum threats. I'm thinking on a list like Edemilson Lima posted. [/edit] Modular Extensions - Version 4.3 - El Forum - 07-12-2008 [eluser]Chicken's Egg[/eluser] Is the wiki information about loading a language file correct? I get an error when I use the example: "Fatal error: Call to undefined method Modules::find() in C:\server\web\CI\edward\backend\libraries\Controller.php on line 240". I downloaded version 4.2.03 (2008-07-04) from the Wiki-page today. I have got one module called welcome. It has got one controller Code: <?php For those who wonder what the base_controller file looks like: Code: <?php Modular Extensions - Version 4.3 - El Forum - 07-12-2008 [eluser]wiredesignz[/eluser] Thanks Chicken's Egg, you discovered a typo/bug in 4.2.03 language loader Modular Extensions version 4.2.04 (bugfix) is available on the wiki now. Modular Extensions - Version 4.3 - El Forum - 07-13-2008 [eluser]Chicken's Egg[/eluser] [quote author="wiredesignz" date="1215924636"]Thanks Chicken's Egg, you discovered a typo/bug in 4.2.03 language loader [/quote] I'm glad I could help, allthough I found it by accident. You are amazing fast with the bugfixes wiredesignz. Thank you so much! Modular Extensions - Version 4.3 - El Forum - 07-13-2008 [eluser]Chicken's Egg[/eluser] I got an other fatal error. Code: Fatal error: Call to undefined method Modules::method() in C:\server\web\CI\edward\backend\helpers\modules_helper.php on line 210 To reproduce this error: - Create a module called modules. - Add the following line in your view-file. Code: <?php I thought this would call the function module_list of the module modules. But it doesn't. And if I change the name of my module to 'test' it gives me an other error: "Fatal error: Cannot redeclare class Base_controller in C:\server\web\CI\edward\backend\controllers\base_controller.php on line 64". Line 64 is nearly the last line of the class base_controller. It only contains a }-character. Line 65 contains "?>". It's obvious that I still have a long way to go, before I can write any modular application. Used code Controller - Base_controller: Code: <?php Controller - home: Code: <?php Controller - test Code: <?php Removing 'extends base_controller' from the test-controller won't make the error to disappear. Modular Extensions - Version 4.3 - El Forum - 07-13-2008 [eluser]wiredesignz[/eluser] Ok, Modules is a reserved word in ME, the Modules class is inside modules_helper.php begining at line 191, so you cannot define your own Modules class also. You are also getting “Fatal error: Cannot redeclare class Base_controller" error because you are attempting to include your Base_controller in each controller class. try using require_once instead. Modular Extensions - Version 4.3 - El Forum - 07-13-2008 [eluser]Chicken's Egg[/eluser] [quote author="wiredesignz" date="1215956000"]Ok, Modules is a reserved word in ME[/quote] If you don't mind I will add that to the wiki aswell. [quote author="wiredesignz" date="1215956000"]You are also getting “Fatal error: Cannot redeclare class Base_controller" error because you are attempting to include your Base_controller in each controller class. try using require_once instead.[/quote] That did the trick, I should have though of that myself. Shame on me. If you like I can create a new page on the wiki concerning this kind of problems for starters though. Modular Extensions - Version 4.3 - El Forum - 07-13-2008 [eluser]wiredesignz[/eluser] Yes please, anything relevant to Modular Extensions can be added to the wiki. |