Redirect location after email confirmation

A place to discuss and receive support for the Web Auction application.

Redirect location after email confirmation

Postby leeue » Tue May 11, 2010 7:32 am

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
leeue
 
Posts: 11
Joined: Fri Oct 16, 2009 2:29 am

Re: Redirect location after email confirmation

Postby shannah » Tue May 11, 2010 9:53 am

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
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Re: Redirect location after email confirmation

Postby leeue » Tue May 11, 2010 11:32 pm

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
leeue
 
Posts: 11
Joined: Fri Oct 16, 2009 2:29 am

Re: Redirect location after email confirmation

Postby shannah » Wed May 12, 2010 10:40 am

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;
}
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Re: Redirect location after email confirmation

Postby leeue » Thu May 13, 2010 4:04 am

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
leeue
 
Posts: 11
Joined: Fri Oct 16, 2009 2:29 am

Re: Redirect location after email confirmation

Postby shannah » Thu May 13, 2010 8:22 am

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
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Re: Redirect location after email confirmation

Postby leeue » Fri May 14, 2010 4:45 am

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
leeue
 
Posts: 11
Joined: Fri Oct 16, 2009 2:29 am

Re: Redirect location after email confirmation

Postby shannah » Fri May 14, 2010 6:55 am

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.
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Re: Redirect location after email confirmation

Postby leeue » Fri May 14, 2010 8:25 am

Okay, I will have a look and try.
Thanks and best regards.
Erik
leeue
 
Posts: 11
Joined: Fri Oct 16, 2009 2:29 am


Return to Web Auction Discussion

Who is online

Users browsing this forum: Bing [Bot] and 2 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved