We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 32963
    • 1,732 Posts
    Hi Guys,

    I could not find the SMF module so I decided to reupload it here.

    Can someone take a look at finishing completing the this module?
      xWisdom
      www.xwisdomhtml.com
      The fear of the Lord is the beginning of wisdom:
      MODx Co-Founder - Create and do more with less.
      • 25663 MODX Staff
      • 12,272 Posts
      Not having this really makes us look really bad. We can’t put up a solid filecabinet or extend the users over to the bugtracker without this core piece. By the time its done, we’ll have 3000 forum members.

      I really feel that we should demonstrate leadership by NOT asking people to commit to the file repository by creating yet another login and password. People are clamoring for this module as well, and have been for months.

      Unfortunately, I have no idea of what has been done or how to explain the logic/code in the module. Raymond, can you please explain what it does, and what it is supposed to do so someone can hopefully pick up the ball and run with it?

      Thanks.
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 32963
        • 1,732 Posts
        Well it’s pretty straight forward. The systems should allow SMF users to login via the WebLogin system.

        The SMF plugin listens to the OnWebAuthenticateevent then tries to authenticate the user using SMF’s login system if successfull then it means that the user was imported from SMF other wise it passes control to the event listener.

        The SMF Module is responsible for exporting and importing MODxand SMF users respectively.

        One problem is that MODx user system does not support a salt feild. This will change in the future but for now a work around is needed. The next problem is that when an imported user tries to login via MODx the authentification fails because of the missing salt into.

        IMO I think we can overcome this by appending the salf to the user’s password as follows:

        SMF:{hasedpassword}:{salt}

        Where {hasehpassword} and {salt} is from the smf database. The plugin could then do a check for SMF on the password if found then it applies SMF hashing if not it needs to fake the SMF login process.

        The problem here is that SMF does not allow you to redistibute their code so you would have to write it all over from scratch.

        What we need is a function that will setup and SMF authentification process without requiring a user password. This means that we can pass only the user name from MODx to this function to and have it setup a user session as if the user has logged using a password.

        smf_LoginById('james');


        Sure hope this makes sense.


          xWisdom
          www.xwisdomhtml.com
          The fear of the Lord is the beginning of wisdom:
          MODx Co-Founder - Create and do more with less.
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          Would it not be possible to have the MODx registration snippet (or a plugin, onWebUserFormSave or whatever) feed the username and a default password to the SMF registration processing script (using, say, the site_sessionname as the default password), then a plugin would pass the username and that known default password to SMF’s login processing script, after the MODx login script has authenticated the user (onWebLogin or whatever)? Then we don’t care if SMF has a salt or not.
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org
            • 22303 MODX Staff
            • 10,725 Posts
            Actually, what we really want is to be able to call a method and let SMF authenticate the user. Upon successful login via that method, we would add the user to our repository, without a password (e.g. only used for MODx specific operations) and indicate that it is a profile account only (i.e. authenticating that user would require a successful SMF authentication call, and local MODx data would simply be additions to that user’s profile). I’ll have to take some time to look into this when I get a spare moment or two. I’m not familiar with the SMF API at all.
              • 4673
              • 577 Posts
              If SMF is going to be a hassle to work around due to the licensing then why continue with it?

              I thought somebody here said that mercuryboard was GPL and possibly just as good or maybe not even better. (maybe I got the board wrong but still same idea).

              My thouhgt on this and at the moment is that maybe it would be better to team up with the original coders of a forum and work together to provide a killer solution smiley
                Tangent-Warrior smiley
                • 32963
                • 1,732 Posts
                I like Susan’s idea. It’s perfect! I think it’s the best way to handle all of this. It’s lovely!!!

                Because MODx (if rightly configured) is acting as a middleware between the user and SMF, the user will never be able to login to SMF directly!

                This means that we can add an option to the SMF plugin that allows an admin to enter a pass-phrase or key. This key will be used as the default password for every user in SMF! Yes we will reset SMF passwords to the use the key. We still need the salt to authenticate users that were imported from SMF unless we will have the user reset there MODx password.

                We could also allow the system to reset imported user’s passwords and send them an email.





                  xWisdom
                  www.xwisdomhtml.com
                  The fear of the Lord is the beginning of wisdom:
                  MODx Co-Founder - Create and do more with less.
                  • 4018
                  • 1,131 Posts
                  Looks like you guys might be onto something with the SMF Module. I downloaded the module and a copy of SMF to play with. Yeah, the login thing is definitely a hurdle. I took a look at the code and...well...I got lost! LOL! I think someone with some good knowledge of how SMF works and how the API can be integrated will probably have much better luck than I ever will.

                  On a side note, I tend to agree a bit with Carsten. Granted, having a SMF module would be a good thing regardless simply because there will likely be users requesting it. However, I think what would be an even better solution would be to find something that’s already GPL that we can hack the crap out of and make it work with MODx natively. MercuryBoard (http://www.mercuryboard.com/) looks pretty good...and so does PunBB (http://punbb.org/). One of the things I noticed about PunBB is that it’s extremely light-weight and is only about 850KB uncompressed! We could certainly take something like PunBB, MercuryBoard, or some other good, solid forum app and strip it down to the core. The main thing would be to strip out any user authentication processes and replace them with MODx specific calls. However, there is one thing that would likely need to change in order to make something like this happen...we really need to think about revamping user profiles (both web users and manager users!) to allow for custom fields and groups and such. If we get the API in place for this then modifying an existing forum app will be that much easier.

                  Just some food for thought! laugh
                    Jeff Whitfield

                    "I like my coffee hot and strong, like I like my women, hot and strong... with a spoon in them."
                    • 22303 MODX Staff
                    • 10,725 Posts
                    I’ll just throw my two cents in one this issue and say that I’m definitely against hacking another open source project to make it work `natively` with MODx. I’m all for ideas on how to provide the mechanisms necessary to integrate with GPL, commercial, or any-kind-of-license systems that are popular and provide the features that make sense for a particular project. I’m fond of PunBB myself, but do not have the time currently to take on writing the necessary module code and plugins to handle the integration. People who can develop these modules should be our #1 target audience right now. Once we provide a rich enough development platform for this audience, we will see no shortage of modules, plugins, etc., but until then, it’s up to us to provide working examples for the features we develop as appropriate, and user integration with a forum should be very high on our list.

                    @Raymond, is there absolutely no way to make the SMF module work? I thought you had it working at some point? Is there no API call in the API they provide to pass the credentials and determine if they are valid for the SMF user?
                      • 34162
                      • 1 Posts
                      I spent a lot of time in the last few month at SMF forum trying to understand their SMF bridge and oh man it is complicated.

                      In order for a CMS to work with SMF you need to have a SMF module and a bridge in your CMS to talk to the SMF module. SMF has its own user and group permission and would not want to let other CMS take control of their user login.

                      I tried a few different bridge between Mambo and SMF and the login and logout is a big headache and it is not working very well.

                      If you want a seamless login/logout for MODx I don’t SMF would be a good choice due to it license model and the complication of user permission.

                      I talk with the developer from http://newsboard.unclassified.de/ and he is very freindly and is planning on a feature to let other CMS to integrate with his board. I am sure if you approach him something good could happen.

                      The latest version is 100% XHTML compliant and look beautiful! and no table!