Welcome Guest, Not a member yet? Register   Sign In
Matchbox RC2

[eluser]zdknudsen[/eluser]
You wouldn't need a routing hack for that. Just make an /admin subfolder in the modules controller directory.

[eluser]vlad22[/eluser]
well that is correct, however I cant specify default controller, e.g. when I point to site.com/admin/ there's a 404 message (i have created modules->core->controllers->main which loads main view from modules->core->views->main) so basically i want to be able to specify that the default controller to call should be main.....


or I missed somethin ? Smile

edit: oh dear, i truly am a dumb f.ck, must be the joint i've smoked this mornin Big Grin

[eluser]medium_kreation[/eluser]
how to load a model of a module in a controller.

/modules/user/controller/user.php
/modules/user/models/user_model.php

I tried
$this->load->model('user_model','user');

its giving error "can't load class user_model'

Oh i am such a ...... my user_model.ph is empty..

sorry i got it working now

[eluser]medium_kreation[/eluser]
were to place an assets for a module and how to access its IMAGES , CSS and JS scripts ,

i have different modules with totally different asset file.
but if i put them inside a module folder i am unable to access it in a view (via a url)..

ex. -
/modules/user/controllers/ ...
/modules/user/assets/ ...
/modules/user/views/ ..

in view i am unable to access the urls ,
below is what i am trying , but its not working :
<link rel="stylesheet" href="<?=APPPATH?>modules/user/assets/css/style.css" />


plz suggest how to implement it..

[eluser]medium_kreation[/eluser]
How to print $_SESSION in a view..

Code:
A PHP Error was encountered

Severity: Notice

Message: Undefined variable: _SESSION

Filename: views/form.php

Line Number: 2
I am getting the above error when i try..

[eluser]esra[/eluser]
[quote author="Zacharias Knudsen" date="1197039721"]esra: No I haven't incorporated the routing-hack, could you perhaps provide a link to said post? Smile[/quote]

The forum thread courtesy of gerben:

http://ellislab.com/forums/viewthread/63806/

[eluser]easylancer[/eluser]
how do i autoload a helper with Matchbox, and also how do i load them manually aswell into a controller?

[eluser]zdknudsen[/eluser]
medium_kreation: If you can't access it directly then it's probably because you're .htaccess is set up to block requests to your CodeIgniter folders. I don't know about the $_SESSION variable, however that is not an issue related to Matchbox.

easylancer: Try reading the 'Introduction' wiki page on http://matchbox.googlecode.com/. If you wish to autoload a resource within a module, you just add the module name as the array key in the autoload array.

[eluser]Matthew Lanham[/eluser]
How would you suggest structuring a module to contain both front-end and admin functionality, that would be able to be accessed via one central admin facility.

[eluser]esra[/eluser]
[quote author="swanweb" date="1197149818"]How would you suggest structuring a module to contain both front-end and admin functionality, that would be able to be accessed via one central admin facility.[/quote]

I'm currently prefixing my Admin controllers with 'Admin'. The navigation code for my Admin template determines which controllers to load. So, I might have a frontend controller called Articles extended from a base FrontendController and a backend controller called AdminArticles extended from a base BackendController. I usually steer away from using routes and allow my menu system to handle controller loading for both the frontend and backend templates. I do have one route called admin which loads a default admin controller into the Admin template from a url, but I also included a protected Admin menu option in the frontend which loads the default backend controller and associated template.

Others may be using different approaches.




Theme © iAndrew 2016 - Forum software by © MyBB