MyBB Community Forums

Full Version: Javascripts from database
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Like the templates and the css maybe javascripts should be in the database as well so people can edit them "on-the-flow". This will also improve the plug-ins with javascript drasticly.
Like having an php page output the js files with an query.
And maybe have them output into one file, depending on what site your on.
So you don't have to edit templates to include an "new" javascript file.
This is where one could debate advantages/disadvantages of each.

The primary reason the JS is external is that adding it through a parsed PHP page with MySQL querying would increase the load on the server.

Javascript is code in the form that PHP is - which is why they're also in the file system.
Hmm Yea, probably right. It won't be any significant change though? But I see what you mean.

Well this would make it easier for editing - but increasing the server loading isn't good no :/
Just an additional thought to this, having it as an option on install and adding "This may increase your load on the server a bit" as an sidenote.
If they do not want to have it in the mysql server tell them to chmod there js cript folder to 777 or something so you can write the files instead of including them in the zip file.
This may be a bit work though since MyBB isn't really using that much javascript, but as I read on your blog it has increased.
I also thought in this, but diferent, have these JS in the DataBase, making it in a extern file dinamically

I will be doing it
So server generates it as an "cache" and updates each time you update the database?
CraKteR Wrote:So server generates it as an "cache" and updates each time you update the database?

Yes, exactly