Welcome, Guest. Please login or register.
August 20, 2008, 05:26:07 PM

Login with username, password and session length
Search:     Advanced search
Website Baker 2.7.0 (stable) released!
For more information look here.
The announcement board can be found here.
60556 Posts in 9791 Topics by 5824 Members
Latest Member: blubb
* Home Help Search Login Register
+  Website Baker Community Forum
|-+  English
| |-+  Modules
| | |-+  GDPics Gallery Module
Pages: [1] 2 3 ... 6 Go Down Print
Author Topic: GDPics Gallery Module  (Read 21910 times)
ben
Pending Apprentice Baker
**
Offline Offline

Posts: 14


« 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  Smiley
Logged

Of all the things i've lost, I miss my mind the most.
phil
Apprentice Baker
***
Offline Offline

Posts: 62


« 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
Pending Apprentice Baker
**
Offline Offline

Posts: 49


« 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
Apprentice Baker
***
Offline Offline

Posts: 62


« 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
« Reply #4 on: May 24, 2005, 10:14:46 PM »

Yes thanks for the module, works great even on Windows  wink
Logged
ruebenwurzel
Leaders Team
A Baker's Baker
*****
Online Online

Posts: 6255


Keep on Rockin


WWW Email
« 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
« 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
Pending Apprentice Baker
**
Offline Offline

Posts: 14


« Reply #7 on: May 25, 2005, 05:07:53 AM »

Hi everyone,

Thanks for all the feedback, glad ya like it  Cheesy

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
Geek-Like Baker
*****
Offline Offline

Posts: 401


WWW
« 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

ben
Pending Apprentice Baker
**
Offline Offline

Posts: 14


« 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 imagecreatetruecolor 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
Geek-Like Baker
*****
Offline Offline

Posts: 401


WWW
« 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

ruebenwurzel
Leaders Team
A Baker's Baker
*****
Online Online

Posts: 6255


Keep on Rockin


WWW Email
« Reply #11 on: May 25, 2005, 11:04:46 PM »

Hurrey, it works Cheesy

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
Geek-Like Baker
*****
Offline Offline

Posts: 401


WWW
« 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

bupaje
Geek-Like Baker
*****
Offline Offline

Posts: 401


WWW
« Reply #13 on: May 25, 2005, 11:38:43 PM »

@ben. thanks. those changes did the trick and improved the quality.
Logged

Woudloper
Guest
« 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
Pending Apprentice Baker
**
Offline Offline

Posts: 14


« 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  wink

Cheers,
Ben.
Logged

Of all the things i've lost, I miss my mind the most.
ruebenwurzel
Leaders Team
A Baker's Baker
*****
Online Online

Posts: 6255


Keep on Rockin


WWW Email
« 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
Apprentice Baker
***
Offline Offline

Posts: 70


« 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
Apprentice Baker
***
Offline Offline

Posts: 57


« 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
Apprentice Baker
***
Offline Offline

Posts: 57


« 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
Pages: [1] 2 3 ... 6 Go Up Print 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.5 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!