Give Me Direction The file system is very important to the site engine. If a directory isn’t named right, the engine won’t know it’s there, in which case it won’t load the files from the directory. So I’ll explain the files system to the best of my ability (since I designed it, my ability should be pretty good). With the help of my friends “Windows Explorer” and “Adobe Photoshop”, I made this little diagram to help explain it all.
Figure 1 The best way to explain this is to say that the directories labeled in black are the ones that must be labeled the way they are in the diagram; the directories in red are directories that are named depending on what is in them; and the blue is an optional folder in case you have images, CSS, JavaScript, or whatever you want to put in it that’s relevant to your theme. It can be named whatever you want it to be name as long as the theme files know where to look. The “ROOT_DIR” directory can be named whatever you would like to be named as long as the server is set up to know where the site engine files are, configure it accordingly to your operating system’s and server’s specifications. The “inc” folder should always be named “inc”. This is where all the engine files reside. The “plug-ins” directory should always be named “plug-ins”. This is the directory that we’ll be putting all our plug-ins into. The “plug-in_name” directory should be named accordingly, based on what plug-in is contained in it. This is also known to the engine as the name of the plug-in. That’s because all the actual plug-in files are named “main.plug.php” so the engine knows the difference by the name of the directory it is in. There needs to be one directory for each plug-in. The “blocks” directory should always be named “blocks”. This is where all the blocks that depend on the plug-in, whose directory they are in, reside. Each plug-in directory contains one of these. The “modules” block directory should always be named “modules”. This is where all the modules that depend on the plug-in, whose directory they're in, reside. Each plug-in directory contains one of these. The “templates” directory should always be named “templates”. This is where all the files that define the templates for each site reside. The “site_name” directory should be the same as the host that is defined for the particular site. If your site is hosted at subdomian.url.com the host of the site would be “subdomain”, therefore the directory’s name should be “subdomain” if the site is hosted at www.url.com the host would be "url", therefore the directory’s name would be “url”. There needs to be one directory for each site. The “template_name” directory should be named the same as the name of the template. If your template is named “Default” the directory should be named “Default”. There can be multiple templates for each site, but at least one per site. The “images” directory can be named whatever you want it to be named. I just included it in the diagram as an example of where you’d put your images, CSS, JavaScript, or anything else the particular template depends on. Here is an example of what the directory would look like for the engine running 2 sites, one of the sites having two templates, and five plug-ins, each with a few modules and blocks.
Figure 2 Note. The two directories that are marked with an asterisk (Fig. 1) can actually be renamed to anything you want, although that’s a rather advanced topic that involves a deeper look into the database, the file system, and the plug-ins and module systems That sums it all up for the file system. It’s actually pretty straight forward and painless when you actually start to work with it.
blog comments powered by Disqus |
|
|
|
|
|
|
|