Ich habe mich mal dran versucht und bin folgenden Weg gegangen:
Ich habe $enable_external_privategal_login=true gesetzt und dann die mod_twg.php so abgeändert, dass das Standardpasswort in die variabele an den link zur Galerie angehängt wird.
Code:
<?php
/**
*/
// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );
global $mainframe;
$my = $mainframe->getUser();
if (isset($my) && isset($my->username) && $my->username != "") {
$_SESSION["s_user"] = "PASSWORT"; //ÄNDERUNG
}
$link = $params->get( 'link' );
$sizex = $params->get( 'sizex' );
$sizey = $params->get( 'sizey' );
$scrollbar = $params->get( 'scrollbar' );
$addalbum = $params->get( 'addalbum' );
$scroll = " SCROLLING=NO ";
if ($scrollbar) {
$scroll = "";
}
if ($addalbum == '1' && isset($_SESSION["s_user"])) {
// maybe a parameter is already there then we append with & otherwiese with ?
$link .= ((strpos($link , '?') === false) ? '?' : '&') . "twg_private_login=" . urlencode($_SESSION["s_user"]);
} //ÄNDERUNG twg_album durch twg_private_login ersetzt
fixSession();
echo '<iframe name="twg_iframe" FRAMEBORDER="0" allowtransparency=true
src="' . $link . '" width="' . $sizex . '" height="' . $sizey . '" ' . $scroll . '></iframe>';
/*
This is needed because twg needs the session variables right away. To avoid
timing problems I write the session and reload it again!
*/
function fixSession() {
ob_start();
// this is a fix if session are not saved and passed to the config.php
$HTTP_SESSION_VARS = $_SESSION;
session_write_close();
ini_set('session.save_handler', 'files');
session_start();
$_SESSION = $HTTP_SESSION_VARS;
session_write_close();
ob_end_clean();
// end fix ;).
}
?>
So können alle registrierter User auf geschützte Galerien zurgreifen.
Jetzt muss ich das ganze noch als Komponente machen, damit auf der Seite nur die Galerie und sonst nix dargestellt wird.
Gruß Daniel