OK, here's what I'm thinking.
Pseudo directory structure:
Code:
/framework_code/
/psuedodirstructurehere/
/pages/
profile.php
main.php
anotherone.php
/template/
layout.tpl
/public_html/
/web/
index.php
/mobileweb/
/template/
layout.tpl
index.php
profile.php
/mobileapp/
index.php
/desktopapp/
index.php
Then, for example:
/web index.php router pseudo code
//request for profile.php, easy direct get
include '../../framework_code/template/layout.tpl';
include '../../framework_code/pages/profile.php';
inject content from profile.php into layout.tpl
display page
/mobileweb index.php router pseudo code
//request for profile.php, which has a mobile specific version
if (specific template file in this folder)
include template/layout.tpl
else
include ../../framework_code/template/layout.tpl
if (profile.php is in /mobileweb folder)
include profile.php
else
include ../../framework_code/pages/profile.php
inject content from profile.php into whatever template was grabbed
display page
This would allow me to basically make only the main web version, and anything specific for any other version can just dynamically be dropped into the corresponding folder. Typing it out like this makes it a lot clearer for me, so that helps. Should've done this first, I guess.
With subdomains, such as:
web.domain.com
mobile.domain.com
mobileapp.domain.com
desktopapp.domain.com
Each folder would be it's own document root. I think I'd be fine with doing the above even though the includes will technically come from another subdomain, right? (include ../../framework/etc.php from mobile.domain.com would still work?)
I could set the cookies to work on any of the subdomains.
Sorry for long post.
EDIT| 5000 posts!
EDIT2| Actually, in the framework code templates folder, I should split that up into subdirectories for each versions templates. That way, I can check the versions folder, include that template if it exists, otherwise include the main web template for that page. This will stop me from polluting the public directory with templates.
_________________
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.