Main Stories
Slash Boxes

Slash Open Source Project

Slashcode Log In

Log In

[ Create a new account ]

Universal User Hack

posted by Krow on 07:56 AM June 4th, 2001   Printer-friendly   Email story
So I have been working for a while on a way to convert my own personal sites over to slash. The one problem was the my old software (something I wrote) had a feature called "channel". Each site was its own channel but all authenicated against one user account system. This was really nice for me since I have several subdomains that host different material. After a little hacking I now this working with Slash.
So here is one approach logins for multiple sites.
Thanks to the nice folks at MySQL I found the following link. What it describes is how to modify mysql to handle logical links. Once I followed that links advice I then took all of my user tables, combined them into one set of users tables and backuped all of my user tables. I then set up symbolic links from all of my sites users* files to one set. After that I adjusted in vars the cookiedomain to being .tangent.org.
Welcome to instant universal login :)
Keep in mind that this really only works for me since I have the same sites using the same database. Its a hack, but it is working for me, and I thought I would share it :) I have a few other things I am going to play with now that I have this working, but I thought a few of you might find this interesting.
You can go see this at tangent.org and here media.tangent.org.
Have fun!
This discussion has been archived. No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login
Loading... please wait.
  • by Anonymous Coward
    Krow, grammar! Some of your sentances don't make sense.........
  • I discovered that if I went to tangent.org that the cookie would not work (duh!), so I ended up modifying setCookie() in Slash::Utility to send out both .tangent.org and tangent.org cookies.
    --

    --
    You can't grep a dead tree.
  • Okay, if slashcode is to become universal, there needs to be a central worldwide authentication server. If you run an ISP, you can hook together all you sub domains. But it would be way neater if my login on slashcode, slashdot, and slash.thefirsttwins.com all worked.
    --
    [------ The First Twins Rule -------]
  • Someone needs to write an LDAP layer.
    --

    --
    You can't grep a dead tree.
  • I wouldn't mind seeing a method to share all the slashboxes from one db to multiple sites on the same box.

    --
    lottadot [lottadot.com]
  • Thats kinda cool, but there seems to be a lot of Fragmentation on the slash project now. Like Krow's Mod_layout [slashcode.com] thing. In theory, wouldn't that be faster than how slash currently does stuff, which seems to make INC files for .shtml files.

    I'd like to see some of this stuff maybe merged into the slash code install, and a howto or install doc on how to get them to work.

    --

    --
    It's either on the beat or off the beat, it's that easy.
  • I been thinking that for a while... since cookies are limited to their domain that rules them out more oe less... so how does one go about making this work? we can exchange headlines pretty easy in slashboxes maybe there would be a way to make a user slashbox that could allow users to pass thier info site to site in a similar manner. This would knock out the need for a central auth server if this is setup at slashsiteA and user has a login for slashsiteB they add it in their user prefs and store site info from there. If slashsiteB has the plugin running and user jumps to that site with the click through then they get logged in transparently and the data could go with them perhaps even over to slashsiteC if they have good login for slashciteC and so on.

    Even if we can't pass the logins that way maybe there is a way to make this work from a single site as a starting point(say the users favorite slashsite). Provide a user slashbox that lets them add their favorite slashsites and a method for them to store the login at that start point and just jump to their favorites from there. I guess then that site would act as the hub for that user. User logs in at slashsiteA and some good web fu goes and logs the user in at other sites (could be done with some frames trickery in the html) user logs out at any of the sites and all are logged out...

    Sorry for the chaotic nature of this post... This is something i would love to figure out and see happen, maybe someone has a lightbulb go on from one of these thoughs and it starts too happen..
  • I am sorry, but it's the ugliest hack I've ever seen. Calls for troubles all over the way.

    Fortunately, it doesn't work with other databases which don't rely as much as MySql on the filesystem...
    --

    Check out the Slash in Italian Project [kenobi.it]

  • mod_layout is a lot faster then slash, but then it is not doing the same thing. Its a display engine while slash is an application server. mod_layout doesn't have a clue as to how to draw anything/display stories. On the same token if you just need a standard look and feel to a site its only 34K and pretty damn fast (especially when tuned).
    You can merge the two systems (which I do), but the advantage is really only for files that live outside of the slash engine.
    --

    --
    You can't grep a dead tree.
  • The color block would get in your way in that situation. At some point we will be writing what is left in blocks and when that is done I would like to see a situation here multiple sites could share the same retrieved files. I have a plugin that I do not have finished that might work for this... Hmmm....
    --

    --
    You can't grep a dead tree.
  • OK, maybe a bit ugly, but cool! It is elegant to actually reuse the database table and not to have to muck around synching different tables.
    --
    global = useless
  • this was the perfect solution for something I needed-- two sites that share the same stories, submissions, users, and comments, but have different templates, blocks, vars, etc.

    By symlinking all the users tables except users_index and by setting ex_topics and ex_sections for all users, we are able to exclude certain topics and sections from either of the two sites.

    I was really shocked at how easy it was.
    --
    global = useless
  • You may better explain what's "elegant" then in Computer Science, if this is elegant...
    --

    Check out the Slash in Italian Project [kenobi.it]