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

[eluser]Dinesh Shah[/eluser]
H!

I have just started with Matchbox (RC2)

I have created a module and in that I am using

Code:
$this->uri->slash_segment(1) . "select_report";

I expect that it return the URI "/module_name/controller/select_report"

However, this gives "/controller/select_report"` and module name is missing.

I have also tried

Code:
$this->uri->slash_rsegment(1) . "select_report";

with the same result.

What am I doing wrong?

Thanks in advance for your help and support.

[eluser]gh0st[/eluser]
I have a question.

How do you combine an authorization layer with modules?

Lets say you have:

+ Blog module
+ News module

I need to make a CMS to access the modules but with an auth layer, so specific methods would be protected by an auth layer.

Is there any documentation on the best way to combine an auth layer with modules?

Thanks

[eluser]adamp1[/eluser]
You just need to add some library calls to the top of the methods which perform the auth checking. So when the method is called it checks the auth status, if not allowed it would redirect/prompt user for login.

[eluser]gh0st[/eluser]
Oh I see! I think that makes sense.

As I understand it, my modules would act like so?

Quote:modules
- blog
------controllers
--------blog.php

And in my blog.php I just make it call the auth checking.

But I am still confused about something. How do you seperate the CMS and the front-end part of the modules?

Do I put a CMS folder inside my modules too?

Quote:modules/
- blog/
------controllers/
--------cms/
-----------blog.php
--------blog.php

That seems like a lot of repetition, especially if there is a lot of modules.

What is the correct structure? Is it:

/modules/cms/blog/

But then where does the blog module itself live?

If I get clarification of this, that'd be great!

[eluser]adamp1[/eluser]
Sadly the first way is the only way I think. Otherwise you have a CMS module with a sub folder of blog.

[eluser]Unknown[/eluser]
Can as to that worked Matchbox with http://maestric.com/doc/php/codeigniter_i18n

[eluser]lawrencesilva[/eluser]
Hello friends, Im working on a little project right now, and Im using matchbox and codeigniter,

I’m currently having a problem when loading the same library twice.

I would like to call the same library but with a different name much like how the original loader class does it:

$this->load->library(‘session’, ‘’, ‘my_session’);
$this->load->library(‘session’, ‘’, ‘my_session2’);
// Session class is now accessed using:
$this->my_session
$this->my_session2

How can I do these using $this->load->module_library() of Matchbox?

Thanks in advance!




Theme © iAndrew 2016 - Forum software by © MyBB