Firefox PHP

Use of existing member system [solved]

Posted by Terradon 
Re: Use of existing member system
October 22, 2010 12:36PM
ok, i will take a look at it.

for your info,
when i disabled a part of the code like below, it did work:

Language: PHP
/* // If the user is not active, then do not log them in. if ($phorum_user_data[';active';] !== PHORUM_USER_ACTIVE) { return $session_data; } */   /* // Since we have a simple admin setup (a fixed user), we take care of // syncing the admin user by simply always saving data for this user. if ($active_user_data[';admin';]) { phorum_api_user_save($active_user_data, PHORUM_FLAG_RAW_PASSWORD); } */   But i will try to use your new updated code.



Edited 1 time(s). Last edit at 10/22/2010 12:49PM by Terradon.
Re: Use of existing member system
October 22, 2010 12:43PM
with your new code, i get an error for duplicate entry in mysql.
the code tries to register me?
Apperently because i seem to be not an active user?


btw, i just made a $40,- donation, you guys do deserve it!
(it seems a guy named brian received this:)



Edited 1 time(s). Last edit at 10/22/2010 01:06PM by Terradon.
Re: Use of existing member system
October 22, 2010 01:54PM
Thanks for the donation! We will put it to good use.

The problem with the duplicate key is that the userID from your application was used to store a user in Phorum using that userID, instead of the user_id that Phorum created in association to the username.

Anyway, try the new version as attached. It fixes the bug and adds a little extra: synchronization of user data when the data for the user in the main application has changed. Using this version, things like changed e-mail addresses in your application will be propagated to Phorum as well.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Attachments:
open | download - mod_inherit_authentication_from_session.php (3 KB)
Re: Use of existing member system
October 22, 2010 04:31PM
definition of good use: pay phorum related costs and buy yourself a beer:)

Your code works perfect!
I do not even have to synchronize my usertables! Reallly perfectly done with so less code! This means that phorum is very well coded.
i have tried this with phpBB......i gave up then. (besides that, phpBB is a huge, ugly coded, inefficient monster of a script)

Looking at the name of your function, i suppose you have a good start to make phorum a script which will easily adapt external session based login systems? I really hope you do, because i believe that besides a perfect forum, easy integration would make the choice for phorum, a number one choice for a lot of webmasters!

I have been looking for an easy to integrate forum, for almost a year. During my search i have found a lot of questions about forum integration. Mostly the advice was to start with a forum and then build a website around it, using the membersystem of the forum. Unfortunately, a lot of webmasters start to build a website/communtiy first and AFTERWARDS they realize they need a forum.....then the troubles starts....
if it was possible, it was always a disaster to get it working.
So i repeat it for the last time now: Phorum is a perfect forum and (as soon as you know how) easily to integrate AFTERWARDS:)
Now i just do not understand the popularity of phpBB:)

Keep up the good work!



Edited 1 time(s). Last edit at 10/22/2010 04:33PM by Terradon.
Re: Use of existing member system
October 22, 2010 05:05PM
We don't like applications that demand to be the master application either. That's why Phorum was coded in such way that it feels comfortable as either a master or a slave application.

Quote

Looking at the name of your function, i suppose you have a good start to make phorum a script which will easily adapt external session based login systems? I really hope you do, because i believe that besides a perfect forum, easy integration would make the choice for phorum, a number one choice for a lot of webmasters!

Phorum *is* a script that can be easily adapted to integrate with external sessions. The whole tiny integration module for your site is the proof of that. It's hard to make things more generic than this. Think of variations in the external applications. For your application, usernames apparently cannot be modified, making it possible to use these as the linking key between the applications. But not all systems have fixed usernames. For those you might have to fallback to syncing based on the user ID, by keeping those in sync. There are systems where both strategies won't work, requiring yet another key, some ID mapping or Phorum user management that is built-in in the main application management code.

This is the biggest issue with providing the ultimate integration code. When trying to support it all, the integration code quickly gets terribly complicated. One also risks into locking down features by assuming things about they way in which external systems operate. IMO, the level at which Phorum offers integration at this point is just perfect. All features can be accessed through module hooks, so integration can be fully contained in clean modules.

The best thing that we can do from here, is not to write more code for integration (talking about core code, example code is still very useful), but to write more documentation on integration issues. I'ts one of the seriously lacking chapters in our documentation. That is mainly a matter of time. The Phorum development team is not really big and time quickly gets spent on writing code instead of documentation.

Well, good luck with your cool new module ;-) I am sure that it will be very useful as an example for others who need a jump start on Phorum user/session integration.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Use of existing member system
October 22, 2010 05:15PM
Thanks for your comment. I now do understand why Phorum isn't an ugly coded script! You keep with your coding principles!

Problems with integration is not a problem with the codes of Phorum, but due to a lack of php knowledge of webmasters:)
Your small team has done a wonderfull job and thanks for your time and patience with me:)
Re: Use of existing member system [solved]
November 07, 2010 03:11PM
wow this is what i need!!!! please help did you solve this problem yet? terraden im also new at php let me knowe if you figured out how to do this
Re: Use of existing member system [solved]
November 07, 2010 05:32PM
The final script that worked for Terradon was posted in this very thread (this post), so yes, he was able to implement the single sign on and user synchronization for his setup. You could use the script as a starting point for your own implementation.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Use of existing member system [solved]
November 08, 2010 03:19AM
Ok i found the info.php but what do i edit in that file ?

<?php

//add this external application's info to the list of possible apps
$PHORUM["phorum_mod_external_authentication"]["possible_apps"][] = array(
//The name of your external application, possibly with the supported version
//number
"name" => "Group-office v3",
//The folder for your plugin (the folder which contains this info.php file)
"app_folder" => "groupoffice_plugin",
//The required version of the External Authentication which has the
//necessary hook support for your module
"required_version" => "5.2.1.01",
"author" => "hansvd",
);

?>


do i need root access or anything special installed do i need a vps server? right now im running on a shared this is what i get when i goto admin global settings modules

Warning: possible module "Brainstorm" found, but no module information is available for that module.
Warning: possible module "login2.zip" found, but no module information is available for that module.
Warning: possible module "settings" found, but no module information is available for that module.
Warning: possible module "plugins_bin" found, but no module information is available for that module.
Warning: possible module "js_bin" found, but no module information is available for that module.
Warning: possible module "comm_external_auth_plugin" found, but no module information is available for that module.
Warning: possible module "external_authentication" found, but no module information is available for that module.
Warning: possible module "Changelog" found, but no module information is available for that module.
Warning: possible module "settings_bin" found, but no module information is available for that module.
Warning: possible module "lang" found, but no module information is available for that module.
Warning: possible module "README" found, but no module information is available for that module.
Warning: possible module "info.txt" found, but no module information is available for that module.
Warning: possible module "db_bin" found, but no module information is available for that module.
Warning: possible module "Plugin_Development_Guide.txt" found, but no module information is available for that module.



Edited 2 time(s). Last edit at 11/08/2010 03:29AM by xpok3rkingx.
Re: Use of existing member system [solved]
November 08, 2010 04:06AM
It looks like you did not grab the PHP file that I referred you to in this thread. That file is a single file module that does not need the whole framework of the external authentication module.

If you want to go with the external authentication module, then install the module correctly. What you did now, was extract all files of that module right into the mods directory of Phorum. That is not correct. You need to put the external_authentication folder that you found in the archive inside the mods directory. For example mods/info.txt should have been mods/external_authentication/info.txt.

Just editing the info.php is most definitely not enough to get things going. The info file just provides some general information. The interesting parts go in the plugin that must be written specifically for your system. If you trip over editing the info.php then I am afraid that you're not only new to PHP, but that you are no programmer as well. If I am right in this assumption, then it is unlikely that you will pull off writing the site integration code. This might sound harsh, in which case I apologize, but one's got to be realistic about this.

You are asking what to fill in for info.php out of the blue. What might be useful to us for helping you out, is more information about the kind of system that your Phorum must integrate with. The technical details of the existing user and session management are vital in the integration process. The equivalent of what you ask here, is asking "What color is my hair?" without posting a picture.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Sorry, only registered users may post in this forum.

Click here to login