Welcome, Guest. Please login or register.
Did you miss your activation email?
February 12, 2012, 02:23:45 PM

Login with username, password and session length
Search:     Advanced search
Interested in joining the WebsiteBaker team?
For more Information read here or on our new website.
149643 Posts in 21099 Topics by 7539 Members
Latest Member: ionline
* Home Help Search Login Register
Pages: [1] 2 3 ... 7   Go Down
Print
Author Topic: New Image Gallery  (Read 45008 times)
ruebenwurzel
WebsiteBaker Org e.V.

Online Online

Posts: 7663



WWW
« on: March 07, 2006, 03:00:40 AM »

Hello,

for a project of me i needed a Image Gallery wich shows all Images wich are uploaded in a specified folder. With the Image Gallery from WB I have to upload every pic for pic wich is nothing for great galleries with a lot of pics. I also tested Stefans Swift Gallery but this has not the Layout that i want.

I found a little script from Daniel Wacker wich is called gallerie.php. I created a modul for WB from this script. It works to 98% and so i release it her for the community to test.

Features:
  • Shows all Images in a Folder and his Subfolders (could be turned of or on) wich could be uploaded via FTP
  • Creates automaticly Thumbnails ( Size, number of pics per page, and thumbsdirname free choosable)
  • Filename and titlename can be turned of or on
  • CSS styles editable in the admin interface

Requirements:
  • PHP >= 4.1.0
  • GD Library ( >= 2.0.1 for good thumbnails)
  • JPEG software
  • PHP >= 4.3.0 or GD < 1.6 for GIF support
  • libpng for PNG support

Example link:
http://www.familie-gallas.de/pages/bilder.php

I hope you like it

Matthias

Edit:
New version some posts below.
« Last Edit: May 01, 2006, 10:06:18 PM by ruebenwurzel » Logged
Stu-Art

Offline Offline

Posts: 57


« Reply #1 on: March 07, 2006, 09:50:43 AM »

Hi,

the program works fine, but couldn't you have done the same just by tweaking GDPics or Pickle?

Judging by the comments on the galleries there seems to be some need to combine the features of a few of the image galleries modules and provide some type of editible template.

I had already starting making changes to GDPics to add the slideshow feature, move the thumbs directory, support sub-dirs, allow thumbnail-albums and filter unwanted files.

I have spent the last week or so putting all my digital photos in one place, some 35+ Gbs and now I need an easy way to view them (slideshow)!!

The other option is to try and integrate something like Gallery 2 into WB, which probably has all these features!

Stu...
Logged
wwwMARKLEYcouk

Offline Offline

Posts: 288


WWW
« Reply #2 on: March 07, 2006, 09:54:20 AM »

well i have a different story im afraid Sad

Code:
Warning: htmlentities(): charset `ANSI_X3.4-1968' not supported, assuming iso-8859-1 in modules/imagegallery/view.php on line 71

and i get that repeating all down my page Sad
Logged

solmicro

Offline Offline

Posts: 4


« Reply #3 on: March 07, 2006, 01:51:47 PM »

This module is very useful. Is it possible to resize automatically the images in 640 x 480 ?

afflicted for my bad English, I am French

Christophe
Logged
ruebenwurzel
WebsiteBaker Org e.V.

Online Online

Posts: 7663



WWW
« Reply #4 on: March 07, 2006, 02:32:09 PM »

Found a few bugs and changed the whole css styles because it brokes my template. Added a new bugfixed version in the first thread. Changed files only add.php and view.php. Upgrading from a existing version is not possible (no time to write an upgrade script). Best way to upgrade is deleting all imagegallery pages, deleting the modul, installing the new version and recrate the imagegallerypages.

@Stu-Art
Pickle i couldn't use because my hoster doesn't support imagemagic.
GDPics is nice but to complicated.
I was looking for an very easy small script. Only uploding the pics in a dir. Make a new page and point to the dir where the pics are and that should be all.

@mysticfreeman
The script is from a german developper (german charset =iso-8859-1). Will have a look maybe we can get rid of this improvement.

@solmicro
Hmmm, thought about it, and decided not to do this. I wanna use this for larger galleries, and if all images and thumbs would be generated from php to the right size causes a lot of server activitys. I think better is to resize all pictures on the lokal machine to the size wich are needed for the page (Double effect, faster upload because they are smaller and not so much server activitys) and let the script only create the thumbs.

Thanks for your comments, this helps to get this modul better

Matthias

@solmicro
Logged
jschor

Offline Offline

Posts: 110


« Reply #5 on: March 07, 2006, 02:44:48 PM »

Have a look at TinyWebGallery. This is a very nice script. Would be nice if someone could integrate this and write a module for it. Very easy to set up and now with an admin area which wasn't before. It has been talked about before in the forum.
Logged
ruebenwurzel
WebsiteBaker Org e.V.

Online Online

Posts: 7663



WWW
« Reply #6 on: May 01, 2006, 10:05:04 PM »

Many thanks to rsmith who edited the modul and added new functions:

Changelog
     + New Option: Original pictures could be shown in a new window
     + New Option: You can decide between arrows or text for previous/next links
     + New Option: Maxwidth for pictures (only html no resizing)

ToDo-List
     + Make the Path to the pictures dir as a dropdownfield instead of textfield.

Have fun

Matthias

Edit:
Newer Version some posts below
« Last Edit: May 21, 2006, 10:12:03 PM by ruebenwurzel » Logged
terryd

Offline Offline

Posts: 3


« Reply #7 on: May 09, 2006, 10:38:05 PM »

I have it installed now what Smiley Cant find a readme any where
Logged
rsmith

Offline Offline

Posts: 194


« Reply #8 on: May 10, 2006, 01:51:33 AM »

now what?   grin
readme with the next RC if needed, we are tring to keep this module as simple and easy as possible,the hard part right now is the folder reference

lets see... create a new page. using the ImageGallery as the "type"

once into the admin side the first text box is the folder relative to the page position you are working on (this will become a dropdown box in the next release)

Depending on your exact setup the media folder  would probably be:         

Code:
../media
for a first level page...
Code:
../../media
for a second level page...

you can also reference folders within the media folder
Code:
../media/pictures

when you view the page  you should get a thumbnail page of any images in that folder


hope this helps.... please let us know if u have any more questions
Rob
Logged
terryd

Offline Offline

Posts: 3


« Reply #9 on: May 10, 2006, 10:15:00 PM »

Ah thats great it was this line lets see... create a new page. using the ImageGallery as the "type"

I had never even dropped down that box doh peace of cake then looks really nice too

Thanks
Logged
Bonkie

Offline Offline

Posts: 40


« Reply #10 on: May 19, 2006, 02:52:07 PM »

Hello,

I always create my own thumbs since i am always uploading by FTP.... maybe there should be a function tu turn the resizing en filename.ext.thumbs .ext off...... i now modded it for my site but i would really like it if i could do it from the admin panel....
Logged
1accessori.it

Offline Offline

Posts: 18


WWW
« Reply #11 on: May 19, 2006, 10:05:49 PM »

I have a problem (my first problem is .. english  sad )

I whant to put my gallery (Fotografie in italian) as a parent of Download menù but gallery don't work .. if I put gallery in main menù, gallery work .. why? Is a bug? Is available a solution?

You can see my gallery here http://www.comez.eu/pages/fotografie.php
Logged

ruebenwurzel
WebsiteBaker Org e.V.

Online Online

Posts: 7663



WWW
« Reply #12 on: May 20, 2006, 07:09:29 AM »

Hello,

to get your gallery working when it is in childsites you have to change the path to the pictures thats all. For every new child add a additional "../" at the beginning of the path.

f.e. follwing page structure:

Page
   --> subpage
      -->subsubpage

Path to the pictures:
Page "../media"
subpage "../../media"
subsubpage "../../../media"

This Modul is in the RC stadium. Rsmith is workin on a solution to make this Folder as a dropdownlist from the media Folder, so the user can easyliy choose the place from his pictures.

Hope this helps

Matthias
Logged
1accessori.it

Offline Offline

Posts: 18


WWW
« Reply #13 on: May 20, 2006, 08:33:05 AM »

yes!!!
thank you
Logged

rsmith

Offline Offline

Posts: 194


« Reply #14 on: May 20, 2006, 10:49:44 PM »

Hi...

New ImageGallery v0.1rc3

Change Log:
+Dropdown box within the admin to select a folder from within the MEDIA DIRECTORY

Install
+backup and overwrite modify.php and view.php

Note: after install you will need to go select the gallery folder for any pages that are using it, the "../../media" will no longer work and the pages will be empty

Have fun and please let me know if/what issues exist

Rob

Edit: Released Version below
« Last Edit: May 21, 2006, 10:23:08 PM by rsmith » Logged
ruebenwurzel
WebsiteBaker Org e.V.

Online Online

Posts: 7663



WWW
« Reply #15 on: May 21, 2006, 10:22:10 PM »

Final Version of New Image Gallery released

Thanks to Rob Smith, who fixed my last wishes for this Gallery, I'm proud to present the First Finale Release of this Image Gallery.

I want this Gallery keep as simple a possible. The user only have to ftp his pictures to a folder in the media dir and then choose this folder in the options of this modul. Thats all.

How to update from v01RC1:
Overwrite all files with the new ones and run once the update script (modules/imagegallery/update.php)

How to update from v01RC2 and v01RC3:
Only overwrite the files with the new ones

In all cases:
Quote
Note: after install you will need to go select the gallery folder for any pages that are using it, the "../../media" will no longer work and the pages will be empty

Have fun

Matthias
Logged
Hans

Offline Offline

Posts: 560


« Reply #16 on: May 22, 2006, 07:57:00 AM »

Thanks Matthias, Great!
Logged

Hans - Nijmegen - The Netherlands
Gerrit1

Offline Offline

Posts: 6


« Reply #17 on: May 31, 2006, 01:33:15 PM »

Final Version of New Image Gallery released


I found a small bug (or feature? (cool)
The Gallery reduces the Pictures only in width, not in length. When you have source pictures with 500x700 and 700x500 and you choose "500" as size, the 500x700 will not become smaler, only the 700x500 will be reduced.

It looks a little strange, when the high formated pictures are so much bigger...


Next thing, i have a problem, maybe you can help:

I need a script to be integrated in the Module. With this script, the visitors can order the pictures as prints.

I tried to put it in the "Layout Settings Styles", but it doesn't work there (the picturename and path are not transfered into the script)

Would be nice if you could help to fix it in.


Quote
  <script src="http://mydomain.com/picturetransfer.js" TYPE="text/javascript"></script>

This could be included via the Layout Setting Styles.

But next doesn't work:

Quote


<h1 align="center"><a href="javascript:picturetransfer('http://mydomain.com/source/#filepath#/#filename#')">Order photo</a></h1>
       
    <p align="center">(e.g as print, cup, ...)<br>
    <p align="center">JS must be active to order</p>
     <p align="center"><a href="javascript:preise()">Pricelist</a></p>


#filepath# should be the path where the gallerypicture is (e.g. .../media/examples/)
#filename# is the name of the picture (e.g. picture1.jpg)

The finished, generated link in teh script should be e.g.
http://mydomain.com/source/media/examples/picture1.jpg

Would be nice, if you could help.
Logged
ruebenwurzel
WebsiteBaker Org e.V.

Online Online

Posts: 7663



WWW
« Reply #18 on: May 31, 2006, 01:47:30 PM »

Hello

Quote
I found a small bug (or feature? (cool)
The Gallery reduces the Pictures only in width, not in length. When you have source pictures with 500x700 and 700x500 and you choose "500" as size, the 500x700 will not become smaler, only the 700x500 will be reduced.

No bug, this is the way it should work. The max width option don't reduces the pictures, it only adds html width and height to the picture to prevent that to large pictures breaks the width of the content area from the page.

Quote
I need a script to be integrated in the Module.

Try to add this code to the file view.php of the modul, or ask rsmith he has written a lot of code for this modul.

Matthias
Logged
Gerrit1

Offline Offline

Posts: 6


« Reply #19 on: May 31, 2006, 01:57:22 PM »

Hello

Quote
I found a small bug (or feature? (cool)
The Gallery reduces the Pictures only in width, not in length. When you have source pictures with 500x700 and 700x500 and you choose "500" as size, the 500x700 will not become smaler, only the 700x500 will be reduced.

No bug, this is the way it should work. The max width option don't reduces the pictures, it only adds html width and height to the picture to prevent that to large pictures breaks the width of the content area from the page.

OK. I find it a little strange, as now sometimes the high pictures have to be scrolled...



Try to add this code to the file view.php of the modul, or ask rsmith he has written a lot of code for this modul.

Matthias

I thought so, that it should be in view.php  grin
Unfortunatly I am not a crack in php, it is a little confusing for me...
Logged
rsmith

Offline Offline

Posts: 194


« Reply #20 on: May 31, 2006, 02:26:38 PM »

Hi
Not sure what yoru script does.. .but to get the path and filename within the link you need
to replace the #filepath# and #filename# with the php variables....
Quote

 I assume you ware editing the view.php?... when displaying the single full image?... if so...  you are editing line 152 or about....
#filepath# needs to be replaced with $dirnamehttp 
#filename# needs to be replaced with $pics['$pic']
something like

Quote
"javascript:picturetransfer('http://mydomain.com/source/<?PHP echo $dirnamehttp; ?>/<?PHP echo $pics['$pic']; ?>')">
EDIT: if u are editing line 152... it may be more like this... with the variables within the echo statement
Quote
"javascript:picturetransfer('http://mydomain.com/source/'.$dirnamehttp.'/'.$pics['$pic'].'>')">

this would make ur link something like:   http://mydomain.com/source/media/picture.jpg

Rob
« Last Edit: May 31, 2006, 02:33:12 PM by rsmith » Logged
Gerrit1

Offline Offline

Posts: 6


« Reply #21 on: May 31, 2006, 03:20:19 PM »

The scrip is an JS I  got from a finisher. It transfers pictures from my server to him and he prints the pictures and sends them to the "customers" (the visiters of my site).

Im too stupid for it  huh

How do i put the script into line 152?
(Sorry, I  only have plan of HTML and verry few JS, this php is chinese for me)

Can you please send me the complete line 152 with the script and writings in it?

Quote
echo('<img src="' . html("$dirnamehttp/{$pics[$pic]}") . '" alt="' . html(basename($pics[$pic])) . '"  style="width: ' . $width .'px; height: ' . $height .'px" ' .' <h1 align="center"><a href="javascript:picturetransfer('http://mydomain.com/source/'.$dirnamehttp.'/'.$pics['$pic'].'>')"> Order photo </a></h1><p align="center">(e.g as print, cup, ...)<br> <p align="center">JS must be active to order</p> <p align="center"> <a href="javascript:preise()">Pricelist</a></p>');


Logged
rsmith

Offline Offline

Posts: 194


« Reply #22 on: May 31, 2006, 04:16:16 PM »

based on what you posted earlier... something like the attached view.php

you will need to edit the file and replace the mydomain.com with the correct text and then backup and copy this view.php into the modules/imagegallery folder

Lines 158-167 is what changed.... to use your code from previous posts...


Rob
Logged
Gerrit1

Offline Offline

Posts: 6


« Reply #23 on: May 31, 2006, 04:37:06 PM »

based on what you posted earlier... something like the attached view.php

Rob

Cool!  afro

Almost, but still a "little bug"

The generated Lin is javascript:picturetransfer('http://derlarpfotograf.de/source/http://braunschweig-foto.de/media/FTP/Veranstaltungen/Karneval2006/IMG_4176.JPG')

instead of
javascript:picturetransfer('http://derlarpfotograf.de/source/media/FTP/Veranstaltungen/Karneval2006/IMG_4176.JPG')

I need the relative URL, not absolute to be hanged on the prefix-URL
Logged
rsmith

Offline Offline

Posts: 194


« Reply #24 on: May 31, 2006, 04:43:10 PM »

in the new line 161... change $dirnamehttp to $dirname
i think that should be closer to what you want.

Logged
Pages: [1] 2 3 ... 7   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!