Standardised "structure" for cumulus based web sites
Posted: Wed 21 Aug 2013 1:41 am
Hi folks.
With so may developers on here, is there a standard (voluntary) structure to follow when coding up pages or content.
I have seen some extremely well commented code on pages and scripts which is great - thanks to all, and i am now trying to get a standard set of elements built for a page that could be easily duplicated - including a day/dusk/night stylesheet, forecast images for day and night and a few other things, which brings a whole mess to the site.
for example I am seeing some expect the realtime.txt in a /data directory whilst some expect in n the relative root, which means uploading it twice.
or some pages reference scripts that have to be in a special folder rather than a standard folder for scripts (which means that you can end up using multiple versions of the same script)
When trying to get all the files in a common place, stuff gets mesed up because some code has relative references to other internal files that are not always easy to identify.
is there a convention, e.g.
root - all htm or php files go in here
/css - all stylesheets go in here
/data - all datafiles get uploaded here (including relatime files, noaa files etc)
/images - all images go here or in /images/projectname/
/scripts - all scripts not externally referenced go in here
special names if your page needs a special file like button.gif then to avoid confusion with other applications call it projectname_button1.gif where projectname is the addon name (e.g. if I had a page called funkyweather then funkyweather_button.gif goes in the /images directory.
This also makes it much easier to troubleshoot website issues.
btw. anyone any good at css colour gradients, mine are more like those of a sick cat !
just a thought...
http://www.warrandytefarm.com/weather (a whole lot of stuff still in development here)
With so may developers on here, is there a standard (voluntary) structure to follow when coding up pages or content.
I have seen some extremely well commented code on pages and scripts which is great - thanks to all, and i am now trying to get a standard set of elements built for a page that could be easily duplicated - including a day/dusk/night stylesheet, forecast images for day and night and a few other things, which brings a whole mess to the site.
for example I am seeing some expect the realtime.txt in a /data directory whilst some expect in n the relative root, which means uploading it twice.
or some pages reference scripts that have to be in a special folder rather than a standard folder for scripts (which means that you can end up using multiple versions of the same script)
When trying to get all the files in a common place, stuff gets mesed up because some code has relative references to other internal files that are not always easy to identify.
is there a convention, e.g.
root - all htm or php files go in here
/css - all stylesheets go in here
/data - all datafiles get uploaded here (including relatime files, noaa files etc)
/images - all images go here or in /images/projectname/
/scripts - all scripts not externally referenced go in here
special names if your page needs a special file like button.gif then to avoid confusion with other applications call it projectname_button1.gif where projectname is the addon name (e.g. if I had a page called funkyweather then funkyweather_button.gif goes in the /images directory.
This also makes it much easier to troubleshoot website issues.
btw. anyone any good at css colour gradients, mine are more like those of a sick cat !
just a thought...
http://www.warrandytefarm.com/weather (a whole lot of stuff still in development here)