thanks… hmmm… i stayed on the current directories of my files cause i don’t see any errors showing out of it…i can access admin via url [mysite.com/admin but not mysite.com/index.php/admin] and it’s fully functional already
may i know what’s with putting it in a module that makes people say the same thing to me? it’s a bit funny…
Accessing it via mysite.com/admin is going direct to the admin files. Trying to use mysite.com/index.php/admin is using the Yii Framework routing system. The framework is built to route paths to modules/controllers/actions, which is why you should build it as an admin module. It will remain suitably encapsulated but will fit within the framework as it was designed to work. I would recommend moving it into a module, it will make maintenance easier in the long run.
The difference is that your admin panel is simply a second full WebApplication. It has its own models, controllers, views, components and so on. You can switch user between those apps only by generating proper URLs and cannot share data on server side. If you create admin panel as a module you can share data models, components and so on with controllers visible to public. In your solution you have to maintain copies of models and compoinents in both application or do some hacks that are not very pretty in programming style meaning.
If your solution is fine for you - good. You do not have to listen to those who suggest writing module, however they are right that this would be much prettier
As I went though the post I found that admin should be created inside protected/modules, i.e. it should be treated as a module. My question is that, is there any flaw if we create admin outside of protected folder as mentioned by Kael in his first post?? It, too has it’s own protected folder with its’ associated directory and files.