Welcome Guest, Not a member yet? Register   Sign In
Admin panel and modules
#1

[eluser]ilSignorCarlo[/eluser]
Hi,
I'm working on a small website for a client where I need to create an admin panel to let him insert news and events. I don't need user registration or anything else, just a single admin. Since it happens very often that I need to build such a website I thought it would be a good idea to code it in a way that I could reuse the code for the admin panel. Today I found out about modules in Codeigniter. Specically I read this post: http://philsturgeon.co.uk/news/2009/07/C...odeIgniter

I like the third approach because in that way I can simplify things in future, I think. Anyway I'm a little confused. It says to create a main admin controller and then modules for the blog, the comments and so on, while it seems to me more natural to create normal controllers for the blog and the rest of the site and then adding a module for the admin panel. Maybe (probably) I'm totally wrong, but I don't really understand why. Can you help me?

And, anyway, is there anything that would suit better my needs for this site?

Thanks.
#2

[eluser]Narkboy[/eluser]
As far as I can read from the post you linked, the reason for creating an Admin Controller, then putting things like blog, comments etc is because the blog and comments are part of the Admin Panel - not the other way around.

Effectively, you create the Admin Controller, then seperatly create a module for each component that you want to add in - you can then enable / disable each module within the Admin Panel itself.

Reusable code is a must when you do several projects with similar attributes, but create it the way that it works best for you. Regardless of the number of users, you're going to need authentication. I personally don't use modules - I'm not comfortable with having one part one way, another part another, so I use sub-directories.

What ever works for you - but I'm not aware of an off-the-shelf solution you can use - I'd be hesitant to do so in any case unless you've read and understood every line of the code you use.

/B
#3

[eluser]ilSignorCarlo[/eluser]
[quote author="Narkboy" date="1308152516"]As far as I can read from the post you linked, the reason for creating an Admin Controller, then putting things like blog, comments etc is because the blog and comments are part of the Admin Panel - not the other way around.[/quote]

Ok, but I'm not really sure if in that example is there the directory tree for the whole application or just the admin part. I mean: are there the views for the normal blog pages (the ones displayed to users and not to the admin)? From what I can see all the views are inside an admin folder. So, if this is the case, where shall I put the views for the user frontend?

Quote:What ever works for you - but I'm not aware of an off-the-shelf solution you can use - I'd be hesitant to do so in any case unless you've read and understood every line of the code you use.

I agree and this is why I'm asking Big Grin
#4

[eluser]Narkboy[/eluser]
I believe Phil only put in the folders / files for the Admin panel. I would put the 'front-end' files directly below controllers, exactly where you would if you don't have an admin panel. I like to seperate the 'user' section from the 'admin' section totally - different files, different design, sometimes different login, depending on security. This is for 3 reasons - first, it's going to be faster for users not to be loading / checking for admin components, second it's better security-wise that a user can't accidently see something they shouldn't, and third it's usually easier to have a different UI when you're managing these things.

/B
#5

[eluser]toopay[/eluser]
I will chose the fourth option : create a single controller as ssh console to manage all administration stuff.
#6

[eluser]madiha[/eluser]
I installed my oscommerce shop and fine. But when I go to admin / modules / payment modules modules are not listed. Only my lists of "Module Directory" path and again at the far right is an "install" button. And yet, when I visit my store, which offers two payment options: direct payment of credit card and PayPal. I have to disable direct credit card payment option, but can not because not listed in the payment modules admin.




Theme © iAndrew 2016 - Forum software by © MyBB