PDA

View Full Version : Image Gallery v1.0


Zamtil
30 Jun 2001, 02:15
Instructions in the ZIP file (gallery.txt). Should explain most details of installation. I haven't done an INSTALL from scratch, so you get to beta test that part of the program.

The gallery itself seems quite stable. I added some load limiting/checking options before releasing as well. Let me know how your installs go, features you'd like to see, etc.

If you want to see an example:

http://www.noows.com/gallery.php?s=&forumid=88

Zamtil
30 Jun 2001, 05:38
Hadn't really explored the differences between JPG and GIF. I figured the files were so small, that file size wouldn't be much difference.. boy was I wrong. This is an updated copy that uses JPEG compression instead of GIF. If you've already install this hack, just replace the files, use a SQL tool to "DELETE FROM thumb" and rerun admin/gallerymakethumbs.php.

In the future I may make thumbnail type a config option, but when I saw 20k thumbnails go to 3-5k, I decided quality was a mute point.

The main change is this line in functions.php:


system("$galleryconvert -geometry '160x120>' $path GIF:$thumbname");


to


system("$galleryconvert -geometry '160x120>' $path -quality '75' JPEG:$thumbname");

eva2000
30 Jun 2001, 05:41
just another thing, what font and settings did you use for the gallery button ? mind attaching the psd file for it too :D

Znaper
30 Jun 2001, 05:42
you forgot the thumb.php in the zip file! ;)

Zamtil
30 Jun 2001, 05:45
Originally posted by eva2000
just another thing, what font and settings did you use for the gallery button ? mind attaching the psd file for it too :D

It's the exact buttons from the vBulletin 2.0 graphics development kit. I just edited one of the top_ templates and the find template. Changed the word to gallery. Actually, I didn't even save the Photoshop version, just the exported GIFs.

Zamtil
30 Jun 2001, 05:48
Originally posted by Znaper
you forgot the thumb.php in the zip file! ;)

Yep, you're right. The ZIP is now: JPEG thumbnails + thumb.php. About 8 people got ahold of the original GIF version, I'd suggest switching to this.

Zamtil
30 Jun 2001, 17:52
Would like to see it on someone else's site, post URL please.

mojotim
30 Jun 2001, 19:24
Hey, great hack, but I'm having problems.

Parse error: parse error in /usr/local/xxxxxx/httpdocs/admin/galleryinstall.php on line 17

Looks ok to me, but I keep getting this.
Using, Apache, RedHat Linux 7

-Tim

Zamtil
30 Jun 2001, 19:48
Originally posted by mojotim
Hey, great hack, but I'm having problems.

Parse error: parse error in /usr/local/xxxxxx/httpdocs/admin/galleryinstall.php on line 17

Looks ok to me, but I keep getting this.
Using, Apache, RedHat Linux 7

-Tim

Change line 17 to this:


$DB_site->query("INSERT INTO setting VALUES (NULL,$groupid,'Pages to show in nav bar','gallerynavpages','5','','',1)");


Looks like there's an extra ") at the end of the line in the released file.

mojotim
30 Jun 2001, 19:56
Got a new one:

Warning: Division by zero in /usr/xxxxx/httpdocs/gallery.php on line 108

Should there be an "@" somewhere in there?

mojotim
30 Jun 2001, 20:06
I had the Gallery Load Limit
set to the default. I erased the value and the error does not come up now.

mojotim
30 Jun 2001, 20:19
Check out this attachement and tell me if something should be in the filedata, value box.

I also go to the /gallery.php and see no attachments. I see nothing but the blank template.

mojotim
30 Jun 2001, 20:29
Here is the entire substance of my gallery.php page.

Zamtil
30 Jun 2001, 21:31
Have you run yourforums.com/admin/gallerymakethumbs.php? It should spit out a list of file names for all the JPG/BMP/GIFs it finds in your existing attachment table.

mojotim
30 Jun 2001, 22:02
I had to modify it a little:

makeThumb($thumb[attachmentid], $thumb[filename], $filename);
unlink($filename);
set_time_limit();
}
?>

notice the change of set_time_limit();

I'm using safe mode php so it didn't like that.

Anyhoo, I get a blank page. I have attachments, I even (just now) posted a new attachment and ran gallerymakethumbs.php.
Still the blank page.

First-Man
30 Jun 2001, 22:10
Please Update the *.zip File!
thx

mojotim
30 Jun 2001, 22:11
It created the table. Then I ran gallerymakethumbs and got this:

Processing attachment #11: woodchips.jpg.
Processing attachment #12: admin.gif.
Processing attachment #13: 411people2.gif.
Processing attachment #14: easton2.jpg.

So that's good I guess.

Still nothing in gallery.php
Still no filedata value.

I have ImageMagick, I can convert from telnet so I know it's installed correctly. What's up, Please?

Zamtil
30 Jun 2001, 22:16
Originally posted by mojotim
I had to modify it a little:

I'm using safe mode php so it didn't like that.



I think safe mode is your other problem as well:

safe_mode_exec_dir string

If PHP is used in safe mode, system() and the other functions executing system programs refuse to start programs that are not in this directory.

From what I saw in your database screenshot, the filedata field was blank. I'm guessing the inserts are failing. Hopefully you have rights to update your PHP.INI and add the above statement. Probably the safest thing to do is to make a copy of convert in your existing safe mode directory... pointing it at a shared bin directory kind of defeats the purpose.

You may want to remove the line:

unlink($thumbname);

From makeThumb in functions.php. If thumbnails are being created, you should have a bunch of /tmpPath/th_[RandomStuff] files. You're also gonna need to clear out your 'thumb' table once those th_ files start appearing.

Obviously I didn't test in safe mode. =)

Znaper
30 Jun 2001, 23:01
The pics dosn't display!

See here: http://www.znapers-board.de/forum/gallery.php

mojotim
30 Jun 2001, 23:10
Telnet in and go to a directory where you have some images.

Then type this:

convert -geometry 120x120 filename.jpg new_filename.jpg

this will create a thumg 120x120 of filename.jpg

if you can do this than cool, your problem lies elsewhere and I can't help you because I'm too stupid to get this to work too (different problems)

Znaper
30 Jun 2001, 23:12
i haven't telnet access thats my problem!

Zamtil
01 Jul 2001, 00:56
Originally posted by Znaper
i haven't telnet access thats my problem!

Well, you need to find out if ImageMagick is installed, and if so, where the location of convert is. This is an external utility, that is currently 100% required. http://www.imagemagick.org for more information.

Sarge
01 Jul 2001, 08:22
I installed it,
created the thumbs

And the next step wuld be this

http://www.dlrarmy.com/forums/gallery.php


Warning: Division by zero in /home/dlrarmy/public_html/forums/gallery.php on line 108


And it doesn't show... yes I have ImageMagic and it is pointing to the right place
What am I doing wrong?
chris
aol im sgtsling

msn
Sgtsling

Sarge
01 Jul 2001, 08:27
where do I set the options at?
When I ran instll it said done.. that is it.

I am not runnin safe mode
This stinks
Chris

Zamtil
01 Jul 2001, 08:30
Originally posted by Sarge
where do I set the options at?
When I ran instll it said done.. that is it.

I am not runnin safe mode
This stinks
Chris

In the normal vBulletin control panel, should at/near the bottom of your normal main options. Post your values please, I'd like to try to figure out why this div0 error is occuring.

Zamtil
01 Jul 2001, 08:54
Here's a picture of the Image Gallery control panel with my settings. The only way I've duplicated the Div0 error is by having no values set.

I've fixed gallery.php to assign default values and do a few error checks. The new ZIP is attached to my 2nd post in this thread. Until I see some working installs, I'm not gonna hassle with versioning this.

Sarge
01 Jul 2001, 09:00
http://www.dlrarmy.com/forums/gallery.php


IT just doesnt display the pics

Yes I used your settings and i do have imagemagic

Chris

mojotim
01 Jul 2001, 14:52
Here is the image, still does not work, but I have not made the suggested changes yet. I will let you know how it goes.

mojotim
01 Jul 2001, 15:01
Still same thing, no pics. By turning off Safe mode, I have gotten my other gallery script working (not connected to MySQL or vB at all) which uses ImageMagick, so I know it works and that the location is correct.

What is up with this line:



Find function acceptupload() (Line 1277):
Find (Line 1347):
$attachmentid=$DB_site->insert_id();
Change to:
$attachmentid=$DB_site->insert_id();

How come it says nothing after that? Mistake? Should we be doing something at line 1277?

VirtueTech
01 Jul 2001, 15:38
Question: Since this gallery of images is being used on the forums which uses the PHP GZIP compression agent....if the admin has it set of course....does the PHP GZIP compress the images as well?

eva2000
01 Jul 2001, 15:47
Originally posted by VirtueTech
Question: Since this gallery of images is being used on the forums which uses the PHP GZIP compression agent....if the admin has it set of course....does the PHP GZIP compress the images as well? nope.. gzip and mod_gzip only compress txt

Zamtil
01 Jul 2001, 16:41
Originally posted by mojotim
Still same thing, no pics. By turning off Safe mode, I have gotten my other gallery script working (not connected to MySQL or vB at all) which uses ImageMagick, so I know it works and that the location is correct.

What is up with this line:



Find function acceptupload() (Line 1277):
Find (Line 1347):
$attachmentid=$DB_site->insert_id();
Change to:
$attachmentid=$DB_site->insert_id();

How come it says nothing after that? Mistake? Should we be doing something at line 1277?


Er, that block of code reads as:

Find function acceptupload() (Line 1277):
Find (Line 1347):
$attachmentid=$DB_site->insert_id();
Change to:
$attachmentid=$DB_site->insert_id();
makeThumb($attachmentid, $attachment_name, $path);

The first find function is just to get you in the correct block of code.

Zamtil
01 Jul 2001, 17:33
For mojotim and others having problems. Just put this in your forums directory, along with gallery.php. Point your web browser at it or give me a URL. Just does a bunch of debug prints of script variables to help me track down where things are going wrong.

VirtueTech
01 Jul 2001, 18:24
eva2000 - I tried using mod_gzip as per its instructions to gzp the images on my site...it didn't work....sometimes the images would load up broken....so there is a way but I'm not sure about PHP's gzip

VirtueTech
01 Jul 2001, 18:55
Does this Image Gallery hack give me the ability to decide what usergroups have the right to view the gallery(s)?

Zamtil
01 Jul 2001, 19:22
Originally posted by VirtueTech
Does this Image Gallery hack give me the ability to decide what usergroups have the right to view the gallery(s)?

If they can view the forum, they can view the gallery for the forum. I suppose what you're looking for is a way to prevent anonymous users from viewing the gallery. It's a good idea for the future.

Znaper
01 Jul 2001, 19:28
here the link:

http://www.znapers-board.de/forum/gallerydebug.php

please help! thx!

mojotim
01 Jul 2001, 19:32
here is an image, I am using your templates.

Zamtil
01 Jul 2001, 20:24
Finally found a real problem, and it was a stupid one. I didn't escape my PHP variables in the install file, so they were interpreted as Null values and leaving blank spots in the templates.

Attached is a new galleryinstall.php, put it in your admin directory and run it. It will update the templates.

I'll update the zip file after I eat dinner and mojotim confirms this works.

First-Man
01 Jul 2001, 21:05
Can you post one *.zip File when it will be work?
thx

mojotim
02 Jul 2001, 01:45
All fixed, great job man!:p

Zamtil
02 Jul 2001, 01:52
http://www.vbulletin.com/forum/showthread.php?s=&postid=133145#post133145

jarvis
02 Jul 2001, 02:17
Here is the error I get when uploading a file to my board. The upload works fine, but the convert appears not to...

Also, the program appears to work somewhat, but my thumbs are missing from the page...

I'm going to try the latest zip to see if that helps... Thanks!

GTW, this is Win2k, so I'll keep plugging away...

Sarge
02 Jul 2001, 03:01
almost

The thumbnails will not work

http://www.dlrarmy.com/forums/gallery.php

I have imagemagic installed BTW

Sarge
02 Jul 2001, 03:03
http://www.dlrarmy.com/forums/gallerydebug.php

Zamtil
02 Jul 2001, 03:28
Originally posted by Sarge
almost

The thumbnails will not work

http://www.dlrarmy.com/forums/gallery.php

I have imagemagic installed BTW

Is the path to convert set correctly in the config?

Are you running in safe mode?

Sarge
02 Jul 2001, 05:08
it si the bsic red hat linux install and it works cause I use imagefolio


HOw could I tell if the path is incorrect?

Zamtil
02 Jul 2001, 05:18
Originally posted by Sarge
it si the bsic red hat linux install and it works cause I use imagefolio


HOw could I tell if the path is incorrect?

At a shell prompt:
rpm -ql ImageMagick | grep convert

The setting I use by default is:
/usr/X11R6/bin/convert

Sarge
02 Jul 2001, 05:39
do you have a prompt for telnet?

TechTalk
02 Jul 2001, 10:23
My thumbs arent making their way into the thumbs table but im getting the processing messages.

http://www.iguanaland.com/vbforums/gallerydebug.php

Can anyone help?

Sarge
02 Jul 2001, 13:51
/usr/X11R6/bin/convert


Is my path....

It is right in the options.. still looking at broken thumbd.

HELP!

mojotim
02 Jul 2001, 14:19
Originally posted by mojotim
Telnet in and go to a directory where you have some images.

Then type this:

convert -geometry 120x120 filename.jpg new_filename.jpg

this will create a thumb 120x120 of filename.jpg



You say you have ImageMagick but no thumbs to prove it.:confused: Try to do this telnet operation and see if it works.

Zamtil
02 Jul 2001, 17:14
Please check to see if you're running in safe mode.

An easy way to do this is to create a file called phpinfo.php. It should contain these 3 lines:

<?php
phpinfo();
?>

Put it in your forums directory and point your web browser at it. If you search for 'safe_mode', you should find 2 lines. safe_mode and safe_mode_exec_dir. If safe_mode is on, then safe_mode_exec_dir HAS to contain your a copy of convert. If you don't have shell access/admin access to your server, I doubt you will be able to make this change.

Sarge
02 Jul 2001, 17:51
safe_mode
Off Off

http://www.dlrarmy.com/forums/phpinfo.php

TechTalk
02 Jul 2001, 20:15
Safe mode off/off here too and images still not making it into the table.

http://www.glidetech.com/phpinfo.php

Zamtil
02 Jul 2001, 20:39
Originally posted by TechTalk
Safe mode off/off here too and images still not making it into the table.


Is the filedata field in the thumb table blank? Trying to figure out if the error is in making the thumbs or just displaying them.

You can also try remarking out this line in functions.php:

unlink($thumbname);

Just put a // at the start of the line.

Then make a dumby post, with a BMP/JPG/GIF attachment. If ImageMagick part is working, it'll create a file:
/tmppath/th_[randomstuff].

/tmppath is most likely /tmp, but may vary.

TechTalk
02 Jul 2001, 20:49
My problem is with it being added to the DB. Looking at it thru phpmyadmin there are no records there.

I guess I will try the thing you mentioned above, although im not sure what difference that will make

~Chris

TechTalk
02 Jul 2001, 20:56
OK just tried that. The th_ files are showing up each time i post an image. They are all 0kb though :confused:

TechTalk
02 Jul 2001, 20:59
Another note. Running the gallerymakethumbs.php file also puts a temp file in the tmp directory for each attachment i have (all 0KB) but still nothing in the DB

~Chris

Zamtil
02 Jul 2001, 21:06
Originally posted by TechTalk
Another note. Running the gallerymakethumbs.php file also puts a temp file in the tmp directory for each attachment i have (all 0KB) but still nothing in the DB

~Chris

Ok, what version of ImageMagick do you have installed? If it's RedHat, should be able to just: rpm -q ImageMagick at the command prompt.

If it's older then 5.3.3-2, let's try simplifying your convert statment. In functions.php, find this line:

system("$galleryconvert -geometry '160x120>' $path -flatten -quality '75' JPEG:$thumbname");

and change it to
system("$galleryconvert -geometry '160x120>' $path -quality '75' JPEG:$thumbname");

The -flatten parameter "flattens" out animated GIFs. Otherwise, convert tries to make a JPG for each frame of the GIF. 10 frames = 10 files, makes a real mess in the /tmp directory.

TechTalk
02 Jul 2001, 21:14
That did it bro. Thanks alot ;)

I had installed ImageMagick-4.2.9-3

~Chris

TechTalk
03 Jul 2001, 03:32
Real quick question. Can you add a function to gallery.php that will generate a drop down box with all the users names in it so that you can view the gallery by user ?

It sounds easy but im not sure how to go about it.

Thanks
~Chris

Zamtil
03 Jul 2001, 04:27
Originally posted by TechTalk
Real quick question. Can you add a function to gallery.php that will generate a drop down box with all the users names in it so that you can view the gallery by user ?

It sounds easy but im not sure how to go about it.

Thanks
~Chris

I thought about it, but ... my site has 900+ users and growing, I guess it could be an option. Check my membership list, simple template editing lets you add links from each individual user to their gallery.

TechTalk
03 Jul 2001, 04:29
Yea i can do the template thing. But i was hoping to have another dropdown on the actual gallery page with all the members names :cool:

~Chris

ToraTora!
03 Jul 2001, 04:48
a guy should be able to do that simular to the way the forums work in the "jump box". each new forum added, shows up in the jumpbox automatically, meaning, that each new member that posted a pic to the gallery, could be automatically entered in the "drop down" simular to the jump box using a "last post by(?)" type of command.

TechTalk
03 Jul 2001, 19:46
Also while im thinking about it...... Do i have to run the makethumbs every time new files are added?

The reason i ask is i can run it now and each time i do i get this:
Processing attachment #1: iguana-1.gif.
Processing attachment #23: mov00010.mpg.
Processing attachment #24: mov00012.mpg.
Processing attachment #68: caresheetniad.zip.
Processing attachment #103: tarzan2.zip.
Processing attachment #104: iguanas.scr.
Processing attachment #158: swish-ig.gif.


I can see it not processing the zip scr or mpg files but is it having a problem with the images with a dash (-) in the name? Seems like they stay in this list.

Thanks
~Chris

Zamtil
03 Jul 2001, 20:10
Originally posted by TechTalk
Also while im thinking about it...... Do i have to run the makethumbs every time new files are added?

The reason i ask is i can run it now and each time i do i get this:
Processing attachment #1: iguana-1.gif.
Processing attachment #23: mov00010.mpg.
Processing attachment #24: mov00012.mpg.
Processing attachment #68: caresheetniad.zip.
Processing attachment #103: tarzan2.zip.
Processing attachment #104: iguanas.scr.
Processing attachment #158: swish-ig.gif.


I can see it not processing the zip scr or mpg files but is it having a problem with the images with a dash (-) in the name? Seems like they stay in this list.


As long as you made the necessary changes to functions.php - adding makeThumb and modifying acceptupload, new attachments will be inserted automatically.

As for the gifs, are they animated? If so, thumbnails aren't gonna be generated with your older version of ImageMagick.

Sarge
11 Jul 2001, 09:18
It Worked!

Question
how can I change it so that the poulldown only selects forums that are active?
I have a few inactive forums I use with the webblog and it shows them.,,.. and I don't want them to

RobAC
13 Jul 2001, 04:32
quick question, do you have to have the latest version of ImageMagick installed or will the code change that was suggested for TechTalk work on the older version. TechTalk?

Sarge
13 Jul 2001, 06:29
The code change works. Apparently i have an older version

I cannot use this till I can change the dropdown to show only active forums!

Chris

White Knight
13 Jul 2001, 18:43
Ok, I know a lot of people got this to work but I need to say a couple things since I had a lot of problems

First, The instructions are kinda slippy. It didnt really point to where things should go. There are line numbers but that doesnt do any good with notepad.

It doesnt have everything in order. Should you upload all the files first? which goes next. In order would be nice.

I have installed UBB hacks. Vb hacks and custimized some of the hacks. This one I just couldnt figure out.

I think the dox needs a bit of a updating. Step by step instructions. I know there a pain in the butt to write but its helpful for other people to do the hack then trying to figure out what you ment.

Great hack idea. It looks great on boards I see it on. But docs could use some help.

This is only a suggestion. If the dox do get updated can you please reply that you updated them. Then I will take a third steb at it.

mojotim
13 Jul 2001, 19:51
I added a little more to Zamtil's instruction in the hopes to make the install easier for everyone. It's a great hack and works great as well. You just have to know how to install it.

This is how I did it just this morning on a new site. It might help someone out.
This should go without saying, but as with any hack Zamtil nor I take any responsibilty if you screw up your site. I have used the hack on 4 seperate boards and have not run into any problems. That being said, be careful and backup anyway.

RobAC
13 Jul 2001, 19:52
mojotim, thanks. I'll be installing this hack shortly so this will come in handy.

RobAC
13 Jul 2001, 23:58
I just went into my change options in the Admin CP and the options to change for the gallery have been added three separate times.

mojotim
14 Jul 2001, 00:06
Everytime you run galleryinstall.php it adds the templates and options again. The ones at the top are the new active ones. I tried to peek at your site but it was down for maintenance.

RobAC
14 Jul 2001, 00:19
Originally posted by mojotim
Everytime you run galleryinstall.php it adds the templates and options again. The ones at the top are the new active ones. I tried to peek at your site but it was down for maintenance.

So how do you delete the others?

mojotim
14 Jul 2001, 00:25
i think you'd have to go through the style to take out the ones in the options. I left'em, screw it...I've got a lot more to worry about than that :p
You can remove the templates easy enough from the control panel. Just leave the top one of each gallery component.

Zamtil
14 Jul 2001, 00:25
Originally posted by RobAC
I installed the hack, but this is what I get. I made the changes to the code as suggested here in the thread since I'm running the older version of ImageMagick. Any ideas what I should do?

http://corvetteactioncenter.com/forums/gallery.php

Have you run admin/gallerymakethumbs.php?

I'm not sure how you got the admin options three times, sounds like you did a couple of refreshes of galleryinstall.php. Should be able to clean those up with your favorite SQL tool.

Zamtil
14 Jul 2001, 00:28
http://your.url.com/admin/setting.php

It ships with 2.0.1, I assume 2.0.0 as well. It's just a little utility JelSoft wrote/provides for customizing options. The Image Gallery stuff should be down near the bottom, leave one grouping of them, delete the others.

RobAC
14 Jul 2001, 00:30
When I initially ran the make thumbnails file it listed all the files that it made....282...etc. The files are listed in the database, but they are empty. If I try running it again, all I get is this:

Processing attachment #31: buyersguide.txt. Not sure what that is, but I don't think it would hamper making thumbnails for any of the others.

Zamtil
14 Jul 2001, 00:35
It won't try to remake thumbnails that are already in the database. Did you run gallerymakethumbs.php with the --flatten option enabled originally?

Edit your functions.php and comment out the line:

unlink($thumbname);

in function makeThumb. Then try posting a new message with an image attachment. Go to your /tmp directory and see if a thumb_{random stuff} file was created and is greater then 0 bytes.

Also, are you running in safemode?

RobAC
14 Jul 2001, 00:38
Originally....no.

I'm not running in safe mode. I'll try and post an image...

RobAC
14 Jul 2001, 00:39
I am finding a discrepancy in the database. Record #31 is missing which is the record it's trying to make out of a text file attachement somewhere in the forums.

mojotim
14 Jul 2001, 00:41
bingo!
I posted an image (http://corvetteactioncenter.com/forums/gallery.php?s=&userid=&forumid=41&galrows=5&galcols=2)

Zamtil
14 Jul 2001, 00:42
Originally posted by RobAC
I am finding a discrepancy in the database. Record #31 is missing which is the record it's trying to make out of a text file attachement somewhere in the forums.

Yeah, the way things work, gallerymakethumb.php just runs through ALL attachments, writes them to disk, and then calls function makeThumb on it. function makeThumb does the check to see if the file is a valid GIF/JPG/PNG, whereas gallerymakethumb.php prints out the processing message. It's nothing to worry about, just a silly bug because I wrote gallerymakethumb.php in 5 minutes. =)

RobAC
14 Jul 2001, 00:42
I wonder if I should just delete everything and try running the install script again???

RobAC
14 Jul 2001, 00:43
Originally posted by mojotim
bingo!
I posted an image (http://corvetteactioncenter.com/forums/gallery.php?s=&userid=&forumid=41&galrows=5&galcols=2)

Hmmmm.....ok.....cool....so it works with new images posted. ROFL :L What does that mean? :)

Zamtil
14 Jul 2001, 00:45
Originally posted by RobAC


Hmmmm.....ok.....cool....so it works with new images posted. ROFL :L What does that mean? :)

Hm, I'm still not showing any images in the gallery.

mojotim
14 Jul 2001, 00:48
I posted it in the test forum

try this:
http://corvetteactioncenter.com/forums/gallery.php?forumid=41

RobAC
14 Jul 2001, 00:59
I'm curious....so....if new images that are posted show up in their respective forum ids, does that mean that ImageMagick is working?

mojotim
14 Jul 2001, 01:02
That's the deal, it's working. Something is going wrong with (I think) gallerymakethumbs.php not reading the attachment from the database. At least that's what it seems, I may be mistaken.

RobAC
14 Jul 2001, 01:08
Not sure if this is a clue or not, but if I go into phpmyadmin and look at the file data for the pics that mojotim added, this is what I see:

JFIFC    $.' ",#(7),01444'9=82<.342 ( /!1A"#Qa2R$Bq?DDDDDDDDDDDDDDDDDDDDD^W?(ܞ|2xDVA-iSghum['?`k˲+ϑ#WF*e\gDhړcNC|& %vH֞;VMqj 2i+ɉ$[>7~my,Xx؆.uEk#Cbci姊B+X3zz#zVÔ xFc32y4a]3&f\~K'gGI;t\xf+\;s)a# (h:hhb x7&k".^r'~Onz|ŮڿDDDD\;3w+&4Ib6I^4N#e_|m՞1k<1Dm.=>ERZ2Ֆ !O?N-9j7j/Qq2F;7q,^V -n>F+j&84؀Upos6Tٞ+6q:8蓧ĸv읚V.ԎyKV{lciPWe 7HSg^7q8j,Iǯ,3 |aH8 F6@+@`kG B""""""""""""

Zamtil
14 Jul 2001, 01:11
I have yet to see a link that displays anything but a blank thumbnail gallery. gallery.php or galler.php?forumid=41.

I'm just viewing as a anonymous user, could this be a permissions issue? ... pretty sure if the user can see the forum, they can see the gallery though.

What was the result of commenting out the unlink statement? Are you getting thumb_xxxx files in your /tmp directory?

RobAC
14 Jul 2001, 01:14
No results with commenting out that line.

if you mean the /tmp directory on my server, no, there are no files there labeled thumb_xxxx

RobAC
14 Jul 2001, 01:35
I think I have to give up with this hack. I've uninstalled it and re-installed it several times, trying everything and nothing works. :(

RobAC
14 Jul 2001, 03:08
Just a comment....I've tried installing this hack so many times, that I just found that when you run the install script....it doesn't rewrite over the old templates...it installs the same ones over and over again, so there are 6-8 of the same template installed. This really should be fixed somehow in the installation script. So how can I mass delete all the templates that were created???

RobAC
14 Jul 2001, 04:15
Well....I've given this hack one more shot and I still can't get it to work. I've upgraded from vB 2.0.0 to 2.0.1....I also had the old version of the gallery zip file from 6/30 before the updated version was released on 7/1. I noticed that when I ran the old install file, the records that were created in the thumb table had data in them....at least when viewed through phpmyadmin, binary code was in each file. However....when after completing the installation, when you go to gallery.php, nothing appeared but a couple of lines and the forum nav bar.

I uninstalled everything. Downloaded the updated (7/1) version and reinstalled it. This time, it only took 2 seconds for the gallerytumbnail script to run....I knew that each record created in the table...was empty. Sure enough, I confirmed it. However, when going to gallery.php, everything appears except the actual thumbnails. So....somewhere along the way, something still isn't right.

The other thing I noticed is that the size of the gallery install script on 6/30 was only 6kb. The released version on 7/1 is 11kb. That's almost double in size. Why would the original 6/30 installation script seem to install data in the records, but the new version does not?

I've tried every single combination of fixes listed in this thread and no matter what I do, I can't get this to run. :(

Sarge
14 Jul 2001, 17:04
ANYONE HELP!

I have posted this serveral times with no response.
How do I make on the dropdown only active forums shown?
It is listing even forums that are inactive (i have a bunch)


Please help
Thanks

mojotim
14 Jul 2001, 17:35
Don't know, maybe Zamtil?

Sarge
14 Jul 2001, 20:54
Bueller? Bueller?

ToraTora!
15 Jul 2001, 10:05
Originally posted by Sarge
ANYONE HELP!

I have posted this serveral times with no response.
How do I make on the dropdown only active forums shown?
It is listing even forums that are inactive (i have a bunch)


Please help
Thanks


Are you refering to "new" posts or threads in active forums, or just forums that are hidden, and not shown to the public. Im not understanding the whole question here, but your jump box script usually can bail you out of that one, for it displays forums that should be seen by certain users. So, if you have a masked gallery, it will show up in the pulldown jump box to the users who have permission to see it, and in the same sense, display nothing to the user who should NOT see it.

Sorry if Im way off base on this one Sarge, im just having a hard time understanding what it is your asking is all. :)

Sarge
15 Jul 2001, 18:04
I have several forums that are hidden and not active for users..
I us them with the bfc weblog

When I view the gallery dropdown.. it lists every forum that I have...including the 10 forums that do not display on my actual index.php

I want it to only display active forums..
Understand?
Hope I could explain it

mojotim
15 Jul 2001, 18:39
Are you looking at them logged in as the admin or moderator? Do you still have this problem if you're not logged in, or logged in as a regular member?

Sarge
15 Jul 2001, 18:56
The same as an admin or a reg member

ToraTora!
15 Jul 2001, 22:00
Originally posted by Sarge
I have several forums that are hidden and not active for users..
I us them with the bfc weblog

When I view the gallery dropdown.. it lists every forum that I have...including the 10 forums that do not display on my actual index.php

I want it to only display active forums..
Understand?
Hope I could explain it

My question is, if all members can see the hidden forums, Can they access them as well? (when they choose lets say a hidden forum that is masked and has forum permissions set on) Or does a log-in prompt ask the users who are not allowed in these forums, to log-in due to the permissions aspect?

Either way, I would just copy the jump box IF it doesnt do the same thing, and add it where your hardcoded box is. If your gallery is a few of those "hidden" forums, than they will be hidden on the Jump box as well.
The jump box as I previously stated, only shows the forums that are allowed to be seen by those who have the permissions to do so. The masked jump box, would work perfect for your set up.

What happened i think, is that you hardcoded the addys to your hidden forums, and they are showing up in your dropboxes.

RobAC
17 Jul 2001, 15:48
Just wondering if there's been any further progress on this? I'd love to be able to get this hack working on my site. :)

White Knight
17 Jul 2001, 15:58
I wanted to make a quick comment about this script.

After the perfect instructions that I had everything installed just fine.

The one problem I did come up with is that I have over 2000 attachments on my site on a dedicated box. The CPU went very high. In fact peaking at 26.5 at times. Basically killing the website process.

It was the image software though.. not the php coding.

I suggest anyone installing this to clean up your attachments before you attempt this install. I accually aborted out of the idea.

Good luck.

fmoise99
20 Jul 2001, 17:25
I am having the same problem also. I just cannot get the script to work! I would love to have this gallery on my site. I tried everything this thread said to do, but no luck. I confirmed the path to ImageMagick with my provider also.


You can view my gallery here!

http://www.islandchat.net/forums/gallery.php

http://www.islandchat.net/forums/gallerydebug.php

Any help would be appreciated.

Zamtil
21 Jul 2001, 04:54
Originally posted by White Knight
I wanted to make a quick comment about this script.

After the perfect instructions that I had everything installed just fine.

The one problem I did come up with is that I have over 2000 attachments on my site on a dedicated box. The CPU went very high. In fact peaking at 26.5 at times. Basically killing the website process.

It was the image software though.. not the php coding.

I suggest anyone installing this to clean up your attachments before you attempt this install. I accually aborted out of the idea.

Good luck.

Not sure why your load went so high.. it'll only try to create one thumbnail at a time. My own site has 1000+ attachments, I've deleted the thumbs table for testing purposes and load hasn't gone through the roof. I'll take a look into it, been busy, but I'll be making the hidden forum change and a few other requests this week.

RobAC
24 Jul 2001, 21:09
Interestingly, I thought I'd post an update on my problems with this hack. I added and when it wasn't working, I just left it alone. Any image that has been posted to the Forums since the date of installation....has been properly thumbnailed and viewable in the gallery. Any images prior to the date of installation, will not thumbnail. I now have to go and delete 300+ thumbnail records out of the table and then the hack should be ready to release to my members.

Kengan
26 Jul 2001, 10:34
Processing attachment #1: 123.gif.

Fatal error: Call to undefined function: makethumb() in /home/imldes/www/forum/admin/gallerymakethumbs.php on line 14

any idea ?:confused:

Kengan
26 Jul 2001, 10:38
Originally posted by mojotim
I added a little more to Zamtil's instruction in the hopes to make the install easier for everyone. It's a great hack and works great as well. You just have to know how to install it.

This is how I did it just this morning on a new site. It might help someone out.
This should go without saying, but as with any hack Zamtil nor I take any responsibilty if you screw up your site. I have used the hack on 4 seperate boards and have not run into any problems. That being said, be careful and backup anyway.

Thanks ! will you post again in another format ! hard to view !

will you ?

mojotim
26 Jul 2001, 12:15
Originally posted by Kengan
Processing attachment #1: 123.gif.

Fatal error: Call to undefined function: makethumb() in /home/imldes/www/forum/admin/gallerymakethumbs.php on line 14

any idea ?:confused:

Sound like there's no ImageMagick on your server, or the path to it is wrong.

As far as the instructions go, hard to read? It's a text file and that's as easy as it gets.

Zensai
26 Jul 2001, 14:48
Is there anyway to implement this hack on a Win 2000 server?

Kengan
26 Jul 2001, 15:24
Originally posted by mojotim


Sound like there's no ImageMagick on your server, or the path to it is wrong.

As far as the instructions go, hard to read? It's a text file and that's as easy as it gets.

Thanks !

How do I know the ImageMagick on my server ?

;)

nickmarksdotcom
27 Jul 2001, 20:19
I am trying to make a place where people can post their textures for free and come and find textures to use in their work. It is a very noble cause that will help a ton of artists. I am trying to figure out this Gallery thing but I am not a programmer and don't know squat about servers or installing ImageMagik....I could sure use someone's help on getting this stuff this stuff installed. I would be enternally grateful. THanks

Nick

Blackangel
04 Aug 2001, 16:00
This work fine for me.

But how i can get a page with a list of all user with the number of image in they gallery ?

same style of this : http://www.chins-n-quills.com/forums/gallery.php


who can help me !

RobAC
10 Aug 2001, 00:35
This hack no longer seems to work after upgrading vBulletin 2.0.3. I've rehacked the functions.php file and reran the gallery installation hack and for some reason, the page navigation does not show up on gallery.php and the page will not load in netscape. No matter what changes you make to the options in the Admin CP, they don't work.

mojotim
10 Aug 2001, 00:48
still works for me. are the templates still in there?

RobAC
10 Aug 2001, 00:54
Yep. When I ran the install script it came back and said that the templates were updated. They're all there. All 8, correct? I haven't hacked any of them. Did you upgrade to 2.0.3?

mojotim
11 Aug 2001, 07:49
Yes, I updated to 2.03.

I just checked my gallery php files and they are the same as the last zip. So, know changes were made and mine works.

fmoise99
14 Sep 2001, 19:15
Originally posted by RobAC
This hack no longer seems to work after upgrading vBulletin 2.0.3. I've rehacked the functions.php file and reran the gallery installation hack and for some reason, the page navigation does not show up on gallery.php and the page will not load in netscape. No matter what changes you make to the options in the Admin CP, they don't work.

That is true. I am having the same problem. Appearently, vbulletin changed the page navigation style they were using and now the page navigation does not work on the image gallery. I checked, the template names were changed.

Does anyone have the new code that will fix this?

ToraTora!
14 Sep 2001, 20:06
Originally posted by RobAC
This hack no longer seems to work after upgrading vBulletin 2.0.3. I've rehacked the functions.php file and reran the gallery installation hack and for some reason, the page navigation does not show up on gallery.php and the page will not load in netscape. No matter what changes you make to the options in the Admin CP, they don't work.

I noticed you said netscape...it is possible that the tables are not showing up for nutscrape. it happened with a couple of things before i tried to add..
Try using IE, and if that doesnt display, than i would take a look at your tables in MYSQL, and see if there is any info going in or out. I am assuming that the pics are strored in a folder, so it is possible that the folder is no longer chmodded or even there to begin with..of course, i am just throwing out loose ideas here, so dont bite my head off.

fmoise99
14 Sep 2001, 22:14
The real problem is with the page navigation. If I can get my hands on the old vbulletin 2.01 templates numbernav and numbernav_pages.

That would fix the page navigation problem without modifying code.

Delhaze
17 Sep 2001, 13:12
I managed to get this working on IIS 5 on Windows 2000 Server.

I have a few questions

I changed the line

system("$galleryconvert -geometry '160x120>' $path -flatten -quality '75' JPEG:$thumbname");

to

system("$galleryconvert -geometry 160x120 $path -flatten -quality 75 JPEG:$thumbname");

as the convert was creating 0 length files.

What are the ' and > for ?

I also had to //comment out the if ($filesize != 0) line as the test was always failing.

Any idea why?

phumphries
17 Sep 2001, 13:53
All the galleries that I checked out had the same problem with an unclosed table.

If you can get through the spurious HTML errors on this validator (http://validator.w3.org/check?uri=http%3A%2F%2Fcorvetteactioncenter.com%2Fforums%2Fgallery.php%3Fforumid %3D41&charset=%28detect+automatically%29&doctype=Inline), you will see that there is a FORM embedded improperly and an unclosed table. IE doesn't care, but NS does crap out.

(Corvette Action Center: I hope that you do not mind that I used your gallery as an example.)

RobAC
17 Sep 2001, 14:16
Originally posted by phumphries
All the galleries that I checked out had the same problem with an unclosed table.

(Corvette Action Center: I hope that you do not mind that I used your gallery as an example.)

Not at all. I had looked into the problem a while ago and couldn't figure out what the problem was given the amount of time I had to look into. I dropped it for a while, but will go back and revisit it now. Thanks!

-Rob Loszewski, Site Administrator
Corvette Action Center

Delhaze
17 Sep 2001, 18:15
Originally posted by Delhaze
What are the ' and > for ?

Answering my own question.

I read the docs and found out the > stops it making images smaller than the thumbnail size bigger.

I've put it back in and it is working OK.

RobAC
20 Sep 2001, 20:46
Originally posted by fmoise99
The real problem is with the page navigation. If I can get my hands on the old vbulletin 2.01 templates numbernav and numbernav_pages.

That would fix the page navigation problem without modifying code.

Does anyone have an update for this? This hack would work perfectly if either numbernav templates were made (I no longer have these after upgrading to 2.0.3), or if the code in gallery.php was corrected to utilize the correct templates.

Delhaze
26 Sep 2001, 01:01
I didn't have enough images on my board to require page navigation until now, so I couldn't see the bug some of you had noticed.

But I do now.

Anyway I had a look in an old backup and found the required templates.

As they are no longer in use I hope it's not a problem posting the code here.

numbernav
[ $firstpage_atag&lt;&lt;$endfirstprevtag &nbsp;&nbsp; $prevpage_atag&lt;$endfirstprevtag &nbsp;&nbsp; $pagenumbers $nextpage_atag&gt;$endlastnexttag &nbsp;&nbsp; $lastpage_atag&gt;&gt;$endlastnexttag ]

numbernav_pages
$numbernav_atag$curpage$endpagetag &nbsp;&nbsp;

I have tested them and they are working fine. :cool:

RobAC
26 Sep 2001, 02:12
THANKS!!!!!! :D

Kengan
26 Sep 2001, 14:13
Where is the new version ?

maverick1236
26 Sep 2001, 19:59
anyone get this up on a windows machine yet?

Delhaze
26 Sep 2001, 21:31
Originally posted by Maverick1236
anyone get this up on a windows machine yet?

Try looking above

clubplanet
05 Oct 2001, 20:28
I think I finally have this working...

http://bbs.clubplanet.com/gallery.php

But it is INCREDIBLY slow. Is it supposed to be this slow? The rest of the site is not... Thinking maybe I did something wrong.

Anyone?

TechTalk
06 Dec 2001, 22:33
Is there an updated version for VB 2.0.3? /admin/functions.php is completely different and the "acceptupload" function is no longer existing :( I cant get it to work on 2.0.3 for anything and I had it working perfectly before.

Please help

TechTalk
15 Dec 2001, 22:35
BUMP!

How about an updated version for 2.2.1? This was a main feature on my site and I was forced to remove it because it didnt work with 2.2.1

talon3dhq
20 Dec 2001, 18:58
I have to agree. This is a great hack, and I even had my New host install ImageMagik so I could is this, and now I can not.. Hope there is a 2.2.1 version coming out soon!!

Talon

Gutspiller
05 Jan 2002, 22:47
Somebody mind explaining what this hack does, since I can't find a description for it? :confused:

TechTalk
07 Jan 2002, 06:34
It doesnt do S-H-I-T anymore, since noone can take the time to make it compatible with ther latest version of VB

gabs
18 Jan 2002, 22:23
I got this working with minor modifications after upgrading a 2.0.3 board that had a working gallery in it. I have no idea if this will work in other cases.

Anyways, what I did was this:

follow the instructions in gallery.txt, untill you get to :

Find function acceptupload() (Line 1277):
Find (Line 1347):
...

Skip the whole part, and Do this instead:

Find function acceptupload():

Find:

fclose($filenum);
unlink($attachment);


Replace it with:

fclose($filenum);
//unlink($attachment); //galhack



Find:

$attachmentid=$DB_site->insert_id();


Replace it with:

$attachmentid=$DB_site->insert_id();
makeThumb($attachmentid, $attachment_name, $attachment); //galhack
unlink($attachment); //galhack


And then follow further instructions in gallery.txt from CONTROLL PANEL OPTIONS.


That's all folks

"This is all i actually had to do too get it working, as I did a code comparison upgrade..."

Gutspiller
18 Jan 2002, 22:35
What if I have a 2.0.3 board? Will the original code work? and WHAT DOES THIS HACK DOOOOO? :frus:

gabs
18 Jan 2002, 22:43
oh it works great with 2.0.3 -

What it does, well it gives you an Image gallery on your forum.
It makes thumbnails of all attachments, and provides easy access to them and theyr post..

oh hell, heres a screenshot - a picture say's more than a thousand words ( the "please select image gallery" is your forums list ):

Steph2k
18 Feb 2002, 18:23
Do Gabs modifications work for 2.2.2???

Steph

gabs
18 Feb 2002, 18:38
they work for me.. :)

fmoise99
06 Mar 2002, 23:05
Worked fine for me too. :D

AndyTSJ
28 Apr 2002, 20:27
Seems like a while since this hack was last discussed ! Anyone still running it, using vbulletin2.2.2 + ?

george_proost
30 Apr 2002, 13:55
:chinese:

TechTalk
30 Apr 2002, 22:16
Originally posted by george_proost
:chinese:

It doesnt work on 2.2.x without an assload of changes. I have been there and tried it, and none of the instructions match up with the code.

AndyTSJ
01 May 2002, 19:17
That's what I suspected after reading some of the earlier posts. Sounds like some folks were making a ton of code changes that were not documented in the original installation instructions, making it an extremely difficult hack to install.

memobug
27 Jul 2002, 09:02
Does anyone have this running with 2.2.6?

Is this one dead? Too bad, I think it's exactly what I need. I have photopost, but this sounds like it integrates much more tightly with the vB forum.

george_proost
31 Jul 2002, 11:57
on 2.2.6 as well

:bandit:

Dark_Wizard
06 Aug 2002, 17:18
Originally posted by george_proost
on 2.2.6 as well

:bandit:

That's funny...your forums are version 2.2.1. Do you have a url for us to see it? Otherwise I will work on this as I need something for one of my customers.

Freefall
12 Oct 2002, 01:11
Hey,

I have installed it and everything, but there is a slight problem - the page is blanc. I did everything right, but the templates didn't install. If I can't find a way, i wouldn't mind just creating them myself if someone could attatch them for me :)

Thanx

NTLDR
27 Oct 2002, 20:54
After a bit of trial and error I got this working on vB 2.2.8, very nice hack indeed.

Thanks for sharing, this is just what I needed :D

Brad
30 Oct 2002, 06:28
Anyone care to share how they got it working?

Dark_Wizard
30 Oct 2002, 14:39
Actually it is easy to get it working but requires a few changes if you have PPN's "Attachments as Files" hack. I looked it over quickly and made changes to the original install file...try the one I attached and let me know if it works.

Brad
27 Nov 2002, 07:49
I have attachments as files installed :(, anyone care to edit the code to work with it? i really need a gallery.

94supratt
14 Jan 2003, 01:02
I got no thumbs. I get this when I run debug...

"perpage = 10
galrows = 5
galcols = 2
gallerypage = Image Gallery
gallerytitle = Image Gallery
SELECT COUNT(*) as thumbs FROM post LEFT JOIN thumb ON post.attachmentid=thumb.attachmentid LEFT JOIN thread on post.threadid=thread.threadid WHERE post.attachmentid AND post.visible=1 AND thumb.attachmentid IS NOT NULL
Total thumbs: 259
SELECT thumb.attachmentid, post.postid, post.title FROM post LEFT JOIN thumb ON post.attachmentid=thumb.attachmentid LEFT JOIN thread on post.threadid=thread.threadid WHERE post.attachmentid AND post.visible=1 AND thumb.attachmentid IS NOT NULL ORDER BY thread.forumid, post.dateline DESC LIMIT 0,10
Row: 0, Col: 0
Row: 0, Col: 1
Row: 1, Col: 0
Row: 1, Col: 1
Row: 2, Col: 0
Row: 2, Col: 1
Row: 3, Col: 0
Row: 3, Col: 1
Row: 4, Col: 0
Row: 4, Col: 1
"

Natch
14 Jan 2003, 16:56
I got this working on 2.2.9 after a bit of work ... added an auto-centering popup script to round it out ...

http://www.mobileforces.org/forums/gallery.php

jundat
15 Jan 2003, 20:18
any one help me how to post new image to gallery.
i'm using vbb 2.2.9 now.
Thanks for read !

Xyphen
26 Jan 2003, 01:37
Can we get a live demo here, the demo in the first post is deleted i think..

TheComputerGuy
26 Jan 2003, 15:38
check thaat one link...it looks kinda awesome to me...

but if you are looking for a photopost type script go to wwww.4images.de vBulletin intergration

Russ_T
15 Jun 2003, 13:09
I need a quality gallery on par with that one you have to pay $150 for. I run 2.3.0. I'm willing to work with people to make this hack or a new one compatible so long as what we release is quality.

If anyone knows of a suitable 2.3.0 gallery, an updated hack or wishes to get going on this project please contact me.

Alekos
03 Mar 2004, 18:19
does it work fine?

Russ_T
04 Mar 2004, 18:00
I bought Photopost in the end so I can't say.

Fking
11 Mar 2004, 00:56
check thaat one link...it looks kinda awesome to me...

but if you are looking for a photopost type script go to wwww.4images.de vBulletin intergration


does it already hav vbulletin integration? i though it has only phpbb integration......

too bad the whole site is in german.....


btw, the link to the scripts in this thread is dead, can someone show me live demo?

mondaynightmike
30 Mar 2004, 23:36
So is this now dead or does this work?

I'm gonna give it an install on mine to see if i can get it working as i need a gallery.

Anyone else have any luck?