Home
Download
Add-ons
Help
Forum
Organisation
Project
Welcome,
Guest
. Please
login
or
register
.
March 21, 2010, 09:41:38 AM
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search:
Advanced search
Wollen Sie dem Website Baker Team beitreten?
Nähere Informationen finden Sie unter
hier
und auf unserer
neuen Webseite
.
110574
Posts in
15968
Topics by
9312
Members
Latest Member:
rumarsies
WebsiteBaker Community Forum
English
Modules
(Moderators:
Argos
,
BerndJM
)
GDPics Gallery Module
Pages:
[
1
]
2
3
...
5
Author
Topic: GDPics Gallery Module (Read 35584 times)
ben
Offline
Posts: 14
GDPics Gallery Module
«
on:
May 24, 2005, 04:03:33 PM »
Hi everyone,
Just found Website Baker last week and I love it! This is what a CMS should be about, easy to use but all the necessary features to make it do what you want. Anyways I've coded a module i'm calling GDPics because, you guessed it, it uses the GD library to display images.
Functionally it's pretty much the same as the picKLE gallery but using GD instead of image majic. If you want to see a page using it go to
this page
. For more information on the module and to download it go to
this page
.
As i've only just finished it i'm sure there are many bugs to be ironed out. Let me know what you find.
Cheers,
Ben.
PS. Actually i've just thought of one while I was writing this post! If you don't use the login on your site this module probably won't work cause it requires a session and I haven't yet added code to start one, it just assumes one has been started. Probably fix that tomorrow
Logged
Of all the things i've lost, I miss my mind the most.
phil
Offline
Posts: 62
GDPics Gallery Module
«
Reply #1 on:
May 24, 2005, 05:05:00 PM »
looks great...
could you post a screenshot of the backend? ATM I find no time to install it, 'cause I think I have to install GD too...
Logged
raoulduke
Offline
Posts: 49
GDPics Gallery Module
«
Reply #2 on:
May 24, 2005, 06:42:35 PM »
Looks good, I will try to give this a spin soon!
Logged
Remember, if you have any trouble you can always send a telegram to the Right People.
Why visit
http://www.ffnn.nl
and
http://www.drgonzo.nl
when you could have a walk in the sunshine instead?
cman
Offline
Posts: 62
GDPics Gallery Module
«
Reply #3 on:
May 24, 2005, 07:53:46 PM »
@phil: the backend looks nearly the same as the pickle backend
@ben: thanks for that great module!! It's great!
Logged
fienieg
Guest
GDPics Gallery Module
«
Reply #4 on:
May 24, 2005, 10:14:46 PM »
Yes thanks for the module, works great even on Windows
Logged
ruebenwurzel
Leaders Team
Offline
Posts: 7211
Keep on Rockin
GDPics Gallery Module
«
Reply #5 on:
May 24, 2005, 10:43:23 PM »
Looks great,
before installing on my homepage, i first wanna try this on my lokal machine (WinXP, Apache 2.0.54, php 5.0.4), but i don't know how to install the needed GD Library. Hope someone in this forum could give me an easy point to point explanation, what I need and what i have to to. I searched in the www with google, but the most results are for linux machines and the others i don't understand. I don't use XAMPP from apachefriends, i try to install and configure Apache, PHP, MySQL and phpmyadmin manually.
Where can I see that GD Library works on my hosted pages too? Can I get this information with phpinfo()?
Thanks for the help.
Logged
You search for help, please look here:
Help-Page
You search for Modules, Templates or Languages, please look here:
Addons-Page
Woudloper
Guest
GDPics Gallery Module
«
Reply #6 on:
May 24, 2005, 10:57:54 PM »
Quote from: ruebenwurzel
Where can I see that GD Library works on my hosted pages too? Can I get this information with phpinfo()?
Thanks for the help.
Yes, this can be seen in the
phpinfo();
. Within the phpinfo you have a section named:
gd
and this will display something like this:
Code:
GD Support
enabled
GD Version
bundled (2.0.28 compatible)
FreeType Support enabled
FreeType Linkage with freetype
T1Lib Support enabled
GIF Read Support enabled
GIF Create Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
XBM Support enabled
Logged
ben
Offline
Posts: 14
GDPics Gallery Module
«
Reply #7 on:
May 25, 2005, 05:07:53 AM »
Hi everyone,
Thanks for all the feedback, glad ya like it
Phil: i've added a page on my site with some
screenshots
of the admin area, hope that helps.
Cheers,
Ben.
Logged
Of all the things i've lost, I miss my mind the most.
bupaje
Offline
Posts: 473
GDPics Gallery Module
«
Reply #8 on:
May 25, 2005, 09:44:45 AM »
Hi again ben. Giving this a try, overall looks great and I like the admin and the structured pages it produces. Only problem I note is the quality of the resized images. You can look at the images here
http://stormvisions.com/pages/gdpics_test.php
and compare the thumbnails of these same images produced by another script using GD here
http://stormvisions.com/pages/album.php
Not sure if it the compression or color depth but something is off.
------
I looked at some image info in Paint Shop Pro and the better image -with the other wscript says this in the creator section
CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), default quality
GDPics says this for the image it produces
CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), quality = 100
so maybe the quality setting needs to be adjusted -maybe something that can be added to the admin i.e. select quality?
Logged
My Blog
,
My Site
ben
Offline
Posts: 14
GDPics Gallery Module
«
Reply #9 on:
May 25, 2005, 11:02:21 AM »
bupaje: yeah I know about the image quality problem. I'm using two php commands, imagecopyresized and imagecreate to create the resized images. These functions do an ok job but as you've noticed the image quality is not great.
There are two newer functions you can use, imagecopyresampled and imagecreatetruecolo
r that I believe will give you a much better quality resized image. Unfortunately you need version 2.01 of the GD library to get these functions and i've only got access to 1.6 on my server.
If you want to test if they make a difference open up class.gd.php in an editor and in function createImage() change the following:
Original:
Code:
$image_s = imagecreate($this->new_width, $this->new_height);
New:
Code:
$image_s = imagecreatetruecolor($this->new_width, $this->new_height);
and also,
Original:
Code:
imagecopyresized($image_s, $image, 0, 0, 0, 0, $this->new_width, $this->new_height, $this->width, $this->height);
New:
Code:
imagecopyresampled($image_s, $image, 0, 0, 0, 0, $this->new_width, $this->new_height, $this->width, $this->height);
Hopefully this will improve image quality. At some stage i'm going to add some code to check what version of GD is installed and if equal to or above 2.01 use the new functions.
Try it out an see how you go.
Cheers,
Ben.
Logged
Of all the things i've lost, I miss my mind the most.
bupaje
Offline
Posts: 473
GDPics Gallery Module
«
Reply #10 on:
May 25, 2005, 06:46:51 PM »
Thanks. I will try this later today. If it helps, the other GPL script I was trying was this one
http://cker.name/galerie/galerie.php
and it does a check to see if the functions you mention exist.
Logged
My Blog
,
My Site
ruebenwurzel
Leaders Team
Offline
Posts: 7211
Keep on Rockin
GDPics Gallery Module
«
Reply #11 on:
May 25, 2005, 11:04:46 PM »
Hurrey, it works
I testet Version 0.2 with changed code in class.gd.php, and the image quality is great. I only had a little error-message from line 394 in view.php. I think this is the problem with non opened session, wich ben will resolve next days.
Für alle, die eine komplett (hoffe ich zumindest) ins deutsche übersetzte Version testen wollen, können diese unter
http://www.familie-gallas.de/media/File/gdpics_de.zip
herunterladen.
@bubaje
I also testet galerie.php. It looks very nice too. I got a problem with images on more pages. If I had 20 images, and 10 images per page, i could not go to images 11-20. I got an error pages/offset=10 doesn't exist. How did you create your picture site with this script. I createt a new Code-section with the script in it (without "<?php" and "?>" tag) and I also tried it with the wrapper-section and the original galerie.php. Hope you could help me. Thanks.
Logged
You search for help, please look here:
Help-Page
You search for Modules, Templates or Languages, please look here:
Addons-Page
bupaje
Offline
Posts: 473
GDPics Gallery Module
«
Reply #12 on:
May 25, 2005, 11:18:55 PM »
I had this problem too I think. I have some problems that affect my memory -one of the reasons programming is giving me a hard time now- can't remember the specifics of what I did. I know I changed this line
if (!$included) {
echo('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd
">
<html xmlns="
http://www.w3.org/1999/xhtml
">
<head>
<meta http-equiv="content-type" content="text/html; charset=' . $charset . '" />
to
if ($included) {
so that I could have the styles in the page. I also fiddled some settings. Here is a link to the file so you can see my settings.
http://stormvisions.com/junk/galerie_text.txt
I created a folder 'gallery' in my root and placed galerie.php there. I created a WYSIWYG page called Album and added the GDpics mod to it.
See if this helps you.
Logged
My Blog
,
My Site
bupaje
Offline
Posts: 473
GDPics Gallery Module
«
Reply #13 on:
May 25, 2005, 11:38:43 PM »
@ben. thanks. those changes did the trick and improved the quality.
Logged
My Blog
,
My Site
Woudloper
Guest
GDPics Gallery Module
«
Reply #14 on:
May 25, 2005, 11:47:35 PM »
@ ben:
Just some thought (
as I don't know if this is already implemented
). Would it be a nice idea to also work with the
exif
module that is default available within the PHP Installation?
This way you can list even more information. In the past I worked with
DAlbum
which can provide such information about pictures that are available in the galarie.
Logged
ben
Offline
Posts: 14
GDPics Gallery Module
«
Reply #15 on:
May 26, 2005, 03:26:12 AM »
@ruebenwurzel:
Glad the fix worked for you. That error message you mentioned from line 394 in view.php could you please post it? Your probably right that is related to the session variable problem i'm fixing now but I just wanna check, thanks.
Woudloper:
Checked out the exif module and I think we can integrate it into GDPics. It would be a cool edition. I'll be working on GDPics this arvo so i'll see what I can come up with, but right now got a couple of pesky 'pay the bills' jobs to do first
Cheers,
Ben.
Logged
Of all the things i've lost, I miss my mind the most.
ruebenwurzel
Leaders Team
Offline
Posts: 7211
Keep on Rockin
GDPics Gallery Module
«
Reply #16 on:
May 26, 2005, 02:06:04 PM »
@ben
Here are the error-message
Code:
Warning: Invalid argument supplied for foreach() in C:\Intranet\Apache2\htdocs\modules\gdpics\view.php on line 394
It appears when you click on an image. Also the discreption of the pics is not been shown, you see only the filename. Hope this helps you.
@bupaje
Thanks for your code, but I think the problem is another and seems to be a WB-bug. It's described here
http://www.websitebaker.org/2/forum/index.php?topic=809.msg5283#msg5283
When I first store the code in an code-section, all works very fine, when I change something in this code and stored again, code seems to break and the script doesn't work right.
«
Last Edit: August 16, 2005, 10:44:55 PM by ruebenwurzel
»
Logged
You search for help, please look here:
Help-Page
You search for Modules, Templates or Languages, please look here:
Addons-Page
skidrash
Offline
Posts: 70
Re: GDPics Gallery Module
«
Reply #17 on:
February 13, 2006, 07:32:04 PM »
Can anyone make any suggestions how to make this work on a Windows server? I have GD enabled, and the GDpics module is pointing at a folder with three jpg's in it, and it says "page saved successfully" when I hit save, but no pictures show up on the front end...
Here is the test site I'm trying to get it working on...
http://test.lordgilbane.com/pages/bookmarks/gd-pics.php
«
Last Edit: February 13, 2006, 07:55:34 PM by skidrash
»
Logged
Stu-Art
Offline
Posts: 57
Re: GDPics Gallery Module
«
Reply #18 on:
March 01, 2006, 10:36:53 AM »
Hi, I can't choose which photo gallery to use. I like Pickle and have used it for several years even before using WB. However, adding comments to files is a pain (.txt files), it doesn't support exitf info, you can't use a thumbnail for a directory and I would like to have a top level directory view with description (just like the flickr module or the manual version I created on my website
http://www.thetippinsfamily.com/stuart/pages/photo-gallery.php
Is it possible to add the following features to GDPics or merge GDPics and Pickle together with an option for selecting the image rendering engine?
GD Pics
Does not Support subdirectories - I have a lot of pictures and they are sorted by year, month and subject
Has a bug that tried to get the imagefilesize of txt files (I used them for Pickle comments
Can the thumbnail directory be hidden or not stored under another directory as Pickle picks this up - Not a problem if you don't use both modules
Can a thumbnail be chosen for the album icon
Can a top level page be created that includes a folder description and thumbnail
A Pickle slide show option
I seen some comments about phpthumb and imanager which might be a nice add-on to the media upload.
Would either of the authors of these modules be interested in doing this work, I can help, I loooked at the code and it doesn't seem too complex.
Any comments?
Logged
Stu-Art
Offline
Posts: 57
Re: GDPics Gallery Module
«
Reply #19 on:
March 01, 2006, 04:21:38 PM »
Are the thumbs being created or even the /temp/gd_cache and thumbs directories ?
It might be a rights problem, look at the security rights on the directories, otherwise look at your log files and see if you are getiing any error messages.
I have not looked at installing GD locally yet but I normally use JSAS as a local development environment.
Stu...
PS I had a lot of problems installing it at first then all of a sudden it started working!!
UPDATE: I just tried it locally, silly I didn't realise GD libraries come with PHP. Anyway, I had the same problem as you and I now remember how I fixed it, you need to create a subdirectory under /media/gallery and put the pictures in there. It will not browse the root of the chosen media directory. (I know this as I had photos in the root)
«
Last Edit: March 01, 2006, 04:49:11 PM by Stu-Art
»
Logged
skidrash
Offline
Posts: 70
Re: GDPics Gallery Module
«
Reply #20 on:
March 02, 2006, 04:30:21 PM »
Stu! Your a genius! I never would have thought of that. I've been trying to get Pickle or GDpics to work for weeks, and I wasn't getting anywhere. But you're right. As soon as I put the pics in a subdirectory, they showed right up in GDpics. I appreciate the help!
~skidrash
Logged
Stu-Art
Offline
Posts: 57
Re: GDPics Gallery Module
«
Reply #21 on:
March 03, 2006, 09:17:15 AM »
There are a couple of other things with GDPics that you might need to do. One, edit the trim statement, its in one of the previous posts, otherwise you can't add comments. Also, you must copy the style info that is in the top of view.php and put it in your screen.css otherwise the layout is all screwed up.
I am currently trying to combine a number of the features of Pickle features into GDPics, such as support for sub-dirs and the slideshow. Once I have finished this I will try and add a few new ones, such as being able to select a thumbnail for the album.
Stu...
Logged
skidrash
Offline
Posts: 70
Re: GDPics Gallery Module
«
Reply #22 on:
March 04, 2006, 07:10:36 AM »
Thank you very much for all the help Stu. I will try out those suggestions as soon as I can. Unfortunately I have to go out of town this week, so I won't be able to mess with it any time soon.
Your ideas sound great though! I especially like the idea of making it so you can select a thumbnail for albums... Good luck to all your efforts, and I'll be checking back when I can!
~skidrash
Logged
Stu-Art
Offline
Posts: 57
Re: Update of GDPics Gallery Module to support sub-dirs
«
Reply #23 on:
March 13, 2006, 02:23:05 PM »
Hi all,
I really wanted to use GDPics for my photo gallery and I have 100's of sub-dirs so I updated GDPics to support this functionality, here are a few other things I did:
/*Update by Stu-Art to 0.37 (tested with WB 2.61 and 2.62)
+Image gallery and caption code updated to support sub-directories
+Admin module updated to support sub-dirs
+Fixed admin module so only current dir list is opened instead of entire media dir
+Removed generic image and album comments, only display captions if added
+Added gif support (not fully tested)
Known problems
-Admin module slow to load when there are a lot of dirs
-Convert to thumbs can time-out if there are a lot of files in one dir
-Does not display images if they are in the root dir (will be fixed in next version)
-The first time the admin page is run it loads the whole of wb dir structure instead of just the media dir.
-Images can be resized larger than their original size (which looks terrible) - I will fix this next.
If anyone needs sub-dir functionality please test the module update for me.
It seems to work well on small photo albums, but on my home PC I have 37Gbs of photos and several 1000's of dirs and its very slow. Its also slow to convert large photos to thumbs.
I am now adding code to use thumbnails as album icons instead of the generic folder.jpg and will have a look at the speed issue.
One note:
Pickle keeps copies of all converted photos of each screen res selected, which makes loading images fast but uses a lot of disk space. A big problem for large photo albums.
GDPics on the other hand only retains the thumbnail images, so it has to convert the image each time it is displayed. Therefore slower but uses very little extra disk space.
Stu...
Logged
skidrash
Offline
Posts: 70
Re: GDPics Gallery Module
«
Reply #24 on:
March 14, 2006, 09:22:34 PM »
Hey Stu, I tried out your 0.37 and it looks great. I run a Windows server and the whole sub directory thing worked perfectly. I had the same thing you mentioned, with the entire WB loading in the "choose album" box on the first access too modify.ph p, but after the first 'save' it went away.
Its not that big of a deal, but I noticed that for some reason, in the gallery the folders load vertically while the images load horizontally... So if you have a lot of subfolders it could get very long.
I was wondering, what you said about GDpics not caching the converted images... I use a lot of images that are over 2000px wide, and I have noticed that it can take some time for the images to be resized by the server before loading. Especially as my webserver is a dual 450...
I was wonder if there would be any way to add the option of caching those "standard" resized images (not the front-end accessable, user-defined sizes). Like a checkbox of some sort on the backend for "cache standard sampled images" or something like that (defaulting of course to "don't cache")? This would be extremely helpful for people like me with plenty of space but not much horse-power...
You've done great work Stu! Thanks for the sub-directory support, and all your time and effort. I hope you make out alright with the selectable thumbnails! I'll be checking back often.
~skidrash
Logged
Pages:
[
1
]
2
3
...
5
Jump to:
Please select a destination:
-----------------------------
General
-----------------------------
=> General Announcements
=> Security Announcements
=> Documentation
=> Guest Area & Off-Topic
-----------------------------
English
-----------------------------
=> Help & Support
=> Modules
=> Droplets (PHP code for use with Droplet module) & Snippets (raw PHP code)
=> jQuery
=> Templates, Menus & Design
=> WebsiteBaker Language Files
=> WebsiteBaker 2.x discussion
=> WebsiteBaker 3
=> Archive (posts up to 2007)
-----------------------------
Deutsch (German)
-----------------------------
=> Ankündigungen
=> Hilfe/Support
=> Module & Snippets
=> Templates & Design
=> Tutorials
=> jQuery
=> Diskussion über WB
=> Off-Topic
=> Archiv für Themen bis 2007
-----------------------------
Nederlands (Dutch)
-----------------------------
=> Aankondigingen
=> Hulp & Ondersteuning
=> Niet-Terzake (Off Topic)
-----------------------------
Francais (French)
-----------------------------
=> Help/Support
-----------------------------
Italiano (Italian)
-----------------------------
=> Help/Support
Loading...