| Overview Products Services About Contact Issues | ![]() |
IntroductionDino offers a very flexible user management, though others would say it doesn't offer any at all. This means that Dino is open to customization. For example: You can easily integrate Dino with other systems such as the popular board systems MyBB and SMF. These are especially well suited for this kind of integration as both offer nice APIs that fulfill everything Dino needs. Now, the big question is: What kind of "integration" is possible? Short answer: You can use the complete userdatabase from these systems, including their login and registration. Therefore if a user logs into Dino, he'll be logged into the board as well - the other way works just as well. There's a problem though: The way through which Dino checks access rights is different from those of most common systems. It doesn't have a "group" concept and it is based on a negative ruleset. Therefore you cannot allow a user to do something, but you can forbit him to do it. By leveraging a different source of users you lose the standard user-management that defined the rules. Thus the most difficult aspect of the integration is to map the access management of the new source to the way Dino works. This introduction will only show how to handle the administration panel, as this is the only rule defined by the Dino-core. Everything else is up to Dinos modules/plugins/components. MyBBThe first thing you'll have to do is to install Dino and MyBB. It doesn't matter what you install first. Example of your directory structure:
Thus the mybb will be placed within a "board" directory within Dinos structure. Because of the lack of namespaces in PHP you'll have to modify both Dino and the MyBB to work together. The problem here is the function named "get_user", which has been defined in both, MyBB and Dino. Both are essential for the application, so there's no way around them. The good part is that both define a different number of arguments: Dinos get_user has none, MyBBs has one. Open
Now, before you safe and close the file, you'll also add the import of the board system here. Look for the stripslashes_array function and add the following code directly before it:
And place this at the top of the file (after The last step is to replace the content of
The line of code directly after the comment Now we need to modify the MyBB. Open /inc/functions.php and search for "function get_user($uid)" and replace it with "function my_get_user($uid)". Place the following code after the function definition:
You're done. SMFThe first thing you'll have to do is to install Dino and the SMF. It doesn't matter what you install first. Example of your directory structure:
Thus the smf will be placed within a "board" directory within Dinos structure. Both systems define a function called "is_admin", but Dinos is deprecated so you should be safe to remove it if it isn't used by any of your specific modules. Thus open /lib/utilities.php, search for is_admin and remove the complete function (or rename it to "dino_is_admin" or something like that). Now replace the contents of /lib/user.impl.php with the following code:
Note that in order to make your code safer you really should add more mappings. See the mybb-tutorial for the reasons behind this. You're done. |
Applications Libraries |
| Copyright © 2006 Patrick Gotthardt · Design Copyright © 2006 Gedankenberg.de | AGB |