Php photo gallery TWG | JFUploader | TWG Flash upload | WFU | Forum

Get help for TinyWebGallery, the best image gallery. The forum is also home for the Joomla JFUploader, TWG Flash Uploader and the Wordpress flash uploader.
It is currently 23. Feb 2026, 21:38

This forum is readonly now. Please use the new forum if you don't find the answer to your question here. The new forum is at https://www.tinywebgallery.com/blog/forum/


All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: 27. Jul 2009, 12:09 
Offline

Joined: 23. Nov 2005, 18:58
Posts: 7
Ich habe TWG in meine Joomla Seite eingebunden. Nun gibt es einige Galerien, die ich schützen möchte.

Gibt es eine möglichkeit, dass bei einem eigelockten user in Joomla automatisch die geschützen verzeichnisse freigegeben werden wenn dieser die galerie aufruft??

Habe schon die how to's gelesen und denke es müsste gehen, komme aber nicht ganz zum ziel

Gruß Daniel


Top
 Profile  
 
 Post subject:
PostPosted: 27. Jul 2009, 16:33 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
Das geht nicht wirklich. Man kann den Multi root mode (howto 52) verwenden, welcher in die richtung geht.

Das müstest du selbst erweitern. Ein module für Joomla hab ich ja schon, welches einige Sachen setzt. Da müste man ansetzen.

Ich hab das auch auch meiner TODO Liste Joomla und TWG etwas weiter zu integrieren, ber einfach zu wenig Zeit dafür.

- Michael


Top
 Profile  
 
 Post subject:
PostPosted: 28. Jul 2009, 16:49 
Offline

Joined: 23. Nov 2005, 18:58
Posts: 7
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) ? '?' : '&amp;') . "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


Top
 Profile  
 
 Post subject:
PostPosted: 28. Jul 2009, 23:26 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
aber bei dir must du dann das passwort gleich dem benutzernamen haben.

gibts for joomla 1.6 kein mosmodule mehr?

Wenn du ne Komponente baust, dann wäre es toll, wenn du dir mir schicktst. Ich include die dann in den download.

- Michael


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
powered by phpbb | Datenschutz/ Privacy policy