Welcome Guest, Not a member yet? Register   Sign In
using ci to route domain.com/variable_here ?
#11

[eluser]BRK Network[/eluser]
Hi,

One similar, and one different approach was discussed earlier:

Similar config/routes.php approach:
http://ellislab.com/forums/viewthread/129407/

Different MY_Router.php approach:
http://ellislab.com/forums/viewthread/113165/P30/

However, I've a quick question for the second - MY_Router.php - approach:

When I create a MY_Router.php file at application/libraries folder, nothing happens. My extended Router library has no effect.

Do I need to call or load MY_Router.php manually? Or hook it to somewhere?

Because when I hack the core Router.php file's (Class: CI_Router) "_validate_request" function, everything is working smoothly. However, when I extend id through MY_Router.php nothing happens.

I'm using latest CI2 source from bitbucket. Any ideas?

Thanks...
#12

[eluser]pickupman[/eluser]
@BRK Network
In CI2 when extending a core library, the file needs to go in /application/core/.
#13

[eluser]BRK Network[/eluser]
[quote author="pickupman" date="1280106551"]@BRK Network
In CI2 when extending a core library, the file needs to go in /application/core/.[/quote]

Hi pickupman, thanks a lot! Smile

I guess the User Guide needs to be updated:
general/creating_libraries.html
- Replacing Native Libraries with Your Versions
- Extending Native Libraries

Although the CI2's User Guide reflects most of the changes, this one is missing/misleading.

Thanks again! Smile
#14

[eluser]pickupman[/eluser]
It's in a new section now based on the new structure.
user_guide/general/core_classes.html

Same goes for packages. The references seem hidden but are there
user_guide/libraries/loader.html

Glad, you got figured out.




Theme © iAndrew 2016 - Forum software by © MyBB