btw, just noticed that site.config is not loaded through BOLTloadpage but with a simple file_get_contents().
On Aug 24, 4:21 pm, blues <[email protected]> wrote: > If i include_once the plugin script before the engine, it terminates > with fatal error for a call to an undefined function (for instance, > BOLTdefault, but the plugin uses also other core functions). > Personally, i could live with the page site.config loaded through the > default BOLTloadpage, as anyway boltwire needs a file to store its > configuration be it a script or a text file. So it could be that one > page only. Though it may create some conflicts, for example when > editing site.config. > But for sure the main zone must go through the newly defined > myBOLTloadpage. > > By the way, for my own projects that i design from scratch, I also > often use the approach you said. > > blues > > On Aug 24, 4:01 pm, DrunkenMonk <[email protected]> wrote: > > > > > It's an interesting problem. > > > Page processing cannot start in the current build before plugins are > > set up, since boltwire decides what plugins are enabled from the page > > site.config, which requires BOLTloadpage. > > > To properly solve the problem include_once or require_once needs to be > > called before the processing in engine.php. It should be enough to > > include it in the index.php file (why didn't that work again?) but > > anything that uses boltwires plugins will always be too late. > > > I would build a system where anything added to a certain directory and > > named *.php file will be included. Looking at other software I use, > > this is often loaded as a great benefit rather than problem, but I > > believe Dan considers it a security issue. There will always be a > > balance between security and useability but I hope he reconsiders, as > > I dislike the idea of needing 2 systems to include plugins, depending > > what the plugin does. > > > On Aug 23, 12:55 pm, blues <[email protected]> wrote: > > > > Thanks for the suggestions. > > > I liked more the idea to add it to $BOLTscripts, but incredibly it's > > > still too late. The original BOLTloadpage was already called a couple > > > of times for the main zone and auth pages. > > > So i added it at the beginning of engine.php and after a lot of hair > > > pulling it seems to work now. > > > I really hope in a core solution for the plugins. :) > > > The basic idea for the fix is that page processing shouldn't start > > > until the core engine and plugins are fully set-up. > > > > On Aug 21, 4:10 pm, DrunkenMonk <[email protected]> wrote: > > > > > quick hack to get you going: > > > > > add it to the begining of engine.php, which should let it be called > > > > after the functions are defined. > > > > > If that doesn't work, look for this line in engine.php > > > > > $BOLTscripts = Array('markups', 'functions', 'conditions'); > > > > > add your script title to the list, and then place your script in barn/ > > > > scripts/ > > > > > I'm sure dan will core some solution soon though. > > > > > On Aug 21, 11:53 am, blues <[email protected]> wrote: > > > > > > As I thought, it is not working this way, since the plugin uses core > > > > > functions. > > > > > Needs a fix. > > > > > > On Aug 21, 9:38 am, blues <[email protected]> wrote: > > > > > > > I will try including the plugin before the engine. Not sure if it > > > > > > will > > > > > > work though since it uses some functions from the engine (eg. > > > > > > MarkUp). > > > > > > Anyway, i think this should be fixed in the core by including the > > > > > > plugins before starting processing the pages... What's the benefit > > > > > > in > > > > > > having a hook for the page loading process if we cannot use it in a > > > > > > plugin? > > > > > > > On Aug 21, 1:04 am, The Editor <[email protected]> wrote: > > > > > > > > Oh, sure. Just don't define the function in a plugin. Define it in > > > > > > > index.php before calling the engine. Or at the very least load the > > > > > > > script in index.php--so it is available first thing. Will that > > > > > > > work? > > > > > > > > On Fri, Aug 20, 2010 at 5:34 PM, blues <[email protected]> > > > > > > > wrote: > > > > > > > > Sorry if i was not clear. > > > > > > > > I am trying to define a myBOLTloadpage function to override the > > > > > > > > default BOLTloadpage function. > > > > > > > > I define the new function in a custom plugin that i am writing. > > > > > > > > The > > > > > > > > custom function (myBOLTloadpage) that i write is not called > > > > > > > > successfully for every page that is loaded since the plugin > > > > > > > > where > > > > > > > > there is the declaration is included AFTER some of the pages are > > > > > > > > already loaded (specifically auth pages and the main zone). > > > > > > > > Hope i am clear now. > > > > > > > > > On Aug 20, 10:03 pm, The Editor <[email protected]> wrote: > > > > > > > >> Can you specify exactly what you are trying to do and what the > > > > > > > >> problem > > > > > > > >> is? I'm not sure I got what you are saying... > > > > > > > > >> On Fri, Aug 20, 2010 at 7:04 AM, blues > > > > > > > >> <[email protected]> wrote: > > > > > > > >> > the BOLTloadpage hook (defining a myBOLTloadpage function) > > > > > > > >> > does not > > > > > > > >> > work correctly, because configs and plugins scripts are > > > > > > > >> > included AFTER > > > > > > > >> > some of the pages are already loaded. > > > > > > > >> > can anybody think of any quick fix? -- You received this message because you are subscribed to the Google Groups "BoltWire" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/boltwire?hl=en.
