Member
Member
h07d0q   2010-01-19, 21:54
#1

Hey guys,

i'm trying to implement the single_login.php hack into my 1.2.8_RC1 [4837].
this is my code:
`

  • Of course, modify the style of this script to fit your needs.
    */

if (!defined('ZENFOLDER')) { define('ZENFOLDER', 'zp-core'); }
/if (!file_exists("http://". $_SERVER['HTTP_HOST'].dirname($_SERVER['SCRIPT_NAME']) . "zp-data/zp-config.php")) {
$location = "http://". $_SERVER['HTTP_HOST'].dirname($_SERVER['SCRIPT_NAME']) .
"/" . ZENFOLDER . "/setup.php";
header("Location: $location" );
}
/define('OFFSET_PATH', 0);
require_once(ZENFOLDER . "/template-functions.php");
require_once(SERVERPATH . "/" . ZENFOLDER . "/" . PLUGIN_FOLDER . "/" . 'user_login-out.php');
if (!is_null($_zp_current_admin)) {
if ($_zp_loggedin & ADMIN_RIGHTS) {
header("Location: " . WEBPATH . "/");
} else {
$albums = getManagedAlbumList();
$album = array_shift($albums);
header("Location: " . WEBPATH . "/".$album.'/');
}
}
header ('Content-Type: text/html; charset=' . getOption('charset'));
?>

Zenphoto Single_login

`
if i log in with any user, i'm redirected to "/index.php?userlog=1&p=" and if i reload the page with the integrated script (now the cookie is set), it redirects to the right album. the script is in the root folder an the index.php with the include function is in root/1/index.php
i want the script to redirect directly to the album after the login. How can i do this?

Member
Member
sbillard   2010-01-20, 04:37
#2

You will need to call the printPasswordForm() function directly. printUserLogin_out() was intended to be used from within the zenphoto structure.

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.