Boardunity & Video Forum

Boardunity & Video Forum (https://boardunity.de/)
-   Boardunity-Talk (https://boardunity.de/boardunity-talk-f8.html)
-   -   Standalone Fotoalbum...? (https://boardunity.de/standalone-fotoalbum-t3825.html)

Scotty 20.12.2005 16:22

Standalone Fotoalbum...?
 
Kennt ihr da ein paar brauchbare Scripte für die eigene Homepage?

Folgende hab ich mir angeschaut: Coppermine, 4images und Menalto Gallery. Die sind mir aber zu überdimensioniert, ich brauch nur was für meine Fotos, auf diese ganzen Spielereien, wo andere sich auch registrieren und was hoch laden können, kann ich verzichten.

Sicher, man kann das alles abschalten oder so, aber es muss doch auch was gleichwertiges geben, ohne diesen kram?

Holztechniker 20.12.2005 18:25

Hi Scotty,
schau mal auf die Seite http://www.derletztekick.com/index.php?site=Galerien ob es so eine Gallerie sein soll??? Leider habe ich auf der Seite nicht gefunden ob man es runterladen kann, wenn du auch nichts findest würde ich Ihn mal anschreiben ob er ein Script benutzt, er ist sehr nett.

MfG

Michael Finger
Holztechniker

Scotty 20.12.2005 18:32

Na ja mir geht’s vor allem um das ACP, die reine Darstellung für die Geste ist ja kein Problem, das bekomme ich mit meiner jetzigen (eigenen) Lösung auch hin. Hmm, ich überleg auch ob ich nicht irgendwann auf ein CMS wie Joomla umsteigen sollte, da einige neue Projekte anstehen, wo so etwas angebracht wäre. Da gibt’s glaub ich ja solche Module?

Boardster 20.12.2005 18:36

Hallo Scotty :)

Lussomo Filebrowser schon getestet?

Hier eine Demo.

Scotty 20.12.2005 18:40

Danke, kenn ich noch nicht ;). Werde das mal ausprobieren…

Edit:
Habe da vorhin wohl nicht richtig gelesen (wieder mal), ist ein tolles Script, aber nicht das was ich suchte, das da kann auch nicht vielmehr als meine jetzige Lösung.

michi50 22.12.2005 07:12

ich finde gallery 2.0 sehr gut!
http://gallery.menalto.com
allerdings ist es ein sehr umfangreiches Standlone Fotoalbum!

Hier kannst du dier ein testalbum anschauen!
http://michi50.uttx.net/gallery2/main.php

Scotty 22.12.2005 14:44

Zitat:

Zitat von michi50
ich finde gallery 2.0 sehr gut!
http://gallery.menalto.com
allerdings ist es ein sehr umfangreiches Standlone Fotoalbum!

Hättest du dir Post1 durchgelesen, hättest du bemerkt, das ich mir diese Gallery schon angeschaut habe…

michi50 22.12.2005 15:16

Zitat:

Zitat von Scotty
Hättest du dir Post1 durchgelesen, hättest du bemerkt, das ich mir diese Gallery schon angeschaut habe…

Oh übersehen!

Scotty 22.12.2005 15:29

Die Menalto Gallery ist auch ziemlich aufgebläht, ehe man es via FTP oben hat, dauert es schon, so viele Dateien sind das, auch so ist es nicht besonders Fix. Wenn dann finde ich 4Images noch am besten, also von den oben erwähnten 3 Galeriescripten.

Coppermine hat auch viel zu viel Schnickschnack drin…

amroth 23.12.2005 09:00

Ich kann dir PhotoIt empfehlen: http://fruit-lab.de/index.php?site=download&subsite=10

Luki 23.12.2005 09:37

eventuell mal dieses Fotogallerie Script probieren?

MrNase 23.12.2005 10:42

Off-Topic:
Hinweis: Entweder Galerie oder Gallery aber niemals Gallerie ;)

Scotty 23.12.2005 18:31

Ich weiß ja auch nicht…

Kennt einer von euch ein einfaches Script (PHP), was möglichst nur in einer Datei ist, es muss auch nichts groß können, nur alle Fotos in einem Verzeichnis einlesen, daraus thumbs generieren und die dann bei der anzeige mit den originalen verlinken, gibt es da ein kleines Script/Snipped?

Edit
Hab da was gefunden, was sich "THEPICS lite version 1.6.1" nennt, nur die Website des Coders gibt es wohl nicht mehr, es funktioniert nirgends ein downloadlink…?

amroth 25.12.2005 13:05

vielleicht hilft dir das weiter, ist von mir ^^:
Code:

<?php
// VOREINSTELLUNGEN - anpassen
$bildordner="images/";        // Bilderverzeichnis
$thumbordner="thumbs/";        // Thumbnailverzeichnis
$spalten=6;                // Bilder pro Zeile also Spaltenanzahl
// ENDE de VOREINSTELLUNGEN

// Berechnungen und Darstellung

$i=$_REQUEST['i'];
$ansicht=$_REQUEST['ansicht'];

$dir = opendir($bildordner);
$endung = array('jpg','gif','jpeg');
while($datei=readdir($dir)){
  if(($datei!=".") && ($datei!="..")){
    if(in_array(substr($datei, -3), $endung)){
      $bilder[]=$datei;
    }
  }
}
closedir($dir);

$bilderzahl=count($bilder);                //auslesen der bilderzahl
$zeilen=ceil($bilderzahl/$spalten);        //errechnen und aufrunden der zeilen

if($ansicht==0){
        thumberstellung();
        thumbseite();
}
else{
        bildseite();
}

function thumberstellung(){

        global $thumbordner, $bildordner, $bilder, $bilderzahl;

        for($i=0; $i<=$bilderzahl; $i++){
                if(!file_exists($thumbordner.$bilder[$i])){
                        $bild=imagecreatefromjpeg($bildordner.$bilder[$i]); //erstellt ein abbild im speicher
                        $bildbreite = imagesx($bild);                      //die breite des bildes
                        $bildhoehe = imagesy($bild);                        //die höhe des bildes
                        $thumbmasse = 120;                                  //die höhe bzw breite des thumbnails
                        if($bildhoehe > $thumbmasse || $bildbreite > $thumbmasse){
                                $thumbhoehe = ($bildhoehe > $bildbreite) ? $thumbmasse : $bildhoehe/($bildbreite/$thumbmasse);
                                $thumbbreite = ($bildhoehe > $bildbreite) ? $bildbreite($bildhoehe/$thumbmasse) : $thumbmasse;
                        }
                        $thumb = imagecreatetruecolor($thumbbreite,$thumbhoehe);                                      //thumbnail im Speicher erstellen
                        imagecopyresized($thumb, $bild, 0,0,0,0, $thumbbreite, $thumbhoehe, $bildbreite, $bildhoehe); //bild in bhumbnail kopieren
                        imagejpeg($thumb,$thumbordner.$bilder[$i]);                                                  //Thumbnail speichern
                        imagedestroy($bild);                                                                          //Speicherabbild wieder löschen
                        imagedestroy($thumb);                                                                        //Speicherabbild wieder löschen
                }
        }
}

function thumbseite(){

        global $thumbordner, $bilder, $zeilen, $spalten, $bilderzahl;

        $i=0; //startwert des arrayzahl

        echo "<table cellpadding=\"0\" cellspacing=\"2\" align=\"center\">";
        for($x=1; $x<=$zeilen; $x++){
                echo "  <tr>\n";
                for($y=1; $y<=$spalten; $y++){
                        echo "    <td width=\"120\" height=\"120\" align=\"center\" bgcolor=\"#000000\">\n"; //spalteneröffung
                        if(file_exists($thumbordner.$bilder[$i])){
                                echo "      <a href=\"index.php?ansicht=1&i=$i\"><img src=\"$thumbordner$bilder[$i]\" border=\"0\">".$thumbordner.$bilder[$i]."</a>\n";
                                $i++; //arrayinhaltszahlerhöhung
                        }
                        else{
                                echo "";
                        }
                        echo "    </td>\n";
                }
                echo "  </tr>\n";
          }
        echo "</table>";
}

function bildseite(){

        global $i, $bildordner, $bilder, $bilderzahl;

        if($i-1<=-1){
                $bildzurück=$bilderzahl-1;
        }
        else{
                $bildzurück=$i-1;
        }
        if($i+1>=$bilderzahl){
                $bildvor=0;
        }
        else{
                $bildvor=$i+1;
        }

        echo "<table cellpadding=\"0\" cellspacing=\"2\" align=\"center\">\n";
        echo "  <tr>\n";
        echo "    <td align=\"center\">\n";
        echo "      <a href=\"index.php?ansicht=1&i=$bildzurück\">zurück</a>  <a href=\"index.php?ansicht=0\">ÜBERSICHT</a>  <a href=\"index.php?ansicht=1&i=$bildvor\">vor</a>\n";
        echo "    </td>\n";
        echo "  </tr>\n";
        echo "  <tr>\n";
        echo "    <td>\n";
        echo "      <img src=$bildordner$bilder[$i]>\n";
        echo "    </td>\n";
        echo "  </tr>\n";
        echo "</table>\n";
}
// Berechnungen und Darstellung - ENDE
?>


Scotty 25.12.2005 14:45

Hab jetzt mal doch das eine von oben gefunden und angepasst, ich hoffe mal ich hab’s nicht verschlimmbessert, so dolle ist es mit meinen PHP Kenntnissen nicht. Leider Existiert der Autor des ursprünglichen Scriptes nicht mehr, zumindest nicht mehr seine Seiten, aber das Script läuft immerhin unter der GPL ;).

http://www.e-hahn.de/grafik/fotoalbum/gallery.php

PHP-Code:

<?php
/*
THEPICS lite - a picture gallery generator
Copyright (C) 2001-2003
Website: http://d0x.codesociety.com/
Email: [email protected]

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
*/

/************ THEPICS lite CONFIGURATION ************/

// Name of your gallery
$subject "Gallery";

// Short description of your gallery.
$description "Thumbnailübersicht";

// How many images to output per row
$imagesPerRow 4;

// How many images to output per page
$imagesPerPage 32;

// Gallery sort order [ alpha | date ]
$sort "alpha";

// Height of each thumbnail
$thumbHeight 96;

// Width of each thumbnail. NOTE: Width takes precedence
$thumbWidth 128;

// Debugging
$showdebug "1";   //Set to "1" to show the page generation time
//error_reporting(E_ALL); //Uncomment this to show all warnings and errors.
//phpinfo();    //Uncomment this to display PHP info.


/************ END THEPICS lite CONFIGURATION ************/

$mtime explode(" "microtime()); //debug timer
$starttime $mtime[1] + $mtime[0];

//Styles
echo "<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.0 Transitional//EN'>
<html>
    <head>
        <title>www.e-hahn.de</title>
        <meta http-equiv='Content-Language' content='de'>
        <meta name='Autor' content='Enrico Hahn'>
        <meta name='Copyright' content='Copyright 2005 by Enrico Hahn.'>
        <meta name='Generator' content='Microsoft Visual Studio .NET 7.1'>
        <meta name='Language' content='Deutsch,German,de,at,ch'>
        <meta name='vs_targetSchema' content='http://schemas.microsoft.com/intellisense/ie5'>
        <meta name='Keywords' content='Enrico Hahn, Scotty, e-hahn, e-hahn Soft, DOTNET, VisualBasic, Neuruppin, Ostprignitz-Ruppin, Softwareentwicklung, VB .NET GUI-Design, Webdesign, Updater, Easy Desktop Note, StarTrek Infos'>
        <style type='text/css'>
    <!--
    a:active { text-decoration: none; color: #000080}
    a:link { font : Standert; text-decoration: none; color: #000080}
    a:visited { text-decoration: none; color: #000080}
    a:hover { text-decoration: underline; color: #000080}
    -->
        </style>
    <script type='text/javascript' src='gallery_popup.js'></script>
    </head>
    <body style='FONT-FAMILY: Arial, Verdana; TEXT-DECORATION: none' bgColor='#F7F5F2'>

<div align='center'><FIELDSET style='width: 680px'><LEGEND><STRONG>
$subject</STRONG></LEGEND>";

//Code
if (isset($_GET['pic'])) {
    
$picsdir preg_replace("/gallery.php/"""$_SERVER['SCRIPT_FILENAME']);
    
$dir opendir($picsdir);
    while (
$dirdata readdir($dir)) {
        if (
eregi("\.jpg"$dirdata)) {
            
$main[] = $dirdata;
            
$picdates[] = filemtime($dirdata);
        }
    }
    
closedir($dir);
    if(
$sort == "date") {
        
arsort($picdatesSORT_NUMERIC);
    }
    else {
        
natcasesort($main); //Sort pictures alphabetically
    
}
    
$pickey = ($sort == "date") ? array_keys($picdates) : array_keys($main);
    
$curPic array_search($_GET['pic'], $main);
    
$nextkey $pickey[0];
    while (
$nextkey != $curPic) {
        
$nextkey next($pickey);
    }
    
$nextkey next($pickey);
    
$page_next = ($pickey[$curPic] != count($main)-1) ? " <A href='gallery.php?pic={$main[$nextkey]}' title='nächstes Foto'><IMG src='http://www.e-hahn.de/grafik/showfoto_next.gif' border='0'></A>" "";
    
prev($pickey);
    
$prevkey prev($pickey);
    
$page_prev = ($curPic != $pickey[0]) ? "<A href='gallery.php?pic={$main[$prevkey]}' title='vorheriges Foto'><IMG src='http://www.e-hahn.de/grafik/showfoto_prev.gif' border='0'></A>&nbsp;&nbsp;" "";
    
// Make sure the file exists
    
if (file_exists($_GET['pic'])) {
        
$desc stripslashes(preg_replace("/.jpg/"""$_GET['pic']));
        echo 
"<TABLE id='Table_Fotoalbum_ShowFoto_Nav' width='640' align='center' border='0'>
              <TR>
                <TD align='center'><FONT size='2'>[ <A href='gallery.php'>
$description</A> ] - [ <A href='http://www.e-hahn.de/sonstiges/fotoalbum.php' title='Fotoalbum - Übersicht'>e-hahn.de - Fotoalbum</A> ]</FONT></TD>
                <TD align='right' width='200'><FONT size='2'>
{$page_prev}{$page_next}</FONT></TD>
              </TR>
              </TABLE>
              <IMG src=\"
{$_GET['pic']}\" border=\"1\" alt=\"$desc\" />";
    }
} else {
    
$rootdir preg_replace("/gallery.php/"""$_SERVER['SCRIPT_FILENAME']);
    
$picsdir $rootdir;
    
$thumbsdir $rootdir 'thumbs/';
    
$thumbpicssitedir 'thumbs/';
    
$numberofmainpics 0;
    
$dir opendir($picsdir);
    while (
$dirdata readdir($dir)) {
        if (
eregi("\.jpg"$dirdata)) {
            
$main[] = $dirdata;
            
$picdates[] = filemtime($dirdata);
            
$numberofmainpics++;
        }
    }

    
closedir($dir);

    
$actionlistfile $main//temp variables
    
$numberofactionpics $numberofmainpics;
    
// Get mainthumblistfile
    
$numberofmainpics 0;
    if (
file_exists($thumbsdir)) {
        
$dir opendir($thumbsdir);
        while (
$dirdata readdir($dir)) {
            if (
eregi("\.jpg"$dirdata)) {
                
$mainthumbs[] = $dirdata;
            }
        }
        
closedir($dir);
    } else {
        if (!@
mkdir($thumbsdir0777)) {
            echo 
"Error: Did you CHMOD the installation directory to 777 ?<BR />";
        }
    }

    
$counter 0;
    
$createdhowmanymain 0;
    
$createdhowmanyaction 0;
    foreach(
$main as $mainpic) {
        if (!@
in_array($mainpic$mainthumbs)) {
            
$createmainthumbs[$counter] = $mainpic;
            
$createdhowmanymain++;
            
$counter++;
        }
    }
    
// Find out if we need to create thumbnails or not
    
if ($createdhowmanymain 0) {
        foreach(
$createmainthumbs as $createmain) {
            
makethumb($picsdir $createmain$thumbsdir $createmain$thumbWidth$thumbHeight);
        }
    }

    if (
$description != "") {
        
$showDescription "<FONT size='2'><STRONG>$description</STRONG> ( <FONT color='#800000'>$numberofactionpics</FONT> Fotos )</FONT><BR /><BR />";
    }
    
// The follow lines control the Gallery Header.
    
echo "$showDescription
         <FONT size='2'>[ <A href='http://www.e-hahn.de/sonstiges/fotoalbum.php' title='Fotoalbum - Übersicht'>e-hahn.de - Fotoalbum</A> ]</FONT>"
;

    
// Set inital row and column counts to 1
    
$actionrow 1;
    
$actioncol 0;
    if(
$sort == "date") {
        
arsort($picdatesSORT_NUMERIC);
    }
    else {
        
natcasesort($actionlistfile); //Sort pictures alphabetically
    
}
    
$pickey = ($sort == "date") ? array_keys($picdates) : array_keys($actionlistfile);
    echo 
'<TABLE>';
    
$multiPage "";
    
$totalpages ceil($numberofactionpics $imagesPerPage);
    
$_GET['page'] = isset($_GET['page']) ? $_GET['page'] : 0;
    if (
$totalpages 1) {
        if ((
$numberofactionpics $_GET['page']) <= $imagesPerPage) { // no next page
                
$page_next "<IMG src='http://www.e-hahn.de/grafik/showfoto_next.gif' border='0'>";
        } else {
            
$nextpage $_GET['page'] + $imagesPerPage;
            
$page_next "<A href='gallery.php?page={$nextpage}' title='nächste Seite'><IMG src='http://www.e-hahn.de/grafik/showfoto_next.gif' border='0'></A>";
        }

        
$thepages "";
        for(
$temp 0$temp $totalpages$temp++) {
            
$gotopage $temp $imagesPerPage;
            
$temp_pagenum $temp 1;

            
$thepages .= ($_GET['page'] == $gotopage) ? "<STRONG>{$temp_pagenum}</STRONG> " "<a href='gallery.php?page={$gotopage}'>{$temp_pagenum}</a> ";
        }

        if (
$_GET['page'] == 0) { // no prev page
                
$page_previous "<IMG src='http://www.e-hahn.de/grafik/showfoto_prev.gif' border='0'>";
        } else {
            
$previouspage $_GET['page'] - $imagesPerPage;
            
$page_previous "<A href='gallery.php?page={$previouspage}' title='vorheriges Seite'><IMG src='http://www.e-hahn.de/grafik/showfoto_prev.gif' border='0'></A>";
        }

        
$multiPage "<FONT size='8'>{$page_previous} {$thepages} {$page_next}</FONT>";
    }

    if ((
$_GET['page'] + $imagesPerPage) > $numberofactionpics) {
        
$imagesPerPage $numberofactionpics $_GET['page'];
        
$imagesPerPage $imagesPerPage $imagesPerPage $numberofactionpics;
    }
    
// Output the actual images
    
for($x $_GET['page']; $x < ($_GET['page'] + $imagesPerPage) ; $x++) {
        if (
$actioncol == 0) {
            echo 
'<TR>';
        }

        
$sizetemp preg_replace("/ /""%20"$actionlistfile[$pickey[$x]]);
        
$picname addslashes($sizetemp);
        
$desc preg_replace("/.jpg/i"""$actionlistfile[$pickey[$x]]);
        
$sizer $picsdir $sizetemp;
        
$openPic "<a href=\"gallery.php?pic=$picname\"";
        echo 
'<TD align="center" style="width: 150px">
                 <A '
$openPic '><img src="thumbs/'$sizetemp '"border="1" alt="'$desc'" /></A></TD>';
        
$actioncol++;
        if (
$actioncol == $imagesPerRow) {
            
$actioncol 0;
            echo 
'</TR>';
        }
    }

    echo 
"<TR><TD colspan='{$imagesPerRow}' align='center'>$multiPage</TD></TR></TABLE>";
    
$mtime explode(" "microtime());
    
$totaltime round((($mtime[1] + $mtime[0]) - $starttime), 5);
    
$debug "";
    if (
$showdebug == 1) {
        
$debug "Diese Thumbnailgallery wurde in {$totaltime} Sekunden erzeugt.";
    }
}
// Version info
$debug = isset($debug) ? $debug "";
echo 
'<FONT size="2">'$debug'</FONT>

  </FIELDSET>
</div>

    </body>
</html>'
;

function 
makethumb($image$filename$newwidth$newheight)
{
    
$imagequality 70;
    
$size getimagesize($image);
    
$ratio $newwidth $newheight;
    if (
$im = @imagecreatefromjpeg($image)) {
        if (
$newheight && ($size[0] < $size[1])) {
            
$newwidth = ($newheight $size[1]) * $size[0];
        } else {
            
$newheight = ($newwidth $size[0]) * $size[1];
        }
        
$im2 imagecreatetruecolor($newwidth$newheight);
        
// Version Dependant setting
        // imageantialias($im2, TRUE);   //for PHP 4.3.2 and up only
        
imagecopyresized($im2$im0000$newwidth$newheight$size[0], $size[1]);

        if (@
imagejpeg($im2$filename$imagequality)) {
            return 
true;
        } else {
            echo 
"Error: Did you CHMOD the installation directory to 777 ?<BR />";
        }
    }
    echo 
"Error: Thumbnail creation failed for <STRONG>{$filename}</STRONG>. Is the original picture corrupted?<BR />";
    return 
false;
}

?>


Jens* 26.12.2005 13:28

Oder http://www.airtightinteractive.com/simpleviewer/

Frohe Weihnachten....

Jens

Scotty 26.12.2005 13:41

Ach na ja, solche Flashspielereien mag ich auf der eigenen Homepage eigentlich gar nicht, so richtig anpassen kann man das auch nicht. Da könnt ich dann auch den kram von 1&1 nutzen, ist fast dasselbe ;).


Alle Zeitangaben in WEZ +1. Es ist jetzt 13:19 Uhr.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25