Skip navigation
Currently Being Moderated

content on login for the forum

Jun 5, 2012 9:33 AM

Tags: #jquery #javascript #web_apps #classifications

I built a login form for the forum into the dynamic menu for my site, so that when you select 'forum' from the menu, you can log in directly.

 

What I would like to do is be able to tell when they're logged in already and, if so, have that submenu show a topics list or something (currently it still shows the login even after they're already logged in.) Is there a way to get a forum logged in status that I can add to a template to do this? The only other idea I have would be to call the forum page by ajax and parse the html (which would be different for logged in users as not) but that would be ugly.

 
Replies
  • mattdwm
    181 posts
    Sep 6, 2010
    Currently Being Moderated
    Jun 18, 2012 11:46 AM   in reply to kenneth_rapp

    Did you ever figure this out? I need to do something similar.

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 15, 2012 6:24 AM   in reply to kenneth_rapp

    Why not use the module that shows if you are logged in or not?

     

    {module_isloggedin}

     

    It will show 1 if logged in 0 if not.

     
    |
    Mark as:
  • Currently Being Moderated
    Oct 30, 2012 9:22 AM   in reply to tmikaeld

    I have used the module_isLoggedIn, but find that is shows 1 if I am logged in to any area. Do you know of a way to ask if user is logged into a specific zone? Thanks for any insight.

    Janice

     
    |
    Mark as:
  • Currently Being Moderated
    Oct 31, 2012 12:19 AM   in reply to jymcconn

    I am afraid at the moment there is no way to "tell" which secure zone a CRM contact is logged into out of the box, as you notived the module_isLoggedin can only be used to determine whether the current user is logged in or not.

     

    This is what I was thinking though, imagine this setup:

     

    -2 login forms for 2 different secure zones

    -the secure zones have 2 blank landing pages that will act as proxies (let's call them proxyA.html and proxyB.html), will detail this further below

    -on either page put a javascript snippet that redirects the site visitor to the page you need them to be redirected after logging in (let's call it pageA.html) and adds a query parameter in the URL

    -on pageA.html you will need to have a javascript snippet that reads the parameter in the URL and does something based on its value. Basically at this point based on the parameter in the URL you can tell which secure zone form the site visitor used to login

     

    In this setup you basically use the proxy pages to "mark" the URL with a parameter you can later use to link that site visitor to the secure zone form he used to login.

     

    What do you think, would this type of setup be useful?

     
    |
    Mark as:
  • Currently Being Moderated
    Oct 31, 2012 10:23 AM   in reply to Mihai_Tica

    Yes, it helped. I'm submitting a booking form with an associated web app item form using ajax. I needed to differentiate between member logged in and anonymous logged in so I could test and not log out a member. Thanks to another thread, I saw that if the web app is in the secure member zone, then a member doesn't need the anonymous log in.

    I have had some intermittent problems with the web app item not submitting - can't find a pattern to pin down the cause. On Monday, 2 of 7 bookings didn't have the associated web app item created. Thanks for the help.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points