PDA

View Full Version : Sneak Preview! Image Gallery Hack


Zamtil
06-26-2001, 11:37 PM
<a href="http://www.noows.com/gallery.php" target="_blank">http://www.noows.com/gallery.php</a>

I know gallery.php is the same filename Freddie uses. However, this is my own hack, from scratch (although I do have some large chunks of borrowed vBulletin code).

It adds a new table called 'thumb' and uses ImageMack to generate thumbnails ONCE. It also adds a thumb.php file, which is basically a modified copy of attachment.php. No changes to existing PHP files or tables are necessary. I've written a small PHP file to make thumbs of all existing JPG/GIF/BMP/PNG attachments. Thumbs are generated and stored as GIFs.

AFAIK all security aspects are intact. My release will only support ImageMagick (via PHP system() call), if someone else needs GD/NetPBM support, they're welcome to hack-my-hack.

I'd like to get some feedback from Jesoft before I release. As I mentioned, I use some fairly large blocks of their code (from search.php and attachment.php) and want to make sure their are no issues. If it provides enough functionality, I'd have no problem with Jelsoft incorporating it into their next release, rather than me maintaining it as a hack.

Steve Machol
06-26-2001, 11:49 PM
I just wanted to say nice job! I'm looking forward to seeing how this hack progresses.

RobAC
06-27-2001, 01:02 AM
Very cool. Nice job!

Lordmusic
06-27-2001, 08:16 AM
So basically this hack just takes the images ever posted in a forum and displays them on a page? Is there any way to edit the images, remove the naughty ones, add ones not posted and so forth? Perhaps a way for people to submit?

Znaper
06-27-2001, 12:05 PM
Can you post this Hack here?
Thx
Sorry for my bad englisch, but i come's from germany! ;)

Zamtil
06-27-2001, 03:19 PM
Originally posted by Lordmusic
So basically this hack just takes the images ever posted in a forum and displays them on a page? Is there any way to edit the images, remove the naughty ones, add ones not posted and so forth? Perhaps a way for people to submit?

It generates thumbnails for all GIFs/JPGs/PNGs/BMPs in your attachment table. It stores those thumbnails in a new table called thumb (I have no plans to store thumbs as files). It provides links to the full size attachment, as well as, the post the attachment appeared in. The links are currently opened in a seperate window, so you can keep the gallery open and jump to the individual posts. The way for people to submit is to post an attachment in the forum. You'll see I have a copy of the ForumJump box at the top of the page. The user can scroll through forums and chose "different galleries." gallery.php accepts params: userid & forumid. So, this is one virtual gallery:

http://www.noows.com/gallery.php?s=&userid=&forumid=85&galrows=5&galcols=2

This is another:

http://www.noows.com/gallery.php?s=&userid=&forumid=84&galrows=5&galcols=2

And this is my "personal" gallery (I modded my copy of memberlist template to provide a link to every users gallery):

http://www.noows.com/gallery.php?s=&userid=1

The links to the original post would be your way of "removing naughty ones." To submit new ones, the user just has to make a new post/attachment in the appropriate forum. I really don't see the need to code seperate admin/edit functionality into the gallery. Would just cause users more confusion in the end. Perhaps a link that would allow users to directly reply to an image in another window?

Zamtil
06-27-2001, 03:20 PM
Originally posted by Znaper
Can you post this Hack here?
Thx
Sorry for my bad englisch, but i come's from germany! ;)

I will, but I need a few days for features/bugs yet. I also need to talk to Jelsoft since I'd be releasing a few large chunks of code I borrowed/modified from them.

BradC
06-27-2001, 04:13 PM
Looks really good.. can't wait to try it out.. :)

First-Man
06-27-2001, 08:35 PM
coool I must have this hack.

ToraTora!
06-27-2001, 08:45 PM
nice work as always!

Now thats two hacks of yours im waiting for...lol..

JenniferS
06-28-2001, 03:43 AM
i'd like to try to install this hack as soon as it is ready.

btw i really dig the dancing bacon!

Blackangel
06-28-2001, 02:30 PM
great great great i need the same :D

hehe

mojotim
06-28-2001, 11:47 PM
Hey this hack looks great. Are you using the convert function in ImageMagick? If so you could easily just make jpg thumbs. Anyways, I would love to get a hold of this hack! Let us know when you're ready! If you want someone else to test it for you let me know.

Zamtil
06-29-2001, 01:32 AM
Originally posted by mojotim
Hey this hack looks great. Are you using the convert function in ImageMagick? If so you could easily just make jpg thumbs. Anyways, I would love to get a hold of this hack! Let us know when you're ready! If you want someone else to test it for you let me know.

system("/usr/X11R6/bin/convert -geometry '160x120>' -quality '75' $filename GIF:$thumbname");

Is all I'm doing to make thumbnails. My server got slammed yesterday (Everquest Game servers were down, so EVERYONE hits the message boards).. made alot of fixes and improvements. And yeah, you could use JPG thumbs just by changing GIF: to JPG: ... I used GIFs cause I didn't want further quality loss in the already shrunk image. I dunno how 100% quality JPG would compare against a GIF. GIF also seems to preserve animations, whereas JPG wouldn't. Could try PNG too...

I need to add some options to the admin menus, then I'll put a copy up. I have another hack people are anxious for too, I just hate the documentation/instructions part. :(

Zamtil
06-30-2001, 12:16 AM
<a href="http://vbulletin.com/forum/showthread.php?s=&threadid=21602" target="_blank">http://vbulletin.com/forum/showthrea...threadid=21602</a>

ScottW
11-05-2001, 01:31 AM
Check out PhotoPost, released on 11/4/01 -- it integrates with the VBulletin user DB:
http://www.techimo.com/photopost/index.html

SoloX
07-12-2002, 07:56 AM
Originally posted by Zamtil
http://vbulletin.com/forum/showthread.php?s=&threadid=21602

I cannot access this page . is it still out there?

Steve Machol
07-12-2002, 08:02 AM
Try changing the 'com' to 'org'.