Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 9 1 2 3 4 5 6 7 8 9
Joined: Apr 2001
Posts: 237
Member
Member
Offline
Joined: Apr 2001
Posts: 237
Folks,

I just finished developing a tool that allows UBB users to upload photos to a public gallery.

You can download it here:

http://perl.bobbitt.ca/album

If you want to see it in action here it is:

Upload photo page:
http://perl.bobbitt.ca/cgi-bin/album.pl?function=upload

View photo gallery:
http://perl.bobbitt.ca/cgi-bin/album.pl

Looking for feedback...

Sponsored Links
Joined: Sep 2000
Posts: 441
Member
Member
Offline
Joined: Sep 2000
Posts: 441
WOW! I have been searching a long time for such a hack, I really would like to use it but the only thing i'm missing is the ability for users to create their own sections/directories/categories and the possibility to list all categories
a) alphabetically
b) by date (chronologically)
c) by user who uploaded the pictures
It would be also a great thing to resize all thumbnails to the same size, so the overview would look more 'clean' -
GREAT! please drop me an email concerning this hack 2
[email protected]
thanks a lot and i'm wondering why noone else seems to be intersted in this hack frown
chris
http://technoforum.de

Joined: Apr 2001
Posts: 237
Member
Member
Offline
Joined: Apr 2001
Posts: 237
I've put the scripts online at http://perl.cdnarmy.ca/. They still need some work, but it's coming along.

I like your ideas, I'll throw them on to the "to do" list. They're certainly all possible. The thumbnails are actually built as files (using Thotor, a thumbnail generator), so they can be built according to personal taste. I'd love to have an "on the fly" thumbnail generator, but I haven't been able to find one...

Thanks, and keep the comments coming!

[ June 14, 2001 02:05 PM: Message edited by: bobbitt ]

Joined: Feb 2001
Posts: 108
p2k Offline
Member
Member
Offline
Joined: Feb 2001
Posts: 108
I really like this and have downloaded the .zip file. I would be all for having you clean it up and make installing it easier. Looking at the files, I see you have a large range of directories that the script uses. (/data/photos) or (d:/profiles/bobbitt/Inetpub/wwwroot/cgi-bin/photo.gif") and (../img/photo.gif).

I'd love to test this out for myself but knowing what to change and not to change seems to be the headache here.

Great idea though, congrats on pushing it out to all of us. Hope to see some instructions with this.

*edit* It's going slowly but I'm putting it together step by step.

Perhaps the "Error - Error opening file for writing" comment when trying to write to the gallery directory could be clearer. I didn't know if it was the log file or the image that it couldn't open. (Had to set my permissions to my gallery directory to chmod 666).

Also, one has to create a 0 byted log file (gallery.log) before the log file will start working. Perhaps include this in your zip file. At least, that's what I had to do before I could get past the log error messages smile

Another idea (sorry, just brain storming) is a file size limit. Someone could rename a 500meg bin file to image01.jpg and submit it, crashing the server.

Question: If a user is banned from the message board, will the gallery script detect this and disallow photo submissions? Can a user who's IP is banned from posting on UBB still submit as well?

Ever thought of a rating system? Users could vote for their favorite image. Then you could have a "Top 10 Images" within the photo gallery.

This has great potential and I hope you continue to work on it in your spare time as it will get a lot of use and support!

Last note: Just got it working. For anyone wanting to install this, throw it into your cgi-bin directory and run the gallery.pl or album.pl from your browser. Any errors will happen on screen and you can fix them in the associated .pl file.

p2kay

[ June 12, 2001 07:55 AM: Message edited by: p2k ]

Joined: Apr 2001
Posts: 237
Member
Member
Offline
Joined: Apr 2001
Posts: 237
Ok, the 2 major things I'm working on first are:



    [*] Merging gallery.pl and album.pl into one program, so they can share settings.

    [*] Moving all the settings out to a config file, and cleaning up the installation instruvtions.


Once that's done, I think I'll be in a better position to address the other requests. Keep nagging me if you don't hear from me in a few days...

Cheers

Edit: Wow, P2K your post changed on me! I'll have to go back and read it again, looks like you've added some great feedback. Thanks! (Just wanted to say that I wasn't ignoring your message with this post...)

[ June 12, 2001 11:00 AM: Message edited by: bobbitt ]

Sponsored Links
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
smile

Thanks Mike for adding your work here, I am gonna move this thread to our "beta" forum, you should see a good bit more response there...:D


- Allen wavey
- What Drives You?
Joined: Apr 2001
Posts: 237
Member
Member
Offline
Joined: Apr 2001
Posts: 237
Thanks. It looks like my request for feedback has turned into more of a beta trial... smile

Cheers

[ June 12, 2001 11:31 AM: Message edited by: bobbitt ]

Joined: Oct 2000
Posts: 807
Member
Member
Offline
Joined: Oct 2000
Posts: 807
im thinking of making this replace my page:
http://www.411hype.com/html/memberphotos.shtml

but id hafta do alot of mods hm......i think ill watch this hakc progress into a UBB hack not a stand alone as it is right now

Joined: Feb 2001
Posts: 108
p2k Offline
Member
Member
Offline
Joined: Feb 2001
Posts: 108
Gallery Update.

This update is without any changes (visual appeal, added tables, layout etc).

Perhaps Bobbitt can help me on this as I've run into a little problem.

In the demo you provided in the original thread, you posted a link and in this link it had categories.

This I figured out by creating sub-directories within the Photo_Album directory. All is fine when you upload an image and select the category. I check the server and the image is placed in the proper directory.

My question is, how do I go about showing these directories/categories in the album.pl file as shown in the working demo you created? Is there a line I've forgotten to edit manually?

Once I get this working I want to see how well I'll be able to mold it into a sites looks with tables and what not.

Thanks!

A fellow Canadian (Toronto),

pTWOk

Joined: Apr 2001
Posts: 237
Member
Member
Offline
Joined: Apr 2001
Posts: 237
Both files should automatically sense all the directories created under your $rootdir.

For gallery.pl, that means that they will automatically show up as categories to upload photos under, and for album.pl, they appear as "albums" with the appropriate photos inside.

I'm not sure if that answered your question or not...

If you give me the URL you're working with (PM if you don't want to make it public) I'll see if I can figure out what's going on...

Cheers

Sponsored Links
Joined: Mar 2001
Posts: 17
Junior Member
Junior Member
Offline
Joined: Mar 2001
Posts: 17
I like this - looks like a great idea.

A few ideas would be to limit the file size of uploads, make it so that members could see from thier profile which images they have uploaded and are given the ability to delete ones that they no longer want there.

This would be usefull as many of my UBB members do not have webspace and hense can not add images to posts. With this feature, members could upload images and add them into post much more easily.

Keep up the good work.

Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
Quote
quote:
I, for one, hope it remains a standalone... ubb integration is cool, but it always means editing of files for every ubb upgrade... plus, those of us on the beta team can't edit any ubb files...

That doesn't mean, however, that the code can't be cleaned up, optimized, with tighter variable integration... wouldn't it be nice to just upload scripts without having to edit them first? laugh

We already have at least one general purpose file upload script integrated into the ubb...:)


- Allen wavey
- What Drives You?
Joined: Apr 2001
Posts: 237
Member
Member
Offline
Joined: Apr 2001
Posts: 237
I tend to agree with Allen. I've moved all the config info out to a separate file now, so upgrading the album software will just mean dropping the new script in place and making sure it can find the config file. Still working on getting the upload functionality merged, but I expect I'll have a new version ready to go later on tonight...

Joined: Apr 2001
Posts: 237
Member
Member
Offline
Joined: Apr 2001
Posts: 237
Ok, 3.0 is ready. This essentially has the 2 changes above put in. The config info is in album.cfg, and the old gallery.pl is now merged into the script. (So you only have to set config info once!)

This should make the install/config process much easier to deal with. I haven't had a chance to look at most of the other requests yet, but hopefully I've managed to capture them in the "To Do" section of album.html.

Cheers

[ June 14, 2001 02:06 PM: Message edited by: bobbitt ]

Joined: Feb 2001
Posts: 251
Member
Member
Offline
Joined: Feb 2001
Posts: 251
GREAT I have been looking for a hack like this for a long time!

Joined: Apr 2001
Posts: 237
Member
Member
Offline
Joined: Apr 2001
Posts: 237
The config portion still needs some work, but it's passable now. If anyone gets stuck, just post here, PM or e-mail me and I'll do my best to help out.

Cheers

Joined: Apr 2001
Posts: 237
Member
Member
Offline
Joined: Apr 2001
Posts: 237
Ok, 3.1 is out:

http://perl.cdnarmy.ca/album31.zip

Updates:

  • Can use UBB authentication or flatfile DB authentication.
  • For UBB authentication, can have users automatically upload photos into their own directories. Users can only upload into their "personal" directory.
  • Several bug fixes.


Cheers

Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
Sounds good Mike smile


- Allen wavey
- What Drives You?
Joined: May 2001
Posts: 56
Member
Member
Offline
Joined: May 2001
Posts: 56
Hi! Whe are probably stupid but we try to install your album for 2 hours(and we are not newbies) now and we just do not understand your installation. Can you please tell us what directory and files we have to create and where they go with the appropriate chmod. For sure you are not the king for editing a mods.
Quote
quote:

Joined: Apr 2001
Posts: 237
Member
Member
Offline
Joined: Apr 2001
Posts: 237
The album.pl file has to be in your cgi-bin directory. From there, edit the $configfile line in it to set the location of album.cfg (can be in the cgi-bin directory as well). Then edit album.cfg to set all your paths and preferences. You'll need to create a directory to hold all your photos, and make it world writable if you want to be able to upload or add descriptions through the web.

Now run album.pl from the web. If there are any problems, you'll get an error message. If not, any photos in your new directory will be displayed.

An overview of the installation process is in the album.html file. It needs work, but it's a start.

If you can give me the error message your getting, and what you've done to this point, I'm sure we can figure it out.

Cheers

[ July 09, 2001 11:54 AM: Message edited by: Mike Bobbitt ]

Joined: May 2001
Posts: 56
Member
Member
Offline
Joined: May 2001
Posts: 56
we can understand that....but the real problem is we have to create some directories to put the photo_address.txt...descriptions.txt...the.css and the images and the icons etc. And what about the categories and all that stufff. Can you please give us the exact way you installed it on your server to do it work? All the directories and where they are. We work now for 7 hours on your ****** and we are realy getting realy upset now.

Why dont you give a real installation text with those scripts.
Thank you :rolleyes:

Joined: Apr 2001
Posts: 237
Member
Member
Offline
Joined: Apr 2001
Posts: 237
Here's what I have:

/Photo_Album.css --> World Readable
/cgi-bin/album.pl --> World Executable
/cgi-bin/album.cfg --> World Readable
/img/photo.gif --> World Readable
/img/album.gif --> World Readable
/Photo_Album/ --> World Writable
/Photo_Album/descriptions.txt --> World Writable [Optional]
/Photo_Album/subdir --> World Writable
/Photo_Album/somephoto.jpg --> World Readable
../logs/gallery.log --> World Writable
../auth_db --> World Readable

I think that's about it. If you turn off options like "notify" then you don't have to worry about things like photo_address.txt. I'd recommend turning all the "options" off and getting it to work that way, then turn on the ones you want. Should narrow things down.

Also, if you want to send me the web site layout, your config file, and your URL, I can probably help out. (You can PM or e-mail me with it.)

Sorry the install is so hard. Believe it or not, I have cleaned it up!

Cheers

Joined: May 2001
Posts: 56
Member
Member
Offline
Joined: May 2001
Posts: 56
Still have problems....i never saw something like that!!!!!

http://www.astro23.com/cgi-bin/astro/album.pl
http://www.astro23.com/cgi-bin/astro/album.pl?function=enter_desc
http://www.astro23.com/cgi-bin/astro/album.pl?slideshow=x
http://www.astro23.com/cgi-bin/astro/album.pl?function=upload

Here is the address of my UBB.
http://www.astro23.com
Take a look inside, it is a very big UBB with a big big traffic
I am in Montréal wink

Joined: May 2001
Posts: 56
Member
Member
Offline
Joined: May 2001
Posts: 56
It is working now here is what we did:

In album.pl

search

$albumprog=$webroot."/".$relalbum."/".$albumprog;

replace by:

$albumprog=$relalbum."/".$albumprog;

in album.cfg

search:

# Relative path to album.pl, from "webroot" as defined above.
relalbum=../cgi-bin

replace by:

# Url path to album.pl
relalbum=http://yoursite.com/cgi-bin

Joined: Apr 2001
Posts: 237
Member
Member
Offline
Joined: Apr 2001
Posts: 237
Interesting. Thanks for turning debug on, it was helpful, though you seem to have found a solution. The way it should work is:

webroot=http://www.astro23.com/ubb/photo

relalbum=../../cgi-bin

That should work as well, with no code changes required. I'm not sure what else will break if you use relalbum and $albumprog like you are. Maybe nothing, but maybe something... They just weren't designed to be used that way.

As a side note, it looks like you're using 3.0, not 3.1 (3.1 is better, it fixes a number of bugs). You can get 3.1 at http://perl.cdnarmy.ca.

Cheers

[ June 16, 2001 05:57 PM: Message edited by: bobbitt ]

Joined: May 2001
Posts: 56
Member
Member
Offline
Joined: May 2001
Posts: 56
yes but depend where you put your directories. If you let the code as his, we can not put the directories somerhelse the cgi-bin....so that way we did it.

What a day!!!!! lol wink Thank you anyway this is a nice hack

Joined: Apr 2001
Posts: 14
Junior Member
Junior Member
Offline
Joined: Apr 2001
Posts: 14
Quote
quote:
Not for nothing but the title of this forum is "V6 Mods in Beta". You didn't buy his "unfinished" software, so try and be nicer to someone writing you free software.


Great hack BTW. I have been using an SQL/Cold Fusion script on my site for my gallery, but I am trying to move away from Cold Fusion.

Also you mentioned you used Thotor, a thumbnail generator to create the thumbnails, how hard would it be to automate the thumbnail creation of .jpgs. What I could love is, Someone uploads a say, 600X300 picture, then a 200X100 thumbnail would be generated. Then if someone uploaded a 600X600 picture a 200X200 thumbnail would be made, always maintaining Aspect ratios. The way my gallery is now, the viewer has to wait for every full sized picture to load to see a new pic.

Thanks and Keep up the good work.

Joined: Apr 2001
Posts: 237
Member
Member
Offline
Joined: Apr 2001
Posts: 237
I'd love to generate thumbnails as part of the script. What I really want to do is generate them on the fly, but that would probably be a performance issue.

So I guess I'm in the market for a freeware cross platform command line thumbnail generator to tie in. Haven't found one yet. smile

Still, it's a good idea though. If no corresponding thmb_ file exists, just generate it and keep going. That way the first time you view pictures, it may be a bit slower, but after that the thumnails will already be there.

If anyone knows of a thumbnail tool that fits the bill, please let me know!

Thanks

Joined: May 2001
Posts: 56
Member
Member
Offline
Joined: May 2001
Posts: 56
Hi Bobbit
Take a look there
http://astro23.com/cgi-bin/astro/album.pl?album=Signatures
We just force the big image to show in 30 x 30 Pixels and it is ok for now. Of course the images keep the bytes weigth of the full size but for now until we find a better solution it is doing the job for me. Anyway, we keep working on it and i'll tell you if we find a permanent solution. wink Thanks again

Joined: Apr 2001
Posts: 237
Member
Member
Offline
Joined: Apr 2001
Posts: 237
Yeah, that's not a bad idea. I thought about it, but it the downside is that it loads the full image for each picture. The upside is that once it's loaded, caching will make browsing the album very fast. I think I'll make it an option.

I run this on one album that has about 6,000 pictures in it, so pre-loading the full size images would be a pain. But for smaller albums, I can see it would do the trick.

Thanks

Joined: Apr 2001
Posts: 237
Member
Member
Offline
Joined: Apr 2001
Posts: 237
FYI, some users have been having trouble editing the .cfg or .pl files. Apparently, some editors save the file in such a way that it corrupts it, and causes server errors...

Joined: Apr 2001
Posts: 237
Member
Member
Offline
Joined: Apr 2001
Posts: 237
Version 3.2 is now available at http://perl.cdnarmy.ca. Updates are a bit of code cleanup, some bug fixed, and the display has been updated a bit. As always, if you have any problems, just let me know.

Cheers

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Nice work Mike. Once I found my server specific problem etc I upgraded to this version edited what I needed and worked like a charm. I even got the style sheets going. Great Job!!

http://www.reeftalk.com/cgi-bin/album.pl

Chuck

Joined: Apr 2001
Posts: 237
Member
Member
Offline
Joined: Apr 2001
Posts: 237
Note: omegatron found a bug in 3.2 which has just been fixed. If you downloaded 3.2 before this message was posted, please re-download.

I hope to have some time this week to start making life for album users easier, thanks for bearing with me...

Joined: Jan 2001
Posts: 75
Member
Member
Offline
Joined: Jan 2001
Posts: 75
Anybody else find this GAPPING security whole in this one??? Or did I use a bad practice when implementing this one...

I have my Photo Root dir to:
C:/webroot/boardname/noncgi/photo/

If you use the following URL...

http://YourURLhere/cgi-bin/album.pl?album=../../../..

It'll let you go all the way back to the root.....

FYI, or for just for my info, what's with this?

Joined: Apr 2001
Posts: 237
Member
Member
Offline
Joined: Apr 2001
Posts: 237
Ouch!

I failed to notice that one, thanks for pointing it out. It could result in users being able to see directory structures and view images from anywhere on your file system. Very bad.

At any rate, I have fixed this in 3.3, now available from http://perl.cdnarmy.ca. I was hoping to fit more into 3.3, but this has forced me to put it out a bit early.

Good eye.

Joined: Apr 2001
Posts: 237
Member
Member
Offline
Joined: Apr 2001
Posts: 237
Oh, I should also point out the other changes in 3.3:

  • Better use of CGI package.
  • The rest of the subtitles have been turned into buttons (if you have usebuttons enabled).
  • Added next and previous buttons for album view.
  • Sub albums now [finally] work correctly in both online and static modes.
  • You can now specify an alternate config file, through the web: album.pl?configfile=/home/user/www/album.cfg. (Allows multple albums from one installation, or multiple views of the same album.)
  • Added a security check into the sanity tests. (See above)
  • And, as usual, random bug fixes.

Joined: Jan 2001
Posts: 75
Member
Member
Offline
Joined: Jan 2001
Posts: 75
Awesome Update, installing it NOW!! 8)..
Thanks Much for the new code!...

I can't take all the credit for that find, one of my users found it for me 8)...

Good thing though, it still follows the rules, and only displayed .jpg .gif & .bmp (and I added .PNG) cuz it's supported by IE and most my users use that sooo.... 8)...

Talk to ya soon 8)

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Nice Work Mike. I must point out thought that I tried his security hole and it did not work here. I could only assume his whole site is world everything. I have my directories set correctly so only files you could get into was gallery but then I guess one has to know how to do that smile Better to write it into the program than have someone do it manually.

Joined: Jan 2001
Posts: 75
Member
Member
Offline
Joined: Jan 2001
Posts: 75
Well I installed the updated and same thing...

You can naviate backwards by adding the:

album=/../../

I'm Using IIS v5 on Win2k SP2, and I'm looking in to my permissions now.. But I don't think I have them set that way...

Checked permissions... No Issues there, only Default Admin Shares, nothing else.. 8(...

[ June 26, 2001 10:17 PM: Message edited by: ampere ]

Page 1 of 9 1 2 3 4 5 6 7 8 9

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
isaac
isaac
California
Posts: 1,157
Joined: July 2001
Forum Statistics
Forums63
Topics37,570
Posts293,919
Members13,848
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,830
Greg Hard 4,625
Top Posters(30 Days)
Gizmo 1
Top Likes Received
isaac 81
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2023 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)