Welcome Guest, Not a member yet? Register   Sign In
[Plugin] CodeIgniterPhp5 (Autoloader, Modularity, Fast Coding)
#11

[eluser]Dewos[/eluser]
Version 1.6 Changelog:
* Check Control for Modularity Class (Configs, Langs, Helpers). Now faster
* Fix Libraries and Models Alias CI Support
* Added (facoltative) Extended Syntax
* Better Docs
#12

[eluser]Dewos[/eluser]
Version 1.7 Changelog:
* Added Support for Load Sub-directory Models and Library
* Added Plugins Modularity
* Fix Check for Plugins


Added a Demo Controller
#13

[eluser]Tottys Design[/eluser]
[quote author="Dewos" date="1257756019"]Advantages:
* Get Everything Everywhere: No more get_instance() for use CI inside model, library, helper, or view
* Lazy-load support: No more $this->load->something(). Resources automatically loads (only first time, only if needed)
* 100% Back\Forward CI Compatibility: All the logic work delegated to standard CI Core
* More concise syntax: Faster code typing style, better read style that make more sense. Bye bye $this->
* Non-obtrusive: If you wish, you can switch syntax modes, or even use them both. No refactor needed for "pre-plugin" code
* No core hacking is required: Simply download and load it just like any other plugin

* Download: http://ellislab.com/forums/viewthread/134786/[/quote]

How can I load a model in MY_Router?
Thanks
#14

[eluser]Dewos[/eluser]
[quote author="Tottys Design" date="1258484224"]
How can I load a model in MY_Router?
Thanks[/quote]

Hi Tottys. Codeigniter runs Router (and MY_Router) before Load->Plugins. So you can't load a model in MY_Router without Core Hacking.
#15

[eluser]Tottys Design[/eluser]
[quote author="Dewos" date="1258489172"][quote author="Tottys Design" date="1258484224"]
How can I load a model in MY_Router?
Thanks[/quote]

Hi Tottys. Codeigniter runs Router (and MY_Router) before Load->Plugins. So you can't load a model in MY_Router without Core Hacking. Sorry Smile[/quote]


Thanks. I was looking for a way to load models in the router, but i really can't do it. I know models are loaded after the router...
#16

[eluser]Dewos[/eluser]
[quote author="Tottys Design" date="1258497925"]
Thanks. I was looking for a way to load models in the router, but i really can't do it. I know models are loaded after the router...[/quote]

By the way, load models in Router is a very very ugly pratice. Can't you re-think the code? Are you sure?
#17

[eluser]Tottys Design[/eluser]
[quote author="Dewos" date="1258500142"][quote author="Tottys Design" date="1258497925"]
Thanks. I was looking for a way to load models in the router, but i really can't do it. I know models are loaded after the router...[/quote]

By the way, load models in Router is a very very ugly pratice. Can't you re-think the code? Are you sure?[/quote]

Here is the problem.
I'm doing a mulltilanguage website and the request can be like this:

en/user/register
pt/usuario/registrar

but both calls the user controller. Another problem is that The user/register, are set up in the database, so the router looks in the database if the "ususario" exists, if yes, check if "registrar" exists, then converts both names to the controller name, and should load the controller user in both cases, without to manually add items to the router config.
#18

[eluser]Dewos[/eluser]
[quote author="Tottys Design" date="1258500542"]bla bla bla[/quote]

"pre_controller" hook is the answer
#19

[eluser]Tottys Design[/eluser]
[quote author="Dewos" date="1258500906"][quote author="Tottys Design" date="1258500542"]bla bla bla[/quote]

"pre_controller" hook is the answer[/quote]

Can you give me just a little example? -I don't understant very well how to set them up doing this dynamic routing in the user guide...
#20

[eluser]Dewos[/eluser]
[quote author="Tottys Design" date="1258501270"][quote author="Dewos" date="1258500906"][quote author="Tottys Design" date="1258500542"]bla bla bla[/quote]

"pre_controller" hook is the answer[/quote]

Can you give me just a little example? -I don't understant very well how to set them up doing this dynamic routing in the user guide...[/quote]

Forget Routing and go to see http://ellislab.com/codeigniter/user-gui...hooks.html.
This is Off Topic, so please open a new thread if you like. Good Luck.




Theme © iAndrew 2016 - Forum software by © MyBB