Well if that's the case then what is it exactly that vBulletin for example does, that is what I'm trying to learn on how to do completely.
Mysql Stored Template System
I can come up with examples of PHP web apps that don't use a database to manage their templates.
What advantages will you have by putting your template in a database? Its a template, so I doubt you'll be performing a lot of text searches (the main text would be built from othe dynamic content pulled possibly from a database).
Originally posted by AstroTeg
I can come up with examples of PHP web apps that don't use a database to manage their templates.
What advantages will you have by putting your template in a database? Its a template, so I doubt you'll be performing a lot of text searches (the main text would be built from othe dynamic content pulled possibly from a database).
The advantage of a SQL based template system is for multiple sites that maintain the same theming... they can all pull data from the same MySQL database then... other than that.... Filesystem is more efficient I would think
Why not put the files in a central spot and/or mirror them?
using the SQL would require 0 extra setup, mirroring would require setting up the mirror, etc etc.
atleats t hats how I would see it
Using SQL, wouldn't the sites be sharing the same database? That wouldn't be very groovy if you wanted to keep your data protected. Unless you're using a locked down SQL account.
Check out rsync and crontab. I believe those two together would get the job done for mirroring (although I could be wrong - I seem to remember these two when I was looking to do some mirroring).
Again, if you're using SQL, there's not much caching going on. If you use a file system or a mirror, you've got built in caching...
So how were you doing it before you started to use PHP?
Originally posted by Roger Ramjet
So how were you doing it before you started to use PHP?
I was just having them built into files. The main reason I'd like something to be database stored is later on I can make it so not only myself but other users can easily edit these templates whenever they want, save, and everything will work perfectly fine.
Originally posted by TheMayhem
I was just having them built into files. The main reason I'd like something to be database stored is later on I can make it so not only myself but other users can easily edit these templates whenever they want, save, and everything will work perfectly fine.
I would definitely argue against using a database to store the templates themselves. Store the user info (including privileges) in the database. Then depending on how you do the directory structure, store the path in the database (or store the partial path - it would suck if you changed servers or the directory stucture and you'd have to update the full path in all the records).
Originally posted by AstroTeg
Using SQL, wouldn't the sites be sharing the same database? That wouldn't be very groovy if you wanted to keep your data protected. Unless you're using a locked down SQL account.
Check out rsync and crontab. I believe those two together would get the job done for mirroring (although I could be wrong - I seem to remember these two when I was looking to do some mirroring).
Again, if you're using SQL, there's not much caching going on. If you use a file system or a mirror, you've got built in caching...
what harm is there in sharing the same styles table (not data tables or even database for that matter, each site would presumably run their own database for data storage on a local server)
beyond that, the rest was irrelevant to my explanation so I'll leave it at that
When you say "styles" it sounds like a job for CSS which is easily shared.
Otherwise, put the file out there and let clients read the file in and process it as they see fit.
Sorry, I still don't see the need or advantage to have a database involved.
Is there a query you wish to perform that is easier in SQL than if you were to rely on the file system?