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.

Integrating Vanilla into an existing site

edited March 2006 in Vanilla 1.0 Help
I have a site with a load of members and associated profiles etc. Does anyone know how easy it would be to get Vanilla to use my existing user tables so that my members wouldn't have to have a seperate account for Vanilla?

Comments

  • I know it's pretty easy, but I don't know how.
  • MarkMark Vanilla Staff
    Making vanilla use your existing user table is not that easy, actually.

    Making your site use vanilla's user table is easier.

    At this point that kind of integration would require programming knowledge. Do you have any?
  • Yes I have some programming knowledge - nothing compared to yours! but I put the site together in the first place: I taken lots of scripts etc out there and meshed them together to make the site so far which has meant using html css php and mysql basically. The user tables are pretty key as there is a lot tied to each user's account. However I think that you may be right in that it would be easier to get my site to use vanilla's user tables as that would probably involve less code modifying.
  • Just kinna bumping this incase mark's forgotten about it (i'm back from holiday btw, miss me mofos?)
    You'll be best off grabbing 0.9.3 and looking at 'People' - as mark suggests you'll be best making your site work with vanillas table (you can add fields as necessary or work out an alternative way of linking the various data together)

    Sorry i'm not very coherent. I havent had the internet for a week and it's a bit wierd.
  • Well, in MySQL 5 we have an amazing thing called...drumroll...VIEWS. This requires some SQL knowledge but...I would rename your user table, create a view of the LUS_User table combined with your user table and call the view your old table name. If it's updateable your site shouldn't notice the difference. /just theory here, I wouldn't try it on anything live.
  • There are surely fields in the user table that Vanilla needs but other apps don't, and they may use slightly different password hashing algorithms.
  • Hi - i have a question re: integrating Vanilla... All I really need to know is if the user is currently logged in, and if so, what is their userID. is there a quick and dirty way to get this session info from Vanilla and use it in my non-Vanilla pages?
  • blizeHblizeH ✭✭
    edited February 2006
    I know it'll require a little work on your users part, but I'd seriously recommend starting from scratch and just use the vanilla system, if it's viable to do so of course. At least then you could use the page manager! (what's the URL for this again? :P)
  • I want to use the Vanilla user table and login system, thats all... is it possible? otherwise I can just hack a script into my Vanilla that will log the user into the site again, using my system AND vanilla's
  • Just include the necessary files (someone will tell you what these are, i'm not really the man) and you can use the vanilla usermanager object. This will be much easier in v1 with People so i'd suggest waiting for that.
  • i've tried a couple times to just include the necessary files... and their necessary files... and so on and so on... until i get an error. can't recall offhand exactly what the error was, but it was generated by Vanilla, and basically couldn't find a file... from what i can tell, it cant find the file because i'm working outside of the vanilla dir. what i really want to do here is be able to develop my stuff completely separate from the Vanilla, so I can always update/reinstall/replace Vanilla later on and keep the rest of my apps running smoothly as long as there is a Vanilla or other external user system in place. also, I have a lot of stuff done already, and I really don't want to get into making "extensions" for vanilla, as the stuff i am working on wouldn't really fit into that category. any help would be greatly appreciated... even if its just to tell me *how* vanilla gets the current userId. thanks!
  • MarkMark Vanilla Staff
    I've changed the repository with a new method of integrating with external applications and posted a blog entry about it. Vanilla 1 will be able to more easily integrate with other applications as a result... http://lussumo.com/swell/42/Data-Objects--External-Application-Integration/
  • thanks Mark, that helps a bit, but I think where I'm at right now, is actually trying to authenticate the current visitor... ie: is the visitor logged in? if so, what userId is he/she logged in as? right now I'm going to whip something up MacGyver style, but it will compromise security (barely), which i'm not *too* worried about, as I will be the only one who knows about it, and it will only be on my site... I also hope to fix my MacGyvering later on ;) I also plan on working on a proper (no MacGyver techniques here) extension or two once I've got some time for that, as this is a great bit of software. thanks!!
This discussion has been closed.