Customizing SMF > Portals, Bridges, and Integrations
A guide to the SMF integration hooks
Orstio:
Used in file: News.php
Used in function: fix_possible_url
Variables passed to hook function: The current URL passed to the fix_possible_url function
Variables expected from hook function: The modified URL
Usage: This hook is started only in XML feeds. It expects a URL, and is expected to return an alternative URL based on the one passed to it.
Example of use: SMF is wrapped in a CMS, and the URL of the wrapped CMS needs to appear in outgoing RSS feeds.
Orstio:
Used in file: Profile.php, Security.php
Used in function: modifyProfile2, validateSession
Variables passed to hook function: username, password
Variables expected from hook function: true/false
Usage: This hook is started only when sensitive information may be getting changed. It is called when a user is changing his email address, and when an admin is using the SMF admin panel. It validates the username and password against the integrated system before proceeding. SMF expects a value of true if the authentication passes, and false if it fails.
Example of use: You want an added layer of security to authenticate user changes and SMF admin panel access.
Orstio:
Used in file: Profile.php, Reminder.php, Subs-Auth.php
Used in function: modifyProfile2, setPassword2, secretAnswer2, resetPassword
Variables passed to hook function: old username, new username, password
Variables expected from hook function: None
Usage: This hook is started only when a username or password is changed in SMF.
Example of use: A user changes his password, so the password also needs to change in the integrated system.
Orstio:
Used in file: Subs-Members.php
Used in function: deleteMembers
Variables passed to hook function: user's ID_MEMBER (int)
Variables expected from hook function: None
Usage: This hook is started just before a user is deleted from SMF.
Example of use: A user has deleted his account, or the admin has deleted a user's account, and the account needs to be deleted in the integrated system as well.
Orstio:
Used in file: Subs-Members.php
Used in function: registerMember
Variables passed to hook function: $regOptions (array), $theme_vars (array)
Variables expected from hook function: None
Usage: This hook is started just before a user is entered into SMF. It is one of the more powerful integration hooks, passing all necessary variables in an array for use in the integrated system.
The $regOptions array by default will contain the following keys:
memberName
emailAddress
passwd (SHA1 hash)
passwordSalt
posts
dateRegistered
memberIP
memberIP2
validation_code
realName
personalText
pm_email_notify
ID_THEME
ID_POST_GROUP
It is important to note that all text values will already be enclosed in single quotes for ease of use in queries. More fields are available, and more are added with the addition of mods like the Custom Profile Fields mod.
Example of use: A user has registered in SMF, or an admin has created a user in the SMF admin panel, and the user needs to be created in the integrated system as well.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version