ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

EE return function

June 26, 2007 4:17pm

Subscribe [2]
  • #1 / Jun 26, 2007 4:17pm

    hothousegraphix

    851 posts

    I’ve seen discussions about the technique of using multiple login forms each having it’s on “return” so that in situations where a password protected page is necessary, a form exists for that occasion that will send the user to the requested area after logging in (rather then returning them to the page that the login form was called from). I get this process.

    Has anyone used/created/found a technique within EE that uses a variable for this purpose, passed from the href calling the login that tells the form where to go after validation?

  • #2 / Jun 26, 2007 4:28pm

    Derek Jones

    7561 posts

    Well, you can certainly use some types of variables as tag parameters (path.php globals, dynamically assigned variables, PHP on Input, plugins, etc.), so yes, it’s possible.  Have you tried any of those options?  Where and how do you anticipate this variable to be defined?

  • #3 / Jun 26, 2007 4:59pm

    hothousegraphix

    851 posts

    Well, you can certainly use some types of variables as tag parameters (path.php globals, dynamically assigned variables, PHP on Input, plugins, etc.), so yes, it’s possible.  Have you tried any of those options?  Where and how do you anticipate this variable to be defined?

    Hey Derek, how are you?

    Well, at this point I’ve not attempted to apply any type of solution. Just sort of thinking out-load. The reason for thinking about this is that I’m providing users to this site the ability to contribute to the organizations calendar via an SAEF. To limit access to this feature I’m requiring users to login to this site. All fairly standard stuff. What complicates this is that my current login form is contained in a hidden div and accessed via an ajaxy sort of process that emulates the lightbox effect. Providing a second login form but maintaining the same login process for consistency sake would either, necessitate the addition of a second hidden div that contains a second hidden login form whose return path is this only thing that differs from the first form, or use of a variable. I’m not too sure the first option seems that efficient which is why I’m looking at the variable option.

    More specifically, this variable would be called onclick of my addEvent link which is where I call my show function to expose the login form. Just not sure how I’d pass the variable to the EE tag.

    The other concern I would have is that I don’t want to destroy the current (default/designed) return functionality just to accommodate this one situation. I think I could avoid doing this with a simple conditional testing for the presence of a global variable.

    I hope this all makes sense.

  • #4 / Jun 26, 2007 5:11pm

    Derek Jones

    7561 posts

    If the variable comes from the client, then an extension or system modification would be required, unless that information is available before the form is rendered for the user.  You cannot alter tag parameters based on javascript, as ExpressionEngine will be far out of the equation by the time any HTML and Javascript is presented to the user.  So if the link that calls this form via AJAX includes the template for the return path either as a URL segment or POST data, then yes, the target template that the AJAX is calling can use that information in the return= parameter.

  • #5 / Jun 26, 2007 5:50pm

    hothousegraphix

    851 posts

    Though I’m not really making a real ajax request for the form as it’s already embedded in my page, but with it’s display property set to none (removing it from the flow of content) so it’s not visible, I’m going to guess that the function used to expose/center the login form is not going to be sufficient for passing the target template as it’s not passing a URL or POSTING anything.

    ...so I’m probably looking at a second login form.

    Thanks

  • #6 / Jun 26, 2007 5:51pm

    Derek Jones

    7561 posts

    Nope, you’d need a Javascript triggered load of the form, whether that be AHAH, AJAX, IFRAME (::shudder::), or what have you.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases