I Want Candy: CP Logoff Script

If you have a program or script that you'd like to give away or sell, this is the place to do it. All offers should include contact info.

Moderators: BBear, theunknownhost, flaguy

Post Reply
anykey
Nothing better to do.
Posts: 208
Joined: Sat Aug 28, 2004 5:33 pm

I Want Candy: CP Logoff Script

Post by anykey » Mon Sep 20, 2004 2:11 pm

Hello,

Every now and then a client asks why there is no "Log Off" button in the Control Panel. I've given the matter some thought, and figure there are a few ways to effect the bahavior of logging out of the CP (via JavaScript, onClick, for example).

What I am wondering is if and how other AlaHosts have implemented a Log Off feature?

Many thanks,
Erica

User avatar
crashdump
Hard Drive Crasher
Posts: 950
Joined: Thu Oct 17, 2002 5:44 pm
Location: Virginia

Post by crashdump » Mon Sep 20, 2004 2:13 pm

Erica,

I don't think this is possible for us to implement gracefully. Only ala could ad an integrated logoff button built into the cp.

The best way we could do it i think is to create a logoff icon, which would just be a javascript which would alert the user that the browser is closing.

I also get frequent complaints about not having a logoff button.
Last edited by crashdump on Wed Oct 06, 2004 9:05 pm, edited 1 time in total.

sixpackmx
Hard Drive Crasher
Posts: 640
Joined: Fri Nov 01, 2002 9:44 am
Location: Mexico City, Mexico

Post by sixpackmx » Mon Sep 20, 2004 2:38 pm

Hostspring, Erica,

I've able to to this, is very easy. I'll search the code when our servers are back online :-(



Best wishes
Last edited by sixpackmx on Tue Sep 21, 2004 3:34 am, edited 1 time in total.

anykey
Nothing better to do.
Posts: 208
Joined: Sat Aug 28, 2004 5:33 pm

Post by anykey » Mon Sep 20, 2004 2:41 pm

Thanks, Bill.

I appreciate the input. If I come up with anything halfway graceful, I'll be sure to share. :o).

I am toying with placing the JS next to/above the "Control Panel" link in the top frame, but I agree that that'll be tricky, much trickier than the button solution you describe.

My best,
Erica

anykey
Nothing better to do.
Posts: 208
Joined: Sat Aug 28, 2004 5:33 pm

Post by anykey » Mon Sep 20, 2004 3:04 pm

Thanks, sixpackmx, that sounds great...

Yes- I am trying to say busy and distracted so that the stress acid doesn't eat a hole in my stomach lining.
:o

Looking forward to the User Conference.

The Alabanza User Conference... More Fun Than an Emergency Power Outage and No Backup Generator (tm)

My best,
Erica

sixpackmx
Hard Drive Crasher
Posts: 640
Joined: Fri Nov 01, 2002 9:44 am
Location: Mexico City, Mexico

Post by sixpackmx » Tue Sep 21, 2004 3:43 am

Here you go:

I did this for a reseller, it should be OK with normal accounts also:

In the "Name of Link to Main Menu" section use the following:

Code: Select all

<font face=Verdana size=2 style=color:#FFFFFF>[Menu Principal]</a>  </font><br><a href=/cptools/logout.php target=_top style=color:#FFFFFF><font face=Verdana size=2 style=color:#FFFFFF>[Cerrar Sesión]</font>


My logout.php webpage is similar to the webmail's logout script, asks for confirmation or has a Window.close javascript. (Well actually is not similar, it's practically a rip off, LOL)

The cptools directory is an Apache alias I created where I put our custom scripts in order to not populate the default Control Panel path with the mix of Ala's scripts and our scripts. Just point it out to somewhere in your server. I use PHP to gather statistics of logouts against logins.

User avatar
spiderweave
Nothing better to do.
Posts: 388
Joined: Fri Jun 13, 2003 7:42 pm
Location: East Stroudsburg, PA
Contact:

Pretty Good

Post by spiderweave » Sun Apr 17, 2005 3:37 am

I have this working and it is working pretty good for us.

thedude
Alahosts.com-Newbie
Posts: 2
Joined: Sun Jun 26, 2005 2:24 pm

Post by thedude » Sun Jun 26, 2005 2:41 pm

You might note that if the user has multiple browser windows open, and the logout only closes the current browser, the user won't be 'logged out'. You might want to place that note on the logout notification.

dmatthewsbnd251

Post by dmatthewsbnd251 » Mon Feb 06, 2006 9:27 am

At this time, Internet Explorer is the only browser with an authentication cache clearing method. This does some simple browser testing and will print a link when IE is detected to clear the auth cache.

DSM Main Menu -> Control Panel Administration -> Control Panel Text

In "Description of Link to Main Menu" fields, add this where you would want a logout link.


This is an excellent contribution but unfortunately, we don't allow server side alteration code to be posted in the public area. I've posted the results in the following private forum:
http://www.alahosts.com/phpBB2/viewtopic.php?p=21742
. My apologies to the author and I look forward to your contributions in the private area.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest