Welcome Guest, Not a member yet? Register   Sign In
How to: Create an Admin panel with CodeIgniter
#1

[eluser]Phil Sturgeon[/eluser]
I knocked up a quick article on some good methods of frontend / backend separation with CodeIgniter.

"Create an Admin panel with CodeIgniter"
#2

[eluser]jdfwarrior[/eluser]
[quote author="Phil Sturgeon" date="1247070043"]I knocked up a quick article on some good methods of frontend / backend separation with CodeIgniter.

"Create an Admin panel with CodeIgniter"[/quote]

Nice work Phil. *click, Bookmark*
#3

[eluser]umefarooq[/eluser]
yaa really nice work in you third way with HMVC

application/
modules/
admin/
controller/
admin.php,user.php,content.php

no need to change anything in route.php file it will work fine.
#4

[eluser]Phil Sturgeon[/eluser]
You misunderstood umefarooq. That is what I was trying to avoid. An admin module makes no sense. You wouldnt have a frontend module so why do that for the backend?

If you put admin for a module INSIDE the module then it is all modular. This is the structure I have used to build PyroCMS and it works well.

Let a module rule itself :-)
#5

[eluser]Dam1an[/eluser]
I find the title misleading, especially as I came accross a similarly titles post yesterday for cakePHP. Excpet the cakePHP one was more of a dashboard showing the current status of your application, traffic, visitors, refering links, real time errors etc... I was hoping this would be the same sort of thing

On a totally unrelated side note (well, not totally unrelated)
Whats upp with your RSS feed, it seems to have pushed all of your posts out again from the very begining (until I realised I'd seen them all before I though you had a surge of activity on your blog lol)
#6

[eluser]umefarooq[/eluser]
i have used this structure with my application is working fine with me my url is always

access dashboard of admin
http://localhost/ci/admin

to access user or content
http://localhost/ci/admin/user

and add,edit will work in same way
http://localhost/ci/admin/user/add

no need to put any thing in route file.

its really working fine using HMVC. you just give one try to it will work
#7

[eluser]garymardell[/eluser]
He's not questioning it working, but just saying that exactly what he believes to avoid in a modular system. There is little to no point having modules if the files aren't all in the modules. It sorta defeats the point of the almost plug and play nature of modules.
#8

[eluser]Thorpe Obazee[/eluser]
Phil, It's really hard to get your captcha phrase submitted correct in the comment form. Is it working correctly?
#9

[eluser]Phil Sturgeon[/eluser]
[quote author="Dam1an" date="1247086853"]I find the title misleading, especially as I came accross a similarly titles post yesterday for cakePHP. Excpet the cakePHP one was more of a dashboard showing the current status of your application, traffic, visitors, refering links, real time errors etc... I was hoping this would be the same sort of thing[/quote]

The articles aim was to outline the best possible structure, not to tell you how to write your applications. That much people can do for themselves and any article trying to tell people how to write the actual code for their admin panel would be covering too many variables.

[quote author="Dam1an" date="1247086853"]On a totally unrelated side note (well, not totally unrelated)
Whats upp with your RSS feed, it seems to have pushed all of your posts out again from the very begining (until I realised I'd seen them all before I though you had a surge of activity on your blog lol)[/quote]

The recent multi-langification of PyroCMS (and therefore my blog) introduced a bug to the RSS feed. I fixed that yesterday so a few RSS readers may have issue with that and show all articles as new. Sorry for the confusion.

[quote author="umefarooq" date="1247100052"]i have used this structure with my application is working fine with me my url is always

access dashboard of admin
http://localhost/ci/admin

to access user or content
http://localhost/ci/admin/user

and add,edit will work in same way
http://localhost/ci/admin/user/add

no need to put any thing in route file.

its really working fine using HMVC. you just give one try to it will work[/quote]

Of course it works, but its a pain in the backside having files in many places. With my modules I can add or delete one folder and run the SQL and thats IT they are installed. Means files are only ever in one place which is the entire point of having modules.

Due to the extreme modularity of this approach (and therefore PyroCMS) I'll soon be able to have a install/uninstall service offered over REST which will download a single folder to your install from my server and run one set of SQL commands, boom, your module is installed.

If code was shared all over the place I would have to play "hunt the code" and introduce all sorts of annoying things like file mappers that work out which file belongs to which module, etc. What if they are shared? Nightmare!
#10

[eluser]Dam1an[/eluser]
[quote author="Phil Sturgeon" date="1247148067"][quote author="Dam1an" date="1247086853"]I find the title misleading, especially as I came accross a similarly titles post yesterday for cakePHP. Excpet the cakePHP one was more of a dashboard showing the current status of your application, traffic, visitors, refering links, real time errors etc... I was hoping this would be the same sort of thing[/quote]

The articles aim was to outline the best possible structure, not to tell you how to write your applications. That much people can do for themselves and any article trying to tell people how to write the actual code for their admin panel would be covering too many variables.[/quote]
I never said/accused you of telling us how to write code (and the Cake one was a drop in library, not a tutorial per se)... I just thought this might have been your very quick response to the cake version lol, anyway...

[quote author="Phil Sturgeon" date="1247148067"][quote author="Dam1an" date="1247086853"]On a totally unrelated side note (well, not totally unrelated)
Whats upp with your RSS feed, it seems to have pushed all of your posts out again from the very begining (until I realised I'd seen them all before I though you had a surge of activity on your blog lol)[/quote]

The recent multi-langification of PyroCMS (and therefore my blog) introduced a bug to the RSS feed. I fixed that yesterday so a few RSS readers may have issue with that and show all articles as new. Sorry for the confusion.[/quote]
No worries, as soon as I found out they where all dupes, I just marked them all as read. was just giving you a heads up incase it was a genuine bug




Theme © iAndrew 2016 - Forum software by © MyBB