News:

Wondering if this will always be free?  See why free is better.

Main Menu

Drupal SMF Integration

Started by animas, October 12, 2005, 02:06:16 PM

Previous topic - Next topic

animas

Recently there are some talks going on on Drupal's site about integrating SMF. I am one of those many users looking for this integration. If someone has done it  or started the project please let me know. I want SMF with my drupal sites. Drupal is missing SMF.

permutations

Somebody in the developer area on the Drupal forum replied to my post there to say I'm the only one who wants this. You might want to post in that thread.  :o

animas

I(animas-drupal) already did.  I think we also need to post updates here because some SMF users or coders will be interested in this integration.

H

I think it would also be a good idea
-H
Former Support Team Lead
                              I recommend:
Namecheap (domains)
Fastmail (e-mail)
Linode (VPS)
                             

permutations

The problem with integrating SMF and Drupal is that there are name collisions in both variables and functions. Both use $db_prefx to mean different things, and both use a set of database functions that begin with db_ so there are many shared names (e.g. db_query()). I went in and changed the names - the SMF functions now start with smf_ and the Drupal functions now start with drup_, etc. - but a non-programmer couldn't do that.

The only way that Drupal and SMF can be integrated in a user-friendly way is if one of them uses different (less generic) naming, and I think it would have to be SMF. Drupal positions itself as a full solution and actually has a forum, though it can't compare to SMF in functionality. SMF works at integrating with other systems, and actually uses the smf_ prefix in the SMF API, so the cooperation is more likely to (or more reasonably to) come from SMF.

animas

I also agree that change should be done in SMF. Have you tried to caontact with SMF Core team about this? Since they worked with Joomla, I believe they won't mind working with Drupal.

Kindred

just FYI... no one on the "core team" worked with Joomla to integrate the systems.  The bridge was done by Ortsio who started as just a user of SMF...
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

permutations

I'm happy to write the "bridge" - I'm working on it now (using SMF authentication to authenticate on Drupal). But nothing I do can be of use to others unless either SMF or Drupal changes their variable names. Drupal will never do it since they are philosophically against anyone integrating other software with their system. SMF could theoretically do it, but I suspect they won't.

animas

Are doing the bridge only by changing SMF func.? Or both Drupal & SMF?

Kindred

I suspect you are correct....   smf didn't change when it conflicted with Coppermine, either...
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

permutations

Quote from: animas on October 13, 2005, 11:29:52 PM
Are doing the bridge only by changing SMF func.? Or both Drupal & SMF?

It's hard to say what I'll need to change until I do it, but I expect that it will involve either writing a module for Drupal to accept SMF authentication, or hacking into the Drupal source code to get it to do this (if the hook method doesn't give me adequate control).

I want to again emphasize that nothing I do will be of any use to anyone else unless they have the programming skills to change the variable names program-wide to eliminate the name collisions. This is too drastic a change for a non-programmer to make.

animas

I think beginer php prgrammers like me will be able to handle your instructions. I just want to keep drupal clean because I will need to add other modules to my system without any conflict. So changing SMF code won't affect my system.

permutations

Quote from: animas on October 14, 2005, 02:50:47 AM
I think beginer php prgrammers like me will be able to handle your instructions. I just want to keep drupal clean because I will need to add other modules to my system without any conflict. So changing SMF code won't affect my system.

SMF has a "mod" system where developers can list the changes to make, and a program applies them automatically. But I can't write an SMF mod for you to do this - the changes are too extensive, and the mod would break the instant any change was made to the SMF source. Plus my copy of SMF is heavily modified, so I'd have to go through the exercise again with a clean copy of SMF. Once I had it working again, I'd have to run a text difference program hundreds of times, for each of the hundreds of SMF files that were changed, and meticulously record the approximately 2000 changes. And then I'd have to debug the mod file, which would be a nightmare. So I can't give you precise instructions.

If you think you can debug the problems that crop up with a global search-and-replace such as I did, go ahead and do try. You're not using SMF now, so if you break SMF and can't fix it, you can just delete it. I've already told you the collisions I found and fixed:

$db_prefix
database function calls starting with db_

Try doing a global search-and-replace on the SMF files, changing all instances of db_ to smf_. Maybe you'll get lucky and it will work. My changes were more complicated because I have a second set of tables with a different prefix that I use for managing paid subscriptions. But in a clean copy of SMF, this might work fine. Try it, and let us know how it turns out.

If it works, you will help others who want to do the same thing. When I've written the Drupal module to accept SMF logins for Drupal, the instructions you can supply for changing SMF will allow others to use my Drupal module to make it all work.

DarkLord

Hi!
I don't worked on Drupal nor SMF sources how much yet but would it not be easier to just make a module for Drupal with some authentication hooks so SMF and Drupal can share their userbase!? There is some kind of such a mod for vBulletin here hxxp:www.vbulletin.org/forum/showthread.php?threadid=97341 [nonactive] . They made no changes to vB as I know. Maybe you could take a look at this code to help you a bit!? I think just auth sharing would be enough to integrate because I dont think SMF would completly integrate into Drupal seamlessly because all Drupal content is build as nodes. But thats only my thinking without deeper knowledge of the whole codebase!

Greets Tim

(btw sorry for bad english  ;) )

Kindred

DarkLord...

the main problems is that both Drupal and SMF use identical names for some of the variables.
This leads to conflicts which will NOT allow both systems to be resident at the same time without replacing the variables on one side of the equation with differently named ones.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

permutations

The variable name problem isn't that hard to fix. It took me only a few hours. My integration plan is to do exactly what DarkLoad said - write a mod so Drupal will use SMF integration.

I'd be done already now except the Drupal architecture is tediously complicated and I got bored with digging through it. I'll get back to it eventually.

permutations

Hmmm... If I can download the vBulletin hack, maybe I can use it as a model so I don't have to drown in all the Drupal drugery. It looks like it adapts Drupal to use the vBulletin database, which is essentially what I want to do (adapt Drupal to use the SMF database).

I really have better things to do with my life than get a PhD in Drupal-ese. It's seriously over-architected, and the code is unreadable without spending long hours combing through the documentation.

permutations

I can't see the code for the mod because I don't own vBulletin.

Advertisement: