Author |
|
jeff Newbie
Joined: 11 March 2009 Location: Canada
Online Status: Offline Posts: 10
|
Posted: 11 March 2009 at 9:55am | IP Logged
|
|
|
Is there a way to redirect the logout link to
go to a different web page then the standard
login page? I can't find any way in the code
to do this.
Also, when I go to create a new mail and want
to use an address in my contacts by hitting
the "To" link it only pops up with double
quotes where the name should be. So if I have
three people in my contacts it will show three
lines like so:
""<>
""<>
Has anyone else had this problem?
|
Back to Top |
|
|
Andrew AfterLogic Support
Joined: 28 April 2006 Location: United States
Online Status: Offline Posts: 1189
|
Posted: 12 March 2009 at 6:37am | IP Logged
|
|
|
Quote:
Is there a way to redirect the logout link to go to a different web page then the standard login page? I can't find any way in the code to do this. |
|
|
File class.webmail.js, line ~598
Code:
LogOut: function (errorCode)
{
if (errorCode) {
document.location = LoginUrl + '?error=' + errorCode;
}
else {
EraseCookie('awm_autologin_data');
EraseCookie('awm_autologin_id');
document.location = LoginUrl + '?mode=logout';
}
}, |
|
|
replace with:
Code:
LogOut: function (errorCode)
{
var CustomLogOutUrl = 'http://www.afterlogic.com';
if (errorCode) {
document.location = LoginUrl + '?error=' + errorCode;
}
else {
EraseCookie('awm_autologin_data');
EraseCookie('awm_autologin_id');
document.location = CustomLogOutUrl + '?mode=logout';
}
}, |
|
|
Where CustomLogOutUrl is the URL redirect should be performed to.
The same for classic HTML version of the UI depends on the platform ASP.NET or PHP. Anyway, you can go to "Classic" folder and search for "Logout" string to locate all occurrences.
Quote:
Also, when I go to create a new mail and want
to use an address in my contacts by hitting
the "To" link it only pops up with double
quotes where the name should be. So if I have
three people in my contacts it will show three
lines like so:
""<>
""<>
Has anyone else had this problem? |
|
|
We've never faced such issue before. We've been unable to reproduce it on our installation. Please let us know exact name and version of the web browser you use. Also, try to reproduce the issue in WebMail Pro live demo.
Best regards,
Andrew
|
Back to Top |
|
|
jeff Newbie
Joined: 11 March 2009 Location: Canada
Online Status: Offline Posts: 10
|
Posted: 12 March 2009 at 8:35am | IP Logged
|
|
|
Thanks a lot, Andrew. The logout works great.
I went back and tried replicating this problem
and realized it only happens in Chrome.
Firefox and IE7 both display the contact
properly. So that isn't a big deal for me but
it might be of interest to you guys in case
you didn't know.
Also, I am using the Webmail Pro demo so that
is where it happened. I plan on purchasing it
this week, though, so thanks again for your
help with these issues.
|
Back to Top |
|
|
Igor AfterLogic Support
Joined: 24 June 2008 Location: United States
Online Status: Offline Posts: 6104
|
Posted: 13 March 2009 at 5:52am | IP Logged
|
|
|
Thank you for the info, though we've tested this in Chrome 2.0.160.0 and encountered no issues.
Regards,
Igor
|
Back to Top |
|
|
matthiask2 Newbie
Joined: 08 April 2009
Online Status: Offline Posts: 6
|
Posted: 08 April 2009 at 8:19am | IP Logged
|
|
|
hey guys!
i'm using webmail pro in an iframe, and now i want to redirect to another page than the login page, when logging out.
i tried to change the code as shown above (class.webmail.js) but when i logout no custom redirect happens.
i changed the customlogouturl to a simple "http://www.___.at" url and it hasn't got any effect.
do you have any idea what i'm doing wrong?
regards,
matthias
|
Back to Top |
|
|
Igor AfterLogic Support
Joined: 24 June 2008 Location: United States
Online Status: Offline Posts: 6104
|
Posted: 08 April 2009 at 2:53pm | IP Logged
|
|
|
We've just rechecked the code, it should work fine. Be sure to use the following line there (adding '?mode=logout' is unnecessary):
Code:
document.location = CustomLogOutUrl; |
|
|
However, the above fix works for AJAX mode only. If you use classic HTML mode ("basewebmail.php" instead of "webmail.php" in the URL), locate the following code in classic/class_toolbarpanel.php file (line ~127):
Code:
<a href="'.LOGINFILE.'?mode=logout" onclick="EraseCookie(\'awm_autologin_data\'); ... |
|
|
Replace the URL parameter to something like below:
Code:
<a href="http://yoursite.com/" onclick="EraseCookie(\'awm_autologin_data\'); ... |
|
|
Please note that new URL will be opened in the same document/iframe WebMail is placed to.
--
Regards,
Igor, AfterLogic Support
|
Back to Top |
|
|
malkolm Newbie
Joined: 26 February 2009 Location: Ukraine
Online Status: Offline Posts: 5
|
Posted: 09 April 2009 at 11:50am | IP Logged
|
|
|
For Lite version please
|
Back to Top |
|
|
matthiask2 Newbie
Joined: 08 April 2009
Online Status: Offline Posts: 6
|
Posted: 10 April 2009 at 2:12am | IP Logged
|
|
|
hey igor!
thank you very much for the quick reply!
it worked after a restart of my server.
as i mentioned i use an iframe. is it possible to redirect the logout so that it effects the outside of the iframe.
in other words: that parent site of the iframe notices that the logout inside the iframe happened?
regards,
matthias
|
Back to Top |
|
|
matthiask2 Newbie
Joined: 08 April 2009
Online Status: Offline Posts: 6
|
Posted: 10 April 2009 at 2:52am | IP Logged
|
|
|
i found a solution:
i replaced:
Code:
document.location = CustomLogOutUrl;
|
|
|
Code:
parent.location.href = CustomLogOutUrl; |
|
|
and this works great :)
regards,
matthias
|
Back to Top |
|
|
Igor AfterLogic Support
Joined: 24 June 2008 Location: United States
Online Status: Offline Posts: 6104
|
Posted: 10 April 2009 at 4:08am | IP Logged
|
|
|
Well, this fix would look similar to the one used for the Pro version. For AJAX version, modify class.webmail.js file (line ~590):
Code:
a = CreateChild(div, 'a'); a.href = LoginUrl + '?mode=logout'; a.innerHTML = Lang.Logout; |
|
|
so that it looks like:
Code:
a = CreateChild(div, 'a'); a.href = 'http://yoursite.com/'; a.innerHTML = Lang.Logout; |
|
|
With regard to classic HTML version, modify class_toolbarpanel.php (line ~67):
Code:
<a href="'.LOGINFILE.'?mode=logout">'.JS_LANG_Logout.'</a > |
|
|
so that it looks like:
Code:
<a href="http://yoursite.com/">'.JS_LANG_Logout.'</a> |
|
|
--
Regards,
Igor, AfterLogic Support
|
Back to Top |
|
|
Igor AfterLogic Support
Joined: 24 June 2008 Location: United States
Online Status: Offline Posts: 6104
|
Posted: 10 April 2009 at 4:12am | IP Logged
|
|
|
Good to hear, considering that it's exactly what I was going to suggest, but you were faster :) Anyway, if you need this to work in Classic HTML mode as well, you'll need to add target=_blank into <a href="... tag.
--
Regards,
Igor, AfterLogic Support
|
Back to Top |
|
|
matthiask2 Newbie
Joined: 08 April 2009
Online Status: Offline Posts: 6
|
Posted: 10 April 2009 at 4:38am | IP Logged
|
|
|
thanks so much for your help :)
i appreciate it a lot!
regards,
matthias
|
Back to Top |
|
|
Igor AfterLogic Support
Joined: 24 June 2008 Location: United States
Online Status: Offline Posts: 6104
|
Posted: 10 April 2009 at 2:23pm | IP Logged
|
|
|
Sorry, there was an error in my previous message: target should be _parent or _top, but not _blank of course.
--
Regards,
Igor, AfterLogic Support
|
Back to Top |
|
|
kjmiami23 Newbie
Joined: 25 June 2011 Location: United States
Online Status: Offline Posts: 28
|
Posted: 27 December 2011 at 7:01am | IP Logged
|
|
|
how do you do custom logout using iframe using 6.3.5?
what files do i change?
|
Back to Top |
|
|
Igor AfterLogic Support
Joined: 24 June 2008 Location: United States
Online Status: Offline Posts: 6104
|
Posted: 27 December 2011 at 9:38am | IP Logged
|
|
|
The first response is this thread should help, with few little changes; in particular, the file is called webmail.js now. And even though vars and functions are called a bit differently, the idea is still the same.
--
Regards,
Igor, AfterLogic Support
|
Back to Top |
|
|
kjmiami23 Newbie
Joined: 25 June 2011 Location: United States
Online Status: Offline Posts: 28
|
Posted: 30 December 2011 at 6:52am | IP Logged
|
|
|
I have added the code and it does not redirect in 6.3.5
I have tried all codes on this forum and does not work.
Any help
|
Back to Top |
|
|
Igor AfterLogic Support
Joined: 24 June 2008 Location: United States
Online Status: Offline Posts: 6104
|
Posted: 01 January 2012 at 11:58pm | IP Logged
|
|
|
I've modified LogOut function in js/common/webmail.js file (line ~1171) as follows:
Code:
LogOut: function (errorCode)
{
var LoginUrl2 = "http://localhost/mytestpage.php";
WindowOpener.closeAll();
var oDocument = (parent) ? parent : document;
if (errorCode) {
oDocument.location = LoginUrl2;
}
else {
Cookies.remove('awm_autologin_data');
Cookies.remove('awm_autologin_id');
oDocument.location = LoginUrl2;
}
}, |
|
|
Worked like a charm. It's important to clear browser cache upon making changes of such kind.
--
Regards,
Igor, AfterLogic Support
|
Back to Top |
|
|