[geeklog-devel] Geeklog New Scripts Class
cordiste at free.fr
Sat Mar 5 13:29:21 EST 2011
Thank you Tom, this will be a nice feature.
Is this will be available with geeklog 1.8 ?
2011/3/4 Tom <websitemaster at cogeco.net>:
> Hi All,
> I just pushed an update that adds a script class to Geeklog. This scripts
> forward. It is pretty much complete but will probably need some tweaking
> here and there.
> I have also updated Geeklog Core to use this new class. Further work needs
> to be done (like with the plugins) but for now the advance editor for
> Comments and Articles uses the new class along with the Configuration and My
> Account page. This also means in the header.thml file, css_url and
> general also needs a bit of cleanup in Geeklog which I hope to get to in the
> future. Things like common.js is always loaded. This now doesn't have to be
> the case with the new Scripts class but I have not taken the time yet to
> find all the spots that use the functions in this file. When I do (or
> someone else) all they would have to do is tell it to load when needed in
> the php code.
> Here are some highlights of the class:
> needed will load
> - Admin can specify to use Google's CDN files for jQuery
> - Class will fall back and use Google's CDN files if jQuery files
> missing from Geeklog
> - Will do away with inline scripting (ie scripts in template files) as
> footer and jQuery always loads in the footer)
> - Possible future feature includes Caching/Compressing of regularly
> in some of the classes functions)
> (As I am writing this I just realized I forgot to add in the config option
> in the Configuration to enable the use of Google's CDN files, I will push
> this change later this week)
> The class is set near the beginning of lib-common.php as $_SCRIPTS. It uses
> the template variable plg_headercode in COM_SiteHeader to put information in
> in the class before COM_SiteHeader is run (at least for the CSS files and
> call COM_SiteFooter (this shouldn't be a problem since this is one of the
> last functions you should be calling anyways on a page).
> So how do you use the new class?
> would do something like so:
> $js = 'geeklogEditorBasePath = "' . $_CONF['site_url'] .
> Or if you wanted to tell Geeklog to include a jQuery library
> Or to use a widget of the jquery ui plugin
> If you tell the script to use a widget there is no need to tell the Scripts
> class to load jQuery as it will automatically add it in.
> To add a CSS file you would do something like this
> $this->setCSSFile('theme', $theme_path . '/style.css');
> them. These variables are geeklogSiteUrl, geeklogLayoutUrl, geeklogAdminUrl
> and geeklogThemeName.
> geeklog-devel mailing list
> geeklog-devel at lists.geeklog.net
More information about the geeklog-devel