Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Working Integration with PostNuke

2»

Comments

  • MarkMark Vanilla Staff
    Took a lot of work, but I got this into the Vanilla 0.9.3 core, now. I had to do some reworking of the SqlBuilder (and all references to it across the entire application - ouch), but it's finished and seems to be working well, now. I'll have to do more rigorous testing tomorrow and I'll make a blog post about it when I'm done.
  • What changes did you have to make to the references to the SQLBuilder? I'm guessing you changed the way SQLBuilder works by storing fields, selects, joins, ect in arrays and then changed the application to add joins before select fields? I looked at that problem too, but decided to go with the preprocessor approach. Is your code changes in SVN now?
  • Oh well, it took some additional hacking to get the sessions to work anyway. However, I did get it working fully now and it was a fun experiement. At this point if you are logged into the CMS, you are logged into the forum. I will probably tweak the styles a bit more, but its good enough for now. Thanks for your advice and help Mark. I'll probably revisit after your next launch. Most of my changes have been pretty contained, so it should be pretty easy to upgrade.
  • MarkMark Vanilla Staff
    I've just uploaded the changes to svn if you wanted to take a look.

    You're bang on about having to move joins before selects. I also found that I had done a bunch of kludges throughout the application where I had done things like:

    AddJoin('u', 'UserID', 'd', "AuthUserID and Active = '1'", "inner join");

    The "AuthuserID and Active = '1'" was the offending code, and I had to move that code out of there in order to get it to work. I also had to change every single AddWhere in the application to use the TableAliases specified in the AddJoins and SetMainTable so that it would know what to rename the Param1 and Param2 in the AddWhere method. *That* was the biggest pain in the ass for sure.

    Here are the highlights:

    Table & Column Definitions:
    http://lussumo.com/svn/vanilla/trunk/appg/database.php

    Add the definitions to the content:
    http://lussumo.com/svn/vanilla/trunk/appg/init_vanilla.php

    Added a GetTableName function to the Framework:
    http://lussumo.com/svn/framework/trunk/Framework.Functions.php

    Altered the SqlBuilder object to reference the DatabaseTables and DatabaseColumns arrays:
    http://lussumo.com/svn/framework/trunk/Framework.Class.SqlBuilder.php
  • Ah, that is what I figured. I will download that code and probably update my installation to stay on the main trunk. Now, the only other issue is sessions. In order to make that work I had to basically extende the Check() method in the Sessions class. I am sure you could probably make that a standard as well. Basically, at the top of the Check() method, add a function call to a global method called "ExtendedSessionCheck()" You would want to pass in the user orbject, or maybe the user manager. It would return a UserID if it determines that someone is logged in, or zero if not. So in the Session class you'd check the results to see if it got anything. If so, kickstart the vanilla session and use that user ID. this way the end user could configure the ExtendedSessionCheck method to their needs. Alternatively, in the database.php config file you could set another parameter for "ThirdPartyIntegration = 'PostNuke'" which would be used to pull the appropriate ExtendedSessionCheck from a subdir that holds several different versions of that method - each one setup for different CMS's. You would not have to write any of these, the CMS community members would be all over that like white on rice.
  • MarkMark Vanilla Staff
    edited March 2006
    In 0.9.3 there is an Authenticator class that you can implement and replace (using a configuration option). It completely handles your vanilla sessions, so you can make it mimic what your existing session management does. http://lussumo.com/svn/people/trunk/People.Class.Authenticator.php
  • I just realized that I thought I was working with 0.9.3, but it was actually 0.9.2.6 ... doh. Oh well, I will upgrade. Thanks for all your hard work and help on this Mark!
This discussion has been closed.