Extensible Applications thru Modules
Posted: Wed May 24, 2006 1:14 pm
i have started to work with an MVC frameworkt hat made things alot easier for me especially in terms of clean easy to read code. with this base code i was going to start writing a very large application mostly for my own needs and for fun. but i was going to keep everything well documented and well written. i don't want to write something and then have to come back and changeit all
the application that i'm building is to have modules which make the system extensible. like modules in PHP-Nuke or PostNuke or Dragonfly. these modules could be anything from forums to blog.
now what i need to do is have it so that the front controller (index.php) can direct you to the correct module whichever it is that you want. the main thing that i wanted to do is so that the user cannot go directly to the folder.
so for instance if they go to my site and type
http://www.my_site.com/index.php/modules/blog/index.php that is invalid
http://www.my_site.com/modules/blog/index.php this should be as well as ti's going directly to the folder's index which i do not want to allow
if they click on a blog link on the main page the link hould look like this:
http://www.my_site.com/blog/ || http://www.my_site.com/blog/index.php
this isn't directly going to either the folder and i wanted this to be valid.
my problem is getting it to work like that and i don't know exactly how to do this. i've tried screwing with the URL in the root index.php but that doesn't help because if you goto the folder directly you can still access it. i guess and error page would help that part but the fact taht it still goes there and no other way is really bothering me
some theory and psuedo code would help alot. i hope i explained it in enough detail.
thank you in advance
the application that i'm building is to have modules which make the system extensible. like modules in PHP-Nuke or PostNuke or Dragonfly. these modules could be anything from forums to blog.
now what i need to do is have it so that the front controller (index.php) can direct you to the correct module whichever it is that you want. the main thing that i wanted to do is so that the user cannot go directly to the folder.
so for instance if they go to my site and type
http://www.my_site.com/index.php/modules/blog/index.php that is invalid
http://www.my_site.com/modules/blog/index.php this should be as well as ti's going directly to the folder's index which i do not want to allow
if they click on a blog link on the main page the link hould look like this:
http://www.my_site.com/blog/ || http://www.my_site.com/blog/index.php
this isn't directly going to either the folder and i wanted this to be valid.
my problem is getting it to work like that and i don't know exactly how to do this. i've tried screwing with the URL in the root index.php but that doesn't help because if you goto the folder directly you can still access it. i guess and error page would help that part but the fact taht it still goes there and no other way is really bothering me
some theory and psuedo code would help alot. i hope i explained it in enough detail.
thank you in advance