Cotonti / Open Source PHP Content Management FrameworkContent Management Framework

Forums / Cotonti / Core Labs / Archive / [idea] Js files autoload

tensh
#1 2009-07-30 05:34
Hi;

I was thinking... if Cotonti is smart enough to add some code in POST forms, maybe let's make it automatically load js files from /js folder of Cotonti? It would spare some time of editing header.tpl, make plugin installation for newbies easier, etc.

But if it would hurt performance, then "no"...
Trustmaster
#2 2009-07-30 15:01
Actually it adds such code to every POST form for XSS protection see sed_outputfilters() in system/functions.php
May the Source be with you!
Kilandor
#3 2009-07-30 18:54
While the loss would be minor as scandir is pretty fast. Sure its possible and easy, but I don't think there is any benifit. And more potential for conflicts. Say a person has JS files in there that doesn't need to always be loaded and such, which also creates a bit more load time for the end user.
tensh
#4 2009-07-30 21:08
Yep, but I was thinking about global js files... but anyway, you're right, it's not a big deal.