GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Looking for a simple photo gallery script... (https://gfy.com/showthread.php?t=992189)

kektex 10-12-2010 06:58 PM

Looking for a simple photo gallery script...
 
I'm looking for a simple photo gallery script that will take folders full of pics and just turn them in to photo galleries.

I have many (over 1000) photos in various folders in my server and I want to turn these folders in to photo galleries. Nothing fancy, this is not even gonna be a public site, it's just so I can see what content I have available.

Stef. 10-12-2010 07:10 PM

jalbum.net looks really nice. don't know if it's what you are looking for?
.

kektex 10-12-2010 07:14 PM

I actually need a script I can put on my server.
Say I install it in www.example.com/album

I have dozens of folders and subfolders /album. I want it to make galleries of those folders and subfolders so I can browse them easily.

Thanks for the suggestion RSTGP, jalbum looks good. Bookmarked

fris 10-12-2010 07:15 PM

i use a shell script to do this

fris 10-12-2010 07:20 PM

i just run this from inside my main dir of pics

Code:

#!/bin/bash

JPGTN="no"

if [ ! -d thumb ]; then
  mkdir thumb
fi

function resize() {
  if [ "$JPGTN" == "yes" ]; then
    jpgtn -d thumb -p $2. -f -s $1 -H "$i"
  elif [ "$JPGTN" == "no" ]; then
    convert -resize x$1 "$i" "thumb/$2.$i"
  else
    echo 'ERROR: set the $JPGTN variable to "yes" or "no"'
    exit -1
  fi
}

if [ -f "index.html" ]; then
  echo 'ERROR: index.html already exists'
  exit
fi

echo '- generating thumbnails'
for i in *.jpg; do echo $i; resize 150 thumb; done

echo '- generating small images'
for i in *.jpg; do echo $i; resize 640 small; done

echo '- generating indexes'

echo '<body bgcolor=white>' > index.html

for i in *.avi *.mpg *.mov; do
  if [ -f "$i" ]; then
    echo $i
    echo '<a href="'$i'">'$i'</a><br>' >> index.html
  fi
done

echo '<br>' >> index.html

for i in *.jpg; do

  echo $i;
  echo '<a href="'$(basename $i .jpg)'.html"><img src="thumb/thumb.'$i'" border=0></a>' >> index.html

 
  if [ "$CURRENT" ]; then
    PREVIOUS="$CURRENT"
  fi

  CURRENT="$(basename $i .jpg)"

  echo '<body bgcolor=white text="#CCCCCC" link="#CC0000" vlink="#CC0000" alink="#CC0000"><a href="indexx.html">homex</a> <a href="index.html">home</a><br>' > $CURRENT.html

  if [ "$PREVIOUS" ]; then
    sed -e s/index\.html/$CURRENT.html/ -e s/'home<'/'next<'/ $PREVIOUS.html > tmp
    mv tmp $PREVIOUS.html

    if [ -z "$FIRST" ]; then
      FIRST=$PREVIOUS
      sed -e s/indexx.html/index.html/ -e s/homex/home/ $PREVIOUS.html > tmp
      mv tmp $PREVIOUS.html
    fi

    sed -e s/indexx.html/$PREVIOUS.html/ -e s/homex/prev/ $CURRENT.html > tmp
    mv tmp $CURRENT.html
  fi

  echo '<a href="'$i'"><img src="thumb/small.'$i'" border=0></a>' >> $CURRENT.html

done


kektex 10-12-2010 07:48 PM

Thanks fris! How many levels deep will that go? My bash-fu is not that strong hehe

kektex 10-31-2010 06:59 PM

For future reference and if anyone else is looking I found this:
http://qdig.sourceforge.net/


All times are GMT -7. The time now is 12:51 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123