Pligg integration with SMF Forum

Register an Account
Pligg Chat Room
Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-03-2007, 01:05 PM
New Pligger
 
Join Date: Mar 2007
Posts: 13
Hello,

I'm uploading Pligg to my website as I type this and I must say it looks exciting indded!

I currently run a forum with SMF. I've done a search through the forums and couldn't find any mention of integration with SMF, so has anyone tried integrating Pligg members with SMF members?

Thanks!
Reply With Quote
  #2 (permalink)  
Old 03-04-2007, 04:08 AM
New Pligger
 
Join Date: Mar 2007
Posts: 20
I am trying

I've fiddled with pligg for 2 days now... The issue is that none of them SMF/pligg were actually made easy to integrate.
I know SMF has some API offered but I needed to feel pligg before thinking of a mod which does the integration.

Plus I'm not yet clear on the license issue - this license is a bit confusing for me as a non english speaker (I guess I just need to add a link on the pligg page to also make the integration module available for download ?)

Plus I have a ton of questions yet unanswered:
a) What about the logins/ips that are banned on SMF ?
b) What about the new registrations only on the pligg part ? What's easier - disabling the registration on pligg and only letSMF db as central repository ?
c) Shall I completely change the login.php on pligg and make it use the SMF db informations ?
d) Pligg is under lots of development and it is still beta.. What if I spend two weeks or more on the integration part and then everything changes ?
e) what about the sessions - from SMF i need to create a pligg session and viceversa.

And so on... unless pligg offers an auth API - the integration is rather difficult.. I'm still thinking on how to do this

Last edited by viulian; 03-04-2007 at 04:20 AM. Reason: Asking questions.
Reply With Quote
  #3 (permalink)  
Old 03-05-2007, 07:44 PM
New Pligger
 
Join Date: Mar 2007
Posts: 13
Wow I never thought there would be so much to consider. I was just hoping for a mod that combines the Pligg and SMF members cos it's rather weird for them to have to log in twice.

Thanks for your efforts and good luck writing it! My programming skills are way too poor to even attempt what you're doing but if you need help, eg. with testing or something just let me know.
Reply With Quote
  #4 (permalink)  
Old 03-06-2007, 08:14 AM
New Pligger
 
Join Date: Mar 2007
Posts: 20
Thanks for the kind words

I did a lot of progress on the issue:

a) Users that log into SMF are automatically logged into Pligg too. If you log into the forum and then click on anything that redirects you to Pligg - you'll find yourself already logged.
b) Users that register on SMF are automatically created on Pligg too.

Now, as I already have the community in SMF (already 1500 passwords encoded with md5 and not recoverable), I had to update Pligg sources and make it use the same encodings that SMF does (So I could just create 1500 users from a script just coping the passwords to the Pligg database).

SMF helped a lot since version 1.1.X already comes with an integration module which gets called on every action.. For example when the user changes his email, you can immediatly update the Pligg database. It's easy but you have to pay attention to the details (like I said email ban, member which created his account but the admin hasn't approved it yet - then you don't create the accout on pligg either, etc).

And it works

There's lots more to do but basic functionality is there.

Here are the main goals:
a) Make it a module. It needs lots of informations about pligg and where pligg is installed. It also needs to write to a log file (as I find it cumbersome to write the errors in SMF database. When I have errors I need to see immediatly). It also needs to be able to patch the Pligg files so they would have the same password encodings.
b) Make a nice interface to trigger copying the user information from SMF to Pligg (and see the progress and eventual errors).
c) Fiddle with Pligg's user rights (normal, god, etc) and find a way to relate from Moderators and SuperModerators in SMF to Pligg's own conditions.

I will keep this thread updated.. (I'll also post to SMF when it's done or almost done).

I think Pligg has a big potential to add dynamism to an existing community (sharing a common interest). Everyone has something to show to others
Reply With Quote
  #5 (permalink)  
Old 03-06-2007, 11:32 PM
New Pligger
 
Join Date: Mar 2007
Posts: 13
I've discovered another problem with integrating SMF and Pligg.

On my Pligg website, I created a column in the sidebar to show the latest topics from the SMF forum.

I used the SSI.php features to do this, and added the line

PHP Code:
require('/home/test/public_html/forum/SSI.php'); 
to Smarty.class.php so that it will be called from every page.

I also created a new sidebar module under templates\yget\sidebar_modules calling the code

PHP Code:
<?php ssi_recentTopics(); ?>
Now I find that when I try to login, nothing happens. It just refreshes the page as though I did not log in. If I remove this code it works fine. There must be a clash somewhere... does anyone know how I can fix this?
Reply With Quote
  #6 (permalink)  
Old 03-08-2007, 02:34 AM
New Pligger
 
Join Date: Mar 2007
Posts: 20
I haven't yet decided how to apply the changes to the pligg source code (I envision a way for people to find this mod really easy to use, so they would just upload pligg on their site and then apply the SMF mod and then it just works. Its harder than it seems ).

Here's a peek preview:

http://hex.ro/images/pligg/pligg_bridge.png

Last edited by viulian; 03-17-2007 at 06:21 PM. Reason: Changed IMG tags to URL
Reply With Quote
  #7 (permalink)  
Old 03-11-2007, 10:42 AM
New Pligger
 
Join Date: Mar 2007
Posts: 13
Update: I still haven't been able to figure out a solution for the SSI.php problem. Now I'm thinking of a workaround: to export my SMF forum posts to a RSS and then showing the RSS on the Pligg site.

Does anyone have any better ideas?
Reply With Quote
  #8 (permalink)  
Old 03-16-2007, 11:08 AM
New Pligger
 
Join Date: Mar 2007
Posts: 13
Viulian, did you manage to make any further progress on the Pligg-SMF bridge?
Reply With Quote
  #9 (permalink)  
Old 03-17-2007, 06:20 PM
New Pligger
 
Join Date: Mar 2007
Posts: 20
I'm back with good news

I have a demo ready on http://www.hex.ro/forum
- Create an account on the forum (no email approval is required)
- Then click the Pligg link found on the upper right side.
You should be automatically logged into Pligg (that means your account was already set up and cookie added).

Code is in alpha stage:
a) Creates a user on Pligg when a user is registering on SMF.
b) Automatically logs the user in Pligg when the user does login into SMF.
c) Can copy users from SMF to Pligg -> the key (unique) is conisdered the member name. If you redecide to copy users from SMF again, the Pligg accounts are updated.

There's more to be done:
a) when the email/password get changed on the SMF -> update Pligg db. Also on accounts deletions on SMF as well as accounts activations.
b) Pligg's cookie lifetime is session length.. need to make it as the long as the SMF one.
c) Make a mod for Pligg too (right now I had to manually patch the code).
d) Implementing Single Sign On for Pligg too (as if the user first logs into Pligg, it will automatically be logged onto SMF).

This bridge is more difficult than I've initially thought

If you guys test it, please let me know what other functionality the bridge should offer - as it might be easier for me to know them before I complete the code it will become increasingly difficult to change.

I cannot offer a download yet...
Pligg licensing requires me to also provide the sources I changed.. I don't have them ready (I mean I add things as I add functionality) so I'll only offer a download when I'll have the Pligg's bridge package ready.

Here's how the "Copy User" interface looks like so far:

http://www.hex.ro/images/pligg/insert.png
Reply With Quote
  #10 (permalink)  
Old 03-17-2007, 06:33 PM
kbeeveer46's Avatar
Pligg Developer/Admin
Pligg Version: 0
Pligg Template: none
 
Join Date: Jun 2006
Location: Muncie, Indiana
Posts: 3,215
All contributions are greatly appreciated.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
READ FIRST: Pligg Template Forum Rules Yankidank Free Templates 2 02-01-2010 08:53 AM
Pligg 1.0.0 RC3 Yankidank Current Version 2 04-02-2009 11:21 AM
Pligg 1.0.0 RC2 Yankidank Current Version 1 04-02-2009 11:21 AM
Pligg 1.0.0 RC1 Yankidank Current Version 1 01-30-2009 01:51 PM


Pligg Modules and Pligg Templates from Pligg Pro Find support on the Pligg CMS Forum - 24 hours a day! Make a donation to support Pligg CMS development