FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Plugins and Code Hacks » Bridge Fudforum <--> Elgg (Combine social network with Fudforum)
Show: Today's Messages :: Unread Messages :: Show Polls :: Message Navigator
| Subscribe to topic | Bookmark topic 
Switch to threaded view of this topic Create a new topic Submit Reply
Bridge Fudforum <--> Elgg [message #161933] Sun, 21 February 2010 15:41
alopezie is currently offline  alopezie   Germany
Messages: 90
Registered: September 2003
Karma: 1
Member
add to buddy list
ignore all messages by this user
There was an interest to bridge to ELGG to take advantage of ELGG´s features like "personal homepages" and "personal blogs" or "personal galleries"

ELGG (http://elgg.org/) is an open source social community software, which is under nice development for some years now.

Both software do have possibilities to bridge to other software (for example ELGG to phpBB and fudforum was integrated into Drupal), so should work.

To bridge ELGG and FUDFORUM I had a closer look, and indeed it seems to be feasible.

There are different ways, but for the beginning I had to avoid the existing APIs as I want to use 2 different domains in 2 different webspaces, but on the same server.

The second thing to note is that ELGG is pretty fussy about Usernames, while FUDFORUM is much more relaxed.

So there certainly would be problems to register new users in Fudforum ... (Actually even transfering existing users will be a problem)

Thats why I made a simple decision to let users register in ELGG, and then insert the users in FUDFORUM

So for this 3 quite simple steps are necessary, first 2 adding code to ELGG

1. Add new user to FUDFORUM database when registering, but leave them unconfirmed
/actions/register.php

at line 52:

// Send user validation request on register only
		global $registering_admin;
		if (!$registering_admin){
				request_user_validation($guid);
				$con = mysql_connect("localhost","USER","xxxx");
			      mysql_select_db("DATABASE", $con);
			      $username1 =$new_user->username;
			      $name1 = $new_user->name;
			      $password1 =md5($password);
			      $timestamp1 = time();
			      $email1 = $new_user->email;
				  /* users_opt=4225782 means NOT confirmed */
			      $sql5 = "INSERT INTO XXX_users (login,alias,name,passwd,email,users_opt,level_id,time_zone,join_date )  VALUES ('$username1','$username1','$name1','$password1' ,'$email1','4225782','3','Europe/Berlin','$timestamp1' )";
			      mysql_query($sql5);

					}



2. Give them confirmed status when registration in ELGG is confirmed
/mod/uservalidationbyemail/actions/email/confirm.php

insert after Line 31 (notify_user):

		$con = mysql_connect("localhost","USER","xxxx");
		if (!$con)
			     {
			     die('Could not connect: ' . mysql_error());
			      }
			      mysql_select_db("DATABASE", $con);
			      $username1 =$user->username;
			      $email1 = $user->email;
			      /*USERS_OPT if NOT confirmed:  4225782 */
			      $sql5 = "UPDATE XXX_users set users_opt = '4356854' where login = '$username1'";
			      mysql_query($sql5);


3. Disallow registration in FUDFORUM and insert a link to ELGG site for doing this

Still I have to do automatic cross-login, so entering ELGG also login to FUDFORUM and vice-versa.
This seems also feasible via an extra link, as both programs API´s allow this
I have no idea to do this fully automatic for the moment, as this touches the Sessions and Cookies .... but this could be done later in view of better comfort.


Alopezie.de - das Forum zum Thema Haarausfall
Quick Reply
Formatting Tools:   
  Switch to threaded view of this topic Create a new topic
Previous Topic: Basic scripted user manipulation
Next Topic: FUDforum RSS to Post - Full RSS Feeds
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Mon Oct 23 22:28:07 EDT 2017

Total time taken to generate the page: 0.00762 seconds