New user's registration have been closed due to high spamming and low trafic on this forum. Please contact forum admins directly if you need an account. Thanks !

Howto install SPGM, Simple Picture Gallery Manager

A collection of tips on howto tweak your Bubba.
Post Reply
tor
Posts: 703
Joined: 06 Dec 2006, 12:24
Contact:

Howto install SPGM, Simple Picture Gallery Manager

Post by tor »

This short howto tells you howto install the lightweight gallery application SPGM, http://spgm.sourceforge.net/?lg=us

Start by downloading the latest version of spgm from http://spgm.sourceforge.net/?lg=us&id=download. (Chose the version that have an archive ending in .tar.gz)

Upload that archive to your Bubba. Placing it in /home/web.

With a user that has shell access. Log into Bubba via ssh and change to the /home/web folder.

Code: Select all

cd /home/web
Unpack the archive

Code: Select all

tar zxvf spgm-1.4.7.tar.gz
Rename the unpacked folder to something more easily remembered.

Code: Select all

mv spgm-1.4.7 spgm
Now the basic installation is done. Try browsing to http://bubba/spgm and you should be greeted by the default config and a sample gallery with one picture.

To create a new gallery, add a directory in /home/web/spgm/gal say fx "First test"
Enter the gal directory

Code: Select all

cd spgm/gal
Create the directory for the new gallery.

Code: Select all

mkdir First_test
note the _ in the directory. This will automatically be changed to a space when presented.

If you now browse to http://bubba/spgm you should see the new gallery without any description nor any pictures.

To add a description of the newly created directory put a text file in the First_test directory named gal-desc.txt with a short description of the new gallery. Reload the browser and it should show the description.

To add pictures to the gallery. Upload any jpg, png or gif file to the First_test directory. And here comes the tricky part. For the image to show. It needs a thumbnail picture int the same directory. It should be named the same name as the original picture but with the prefix _thb_. So if your picture is named pic1.jpg the thumbnail should be named _thb_pic1.jpg

If you then want a description of each image you have to create the file pic-desc.txt in the gallery directory containing one line per image. Looking something like:

Code: Select all

Tux.jpg | This is a caption for Tux's picture.<br />
Further reading on how to configure a gallery can be done in the Install.txt file contained in the spgm archive.
tor
Posts: 703
Joined: 06 Dec 2006, 12:24
Contact:

Post by tor »

A short addition here.

I have uploaded a package for more easy thumbnailing on bubba.

Install the package epeg0-bin and then you can issue the command

Code: Select all

mkjpegthumb
in any directory you want to do thumbnails in and it will create thumbnails of any jpeg images found in this directory.

/Tor
Co-founder OpenProducts and Ex Excito Developer
kaosmagix
Posts: 4
Joined: 23 Sep 2007, 14:13

Post by kaosmagix »

tor wrote:A short addition here.

I have uploaded a package for more easy thumbnailing on bubba.

Install the package epeg0-bin and then you can issue the command

Code: Select all

mkjpegthumb
in any directory you want to do thumbnails in and it will create thumbnails of any jpeg images found in this directory.

/Tor
The utility works, but it doesn't support spaces in the filenames. (error too many arguments). When removing the spaces in the filename it works.
It would be great if you can make it support spaces in the filenames, since all my pictures are in the format <topic><space><date><space><index>.jpg

Thanks in advance,

cris
tor
Posts: 703
Joined: 06 Dec 2006, 12:24
Contact:

Post by tor »

Hi kaosmagix,

Strange that you are experiencing problems with the thumbnailer. When looking at its source it really should support spaces in filenames. How do you invoke the mkjpegthumb command when its failing?

/Tor
Co-founder OpenProducts and Ex Excito Developer
Kramer
Posts: 24
Joined: 23 Oct 2007, 17:38

Post by Kramer »

I also had problem with this program. It did't like spaces in the catalog name or file name.
When I removed the spaces it worked very fine.

I used mkjpegthumb -R in the top catalog.

/kramer
kaosmagix
Posts: 4
Joined: 23 Sep 2007, 14:13

Post by kaosmagix »

tor wrote:Hi kaosmagix,

Strange that you are experiencing problems with the thumbnailer. When looking at its source it really should support spaces in filenames. How do you invoke the mkjpegthumb command when its failing?

/Tor
I did have the problem by running "mkjpegthumb" in a folder with several jpegs, and I did try the -R option as well from the picture root. The foldernames didn't have spaces, but the pictures did. When I tried it on picturesfiles without spaces (renamed) it worked.
ahab
Posts: 35
Joined: 25 Aug 2008, 17:35

can't install epeg0-bin

Post by ahab »

I've installed spgm gallery but can't install the epeg0-bin package mentionen. I've tried with "apt-get install epeg0-bin" but it says it cannot find the package. I've also tried with just "install epeg0-bin" without any success. I've logged on using putty and then changed to "su".

What am I doing wrong? Please help me.
nitram
Posts: 27
Joined: 02 Oct 2008, 16:01

Post by nitram »

I came to the point where i should be greeted by the default config. (http://<domain>/spgm).
The page appears and i see the "sample gallery" , but also the following error:
Warning: mb_strstr() [function.mb-strstr]: Empty haystack in /home/web/spgm/spgm.php on line 975
which is following line in spgm.php:
if ( strstr($strFilterFlags, PARAM_VALUE_FILTER_NEW) ) {^M


Inside the sample gallery got 3 more of those warnings:
Warning: mb_strstr() [function.mb-strstr]: Empty haystack in /home/web/spgm/spgm.php on line 1130
which is following line in spgm.php:
if ( strstr($strFilterFlags, PARAM_VALUE_FILTER_NOTHUMBS) ^M

Warning: mb_strstr() [function.mb-strstr]: Empty haystack in /home/web/spgm/spgm.php on line 1131
which is following line in spgm.php:
|| strstr($strFilterFlags, PARAM_VALUE_FILTER_SLIDESHOW) ) {^M

Sample gallery
Warning: mb_strstr() [function.mb-strstr]: Empty haystack in /home/web/spgm/spgm.php on line 1145
which is following line in spgm.php:
if ( strstr($strFilterFlags, PARAM_VALUE_FILTER_NEW) )^M

I've no clue what is wrong because i can't read these files (so much to learn)
Can someone help me out?

Thanks,
Martin
Post Reply