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.

Log in from front (discussions) page?

Hey! Anyone know how to put a log-in box on the front page? I.e. showed on the discussions page when people are not logged in. After log-in, the discussions page would get refreshed and the users would never have to see a superflous separate log-in page. Can I just include the boxes from the log-in page somewhere, somehow?
«1

Comments

  • edited June 2006
    The Add Comments addon allows you to log in from the discussion display.

    http://lussumo.com/addons/?PostBackAction=AddOn&AddOnID=1
  • Thanks - but that's not really what I'm looking for. I don't necessarily want to add a comment, I just want to log in from the discussions page. I simply want to put a log-in box under the Guest Welcome message (which uses an addon).
  • Bergamot did it, ask him.
  • Thanks Mini! Will do.
  • edited June 2006
  • Whoa that was QUICK! It all works fine, but I get an error message: Notice: Undefined index: Username in /hsphere/local/home/tools/tools.web.surftown.se/storaa/forum/extensions/Guest Sign-In/default.php on line 20
  • Also, would it be possible to make pressing the logout button send you back to the discussions page as well? Perhaps this should be accomplished some other way (i.e. not though the add-on)
  • Thanks alot WallPhone. I installed without any issues. :)
  • My eventual plan is to remove the standard log-in/log-out alltogether. However, I think doing that means the user won't have a log-out link any more! A neat way would be: If not logged in: show log in boxes in panel. Clicking sends you to the same page you logged in from. If logged in: show "you're logged in as..." + log-out link in the panel. Clicking sends you to the same page you to the discussions page. This way, the standard log-in/out pages could vanish completely. (although the existing way is a very good already!)
  • That error message is odd... its trying to get the user name definition direct from the dictionary, like it does for everything else... double checked my spelling and case and it appears OK.

    I did fix one bug, however--the last line AddStylesheet() has the wrong path. Not a biggie, but it looks better with a proper stylesheet.

    I also put it in a folder so its named as intended.
  • If its any help: the error shows on every page, see it in my forum at: http://www.tools.web.surftown.se/storaa/forum/
  • OK some troubleshooting shows it has to do with the language file: the problem doesn't show up when I set the language to English. Must eat now, will look into this later!
  • Problem solved: "Username" was missing from the Swedish language file: it all works now that I've added it.
  • @WallPhone: The add-on links to the CSS from the GuestWelcome add-on. But this is a very minor issue indeed.
  • Now you know how I got it done so quickly: I 'borrowed' 90 percent of my code from that add-on. Should be fixed now.
  • It would be nice if the Guest Welcome Message extension could be combined with the extension you just added WallPhone.
  • edited June 2006
    I could copy a bit more text from that extension into it... but then it would require some hand-editing for any language change.

    Heh, I noticed the Please sign in text is not pulled from the dictionary... It could be.

    Well, lets have a vote:
    1. Always pull from the default dictionary--compatible with most any language pack.
    2. Add additional text similar to the guest welcome extension--requres additional translation work for other languages.
    I will program it either way (or both?) depending on the votes.
  • I vote for customised! Tweaking is nice!
  • Customised would be my preference.
This discussion has been closed.