Page 1 of 1

Redirect location after email confirmation

PostPosted: Tue May 11, 2010 7:32 am
by leeue
I am integrating an auction in my joomla site. Wrapping works fine and quite nice results so far.
After user registration, a confirmation mail is send, and after clicking the confirm link the user is redirected to a 'plain' auction window, outside the joomla site. Is there a way to avoid this, and get him to the wrapped auction?
If not, can I skip the confirmation proces?

Thanks for any reply.
Erik

Re: Redirect location after email confirmation

PostPosted: Tue May 11, 2010 9:53 am
by shannah
There are a few ways that you can go. One option might be to implement the after_action_activate method in the application delegate class and have it redirect to any page of your choice. Note that you may need to update to a newer xataface in order for this to work. The xataface distributed with web auction is a little older and may not have this trigger.

Steve

Re: Redirect location after email confirmation

PostPosted: Tue May 11, 2010 11:32 pm
by leeue
Hi Steve. Thanks. Upgrading to vs. 1.2.2 was a good idea. This also helped me to get rid of a 'htmlspecialchars' error.
But ... what did you mean with implementing an "after_action_activate method "? Can I see an example of some code somewhere?
Thanks again!
Erik

Re: Redirect location after email confirmation

PostPosted: Wed May 12, 2010 10:40 am
by shannah
In your application delegate class (i.e. conf/ApplicationDelegate.php):
Code: Select all
function after_action_activate(){
     // This function is called after the email activation successfully completes
    // Let's redirect somewhere else...
    header('Location: http://example.com/path/to/my/page');
    exit;
}

Re: Redirect location after email confirmation

PostPosted: Thu May 13, 2010 4:04 am
by leeue
Thanks for your reply!
I used:
Location: http://www.mydomain.com/veiling/index.p ... &Itemid=54
AND
Location: http://www.mydomain.com/veiling
AND
Location: http://www.mydomain.com/veiling/

But in all cases the redirect is:
http://www.mydomain.com/veiling/auction ... +logged+in.

This is still the "full" auction window, outside my site.
I tried the code in between other functions in the 'ApplicationDelegate.php' file, and in the top as well.

What could I have done wrong?
Thanks for your help!
Erik

Re: Redirect location after email confirmation

PostPosted: Thu May 13, 2010 8:22 am
by shannah
Sorry... I hadn't realized that the after_action_activate hadn't made it into a release yet. If you copy the activate action from SVN into your copy of xataface it should work.

E.g. Download this http://weblite.ca/svn/dataface/core/tru ... tivate.php

And replace your current dataface/actions/activate.php file with it.

-Steve

Re: Redirect location after email confirmation

PostPosted: Fri May 14, 2010 4:45 am
by leeue
Hi Steve,

Thanks a lot. This works great.

One thing is that with overwriting the old dataface files/folders structure, I lost some hacks. For example, I commented out some code to hide the 'My Profile', 'Control Panel', 'Export XML' and 'RSS' links in the user profile. But I didn't know anymore the files/locations I edited......
Maybe there is a better way to recover this. Maybe by changing or adding some 'widget' code like

[widget_name]
visibility: = hidden

?

If not I will use my former 'trial & error' commenting out method.

Thanks again!
Erik

Re: Redirect location after email confirmation

PostPosted: Fri May 14, 2010 6:55 am
by shannah
You should be able to do most things without having to change any of the xataface code. Either by using preferences to hide certain sections of the UI, or blocks and slots to replace other sections of the UI, or using the actions.ini to override and hide actions.

Re: Redirect location after email confirmation

PostPosted: Fri May 14, 2010 8:25 am
by leeue
Okay, I will have a look and try.
Thanks and best regards.
Erik