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.
>
> blues
>
> 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.
>
> > > blues
>
> > > On Aug 21, 9:38 am, blues <[email protected]> wrote:
>
> > > > I see.
> > > > 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?
>
> > > > blues
>
> > > > 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?
>
> > > > > Cheers,
> > > > > Dan
>
> > > > > 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...
>
> > > > > >> Cheers,
> > > > > >> Dan
>
> > > > > >> 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 
> > > > > >> > athttp://groups.google.com/group/boltwire?hl=en.
>
> > > > > > --
> > > > > > 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 
> > > > > > athttp://groups.google.com/group/boltwire?hl=en.

-- 
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.

Reply via email to