Popup of login window when directlinking to passworded album

libresse

Joined: 2003-05-14
Posts: 1
Posted: Wed, 2003-05-14 20:01

I've just started to use Gallery and it's nice.

However I almost directly missed one feature and that is if I send a link to some friends of a new album e.g.
www.myowngallery.com/newablum
I'd like gallery to popup the login screen directly and after succesful login taken the user directly to the newalbum and not to the album "root" for that user. That way users don't have to browse between a lot of old albums and newcomers to gallery doesn't really need to search for the login link to find the album I've referred to.
The same thing goes for a direct link to an image.

Is this in the pipe? Possible?

/L

 
rjblanch

Joined: 2003-04-28
Posts: 4
Posted: Thu, 2003-06-05 21:31

I am basically looking for the same thing but i wish to have the direct login for any page. This would mean that every user would have their album seperate and not know that I am hosting other users albums.

I am currently working on a hack that will enable a direct link to the page with a seperate "pop-up" window to let them login and carry over to the session without ever seeing the main index page.

 
rjblanch

Joined: 2003-04-28
Posts: 4
Posted: Sun, 2003-06-08 12:38

Hi libresse,

I have been working on a direct link and I think this is what you may be after....
The direct link for the album is http://www.teethingring.com/gallery/view_album.php?set_albumName=CharlotteRose and the login screen comes up for you to login. Just hit cancel so that you are a visitor. I have included a pop up window with the login.php page that is in the settings of view_album.php.

The code is not pretty but it works.

if (!$GALLERY_EMBEDDED_INSIDE) {
	if ($gallery->user->isLoggedIn()) {
	        $adminCommands .= "<a href=" .
					doCommand("logout", array(), "view_album.php", array("page" => $page)) .
				  ">[logout]</a>";
	} else {
		$adminCommands .= '<a href="#" onClick="'.popup("login.php").'">[login]</a>';
		?>
 <script language="JavaScript" type="text/JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//-->
  </script>
</head>

<body onLoad="MM_openBrWindow('login.php','login','width=500,height=610')">

I suppose you could do the same for the main index.php page in the root directory.

Give it a go and let me know if this is what you were looking for....

Thanks