On Sep 7, 9:24 am, The Editor <[email protected]> wrote:
> Kevin, sorry for not getting back to you earlier on this. Let me share
> with you how I would recommend solving this problem.
>
> 1) Avoid any changes to the core functions. That means you will have
> to remake the change every time theres an upgrade. This should be a
> hard and fast rule--never change anything there. There's virtually
> always a way to work around what you want.
>
> 2) I'm not opposed to adding a new feature to the core, if you think
> there is merit in it. It's only a couple extra lines. Generally,
> though, I think something like this would do better as a plugin, as it
> is probably not a common need.

No problem with above... not sure how many people would need what I am
looking at.

> 3) I think the easiest solution would be to use toolmapping to create
> a custom function. You can do this with any function, command, or
> condition. In your config.php file try this:
>
> $BOLTtoolmap['x']['login'] = 'mylogin';
> $BOLTtoolmap['x']['register'] = 'myregister';
>
> This means map any calls to the login command (x) should go to
> function mylogin instead.  Use f for function and c for condition.

Can toolmapping be used in a plugin?  By that I mean, if I created a
plugin with replacement login and register functions could it have the
toolmapping to tell the system to override the current functions. Or
is there something else that can do that in a plugin?

I was wondering that when I was making the changes that I did.

> Next copy the login and register commands from the commands.php script
> to your config file, and rename them mylogin, myregister. And make any
> changes to the code that you wish. In this case, changing crypt to md5
> in all appropriate places.

I understand the part about pulling the login and register commands so
that I could make changes to them, but I don't get the config file
part.  Which config file are you talking about?

> 4) You're finished!  All your usual login features in BoltWire now get
> rerouted to your custom functions and you can do upgrades at any time
> you like, without losing functionality. Of course, if there was an
> improvement to the core login/register functions, your custom
> functions would not contain those improvements unless you updated them
> to be based on the newer code. For example, in the last release or two
> I added a small bit of new functionality to how the register function
> handles emails. Of course, those are usually noted in the changelog...
>
> I would probably not use commands code/encode/decode as they are used
> by some other plugins, and might have better uses down the road. But
> if your system is working, that's what counts.  I do see you are
> catching on quick to how BoltWire works.
>
> --------------------------------
>
> On a related note, DrunkenMonk gave a nice snippet of code you could
> probably use to get a more universal login. I think that would be a
> nice feature. To get an outside function to save data to a page in
> BoltWire (such as a login page), you might want to look at the
> savedata functon in engine.php. Remember they are all alphabetized.
> You would have to hardcode a few variables/paths, and work around the
> few BoltWire functions in it (like exists, loadpage and savepage, but
> none of these should present too much trouble. So you could probably
> salvage some of the code to make a quick external script.

I didn't understand his post at the time, but am getting there now.
Learning curve.

Treading into custom zone here I think...

In one project that I am just starting, the need to user data in the
wiki is really not needed.  All that is really needed is the ability
to validate who a user is by MySQL call to a common database.

Rather than creating login.user files, using your method mentioned
above it appears that I could replace the functions dealing with users
for login, register, exists etc...

Am I going to run into problems doing this where there are no
login.user files?

If toolmapping or something like it can be activated by a plugin, it
might make implementing something like this simpler, allowing for
upgrades to the core as needed without having to redo everything each
time.

A plugin would also help others I think by providing a shell of how it
can be done that could be used by others that need to integrate like
this.

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