Uutiset:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu
Advertisement:

what is the integration stuff in 1.1?

Aloittaja permutations, elokuu 03, 2005, 01:43:58 IP

« edellinen - seuraava »

permutations

I keep seeing reference throughout the 1.1 source code of an integration feature, that apparently allows developers to define functions to integrate with ... something.

What is this for? Is there any documentation anywhere about what it is or how to use it?

permutations

I found a single reference to this feature here:

http://www.simplemachines.org/community/index.php?topic=41879.msg305004#msg305004

How are these functions integrated? Do they replace the native functions? Are they called in addition? If in addition, are they called before? after?

This looks like it could potentially be helpful in the paid subscription mod I'm working on.

[Unknown]

Documentation will be forthcoming as the feature becomes ready for use.

-[Unknown]

permutations

I figured out this:

define(SMF_INTEGRATION_SETTINGS, array(
'integrate_pre_include' => '/path/to/include/file.php',
'integrate_pre_load' => '/path/to/stuff.php',
'integrate_delete_member' => 'helloWorld',
'integrate_pre_load' => 'functionName',
'integrate_verify_user' => 'functionName',
'integrate_validate_login' => 'functionName',
'integrate_login' => 'functionName',
'integrate_logout' => 'functionName',
'integrate_activate' => 'functionName',
'integrate_fix_url' => 'functionName',
'integrate_verify_password' => 'functionName',
'integrate_change_email' => 'functionName',
'integrate_reset_pass' => 'functionName',
'integrate_activate' => 'functionName',
'integrate_magic_quotes' => 'functionName',
'integrate_change_email' => 'functionName',
'integrate_reset_pass' => 'functionName',
'integrate_verify_password' => 'functionName',
'integrate_reset_pass' => 'functionName',
'integrate_delete_member' => 'functionName',
'integrate_register' => 'functionName',
'integrate_redirect' => 'functionName',
'integrate_buffer' => 'functionName',
'integrate_exit' => 'functionName',
'integrate_egg_nog' => 'functionName',
));


and I can see from the call_user_func() calls what parameters each takes. The integration seems sort of random - whether it's before or after or whatever. Or maybe I just haven't seen the pattern.

How much as this been tested? Does it work?

I noticed that the password stuff has been completely changed in 1.1. This has been giving me a headache for the last two hours, since the code I wrote for 1.0.5 no longer works. Then I did a little test without SMF calls and it worked, but when I used the login template it didn't work, and then I looked at the login template and YIKES. I thought there wasn't supposed to be code in templates.


[Unknown]

#4
Lainaus käyttäjältä: permutations - elokuu 03, 2005, 03:23:15 IP
How much as this been tested? Does it work?

Only passingly.  It does, of course, work but I wouldn't suggest widespread usage until the RC.

LainaaI noticed that the password stuff has been completely changed in 1.1. This has been giving me a headache for the last two hours, since the code I wrote for 1.0.5 no longer works. Then I did a little test without SMF calls and it worked, but when I used the login template it didn't work, and then I looked at the login template and YIKES. I thought there wasn't supposed to be code in templates.

HTML and JavaScript are, and should be, used liberaly throughout the templates when necessary.

-[Unknown]

permutations

I tried it, because the integration function in the login procedure was called right where I needed to call my own function. That's when I was reminded that you can't define a constant as an array, which is what your code example in the other thread says to do (and what the SMF code says to do, in Load.php). I played with it a little but couldn't get it to work, so I did it the old fashioned way (included my file, called my function, etc.).

I discovered that I need to move the paid subscription stuff out of SMF anyway, because I have guest access off, and that denies access to all my subscription pages as well.

marcrueter

Any update on integration documentation?

I'm trying to use an external authentication system and think one of those nice functions should enable me to write my own authentication function.  Which one gets called when and what params are passed?

Advertisement: