Pages: [1] 2 3
Tags: REQ UPLOADS
  Author: Topic: REQ: User Gallery Mod Hack
offline sburg
Last Visit: 10/18/07

Moderator
Dev
Joined: 06/30/06
Forum Posts: 144
 REQ: User Gallery Mod Hack
 Posted on: 12/03/06 at 18:28:02

Anyone have a hack to allow for multiple uploads on the user gallery mod?



My generic signature...
get your own generic signature
Logged
       
offline Jack Deth
Last Visit: 01/10/16

Administrator
Dev
Joined: 02/13/05
Forum Posts: 3723
 Re: REQ: User Gallery Mod Hack
 Posted on: 12/04/06 at 09:15:06

this should be one of the easiest things to impliment due to how the usergallery uses files...

I had some gpl scripts that allowed for this...



Beta-Tester Extraordinaire.

Testing on various platforms and operating systems...

http://www.2xlnt.com... external link
http://www.themeapp.com... external link
Logged
       
offline Floyd
Last Visit: 04/01/14

Administrator
Dev
Joined: 28/03/02
Forum Posts: 2800
 Re: REQ: User Gallery Mod Hack
 Posted on: 12/05/06 at 15:28:47

If I remember rightly, in the index.cgi under sub addpicture, look for ...
code:
<INPUT TYPE="FILE" NAME="FILE1" size="40">

... and add ...
code:
<INPUT TYPE="FILE" NAME="FILE2" size="40">
<INPUT TYPE="FILE" NAME="FILE3" size="40">
<INPUT TYPE="FILE" NAME="FILE4" size="40">

... etc.

Then, in ugupload.cgi, ignore the line of text that says "DO NOT EDIT ANYTHING BELOW THIS LINE UNLESS YOU KNOW WHAT YOU ARE DOING" and change ...
code:
$max_num_files = 1;

... to reflect the number of additional file browsers you have added.

That will probably work, but please make a backup of your original as I wrote this code about 4 years ago and haven't looked at it much since then!



"Open Source, Open Minds"

If you make something idiot proof, somebody will come up with a better idiot.
Logged
     
offline sburg
Last Visit: 10/18/07

Moderator
Dev
Joined: 06/30/06
Forum Posts: 144
 Re: REQ: User Gallery Mod Hack
 Posted on: 12/05/06 at 18:42:17

I'll give it a go and report back for the group!



My generic signature...
get your own generic signature
Logged
       
offline sburg
Last Visit: 10/18/07

Moderator
Dev
Joined: 06/30/06
Forum Posts: 144
 Re: REQ: User Gallery Mod Hack
 Posted on: 12/05/06 at 19:10:56

There appears to be more to it than that. I'll go from there though...thanks.



My generic signature...
get your own generic signature
Logged
       
offline Floyd
Last Visit: 04/01/14

Administrator
Dev
Joined: 28/03/02
Forum Posts: 2800
 Re: REQ: User Gallery Mod Hack
 Posted on: 12/06/06 at 14:50:40


There appears to be more to it than that. I'll go from there though...thanks.
My pleasure.



"Open Source, Open Minds"

If you make something idiot proof, somebody will come up with a better idiot.
Logged
     
offline Fliggerty
Last Visit: 06/29/08

Moderator
Dev
Joined: 10/05/06
Forum Posts: 72
 Re: REQ: User Gallery Mod Hack
 Posted on: 01/23/07 at 03:44:07

I've got a question about this mod.  Is there any way to hack it to automatically remove pictures after 90 days or so?  Deleting them from the server would be nice too if it's possible.

TIA



"To err is human; to really screw up requires the root password."
Logged
     
offline On
Last Visit: 04/18/13

Administrator
Dev
Joined: 06/19/03
Forum Posts: 5018
 Re: REQ: User Gallery Mod Hack
 Posted on: 01/23/07 at 11:04:07



Fliggerty said:
I've got a question about this mod.  Is there any way to hack it to automatically remove pictures after 90 days or so?  Deleting them from the server would be nice too if it's possible.

TIA



Yes, and it is a very good idea!



[user:On]
on@web-app.net

GC/CS/E/H/IT/L/M/MU/PA/P/S/SS/TW/O d(+++)>+ s: a+>++>+++$ C++++$ UBAHS*++++$ P+++++(--)$ L !E? W+>++ N+++@ K+++>++++++@ w$ !O M->+ V--() PS+(-) PE(++) Y+ PGP->+ t+() 5 X? R>* tv@ b++>+++ DI+++ D? G(-) e++>+++@ h----() r+++ y++++ (Words of wisdom from Larry Wall, 1993)
Logged
       
offline Fliggerty
Last Visit: 06/29/08

Moderator
Dev
Joined: 10/05/06
Forum Posts: 72
 Re: REQ: User Gallery Mod Hack
 Posted on: 01/23/07 at 14:57:32



On said:
Yes, and it is a very good idea!



I sure thought so. wink



"To err is human; to really screw up requires the root password."
Logged
     
offline SafePit
Last Visit: 06/25/11

Administrator
Dev
Joined: 11/03/06
Forum Posts: 493
 Re: REQ: User Gallery Mod Hack
 Posted on: 01/23/07 at 16:51:00



Fliggerty said:
I've got a question about this mod.  Is there any way to hack it to automatically remove pictures after 90 days or so?  Deleting them from the server would be nice too if it's possible.

TIA



So, a few ways to do this:

1)  Add a cron entry to walk the gallery images removing files older then 90 days   (requires access to the server)
2)  Add a button to the Gallery admin that does the same thing (isn't automatic)
3)  In the code that pulls the gallery images, delete images older the 90 days anytime the subroutine is run (automatic, but will slow down gallery loads a little bit)



Got a WebAPP site?  Show it off!

Logged
       
offline BensonBear
Last Visit: 01/01/12

Administrator
Dev
Joined: 01/14/06
Forum Posts: 400
 Re: REQ: User Gallery Mod Hack
 Posted on: 01/23/07 at 20:53:31

Another way would be to have a scheduled tasks list type of thing that ran when admin was logged in.

It would only slow down admin use, and wouldn't require admin to push a button. Or a cron job. The check to see if it was already done for the date could be fairly fast anyway.



BEER...its more than just a breakfast drink!!!
Logged
       
offline Fliggerty
Last Visit: 06/29/08

Moderator
Dev
Joined: 10/05/06
Forum Posts: 72
 Re: REQ: User Gallery Mod Hack
 Posted on: 01/23/07 at 23:06:19

Personally I wouldn't object to having to push a button to do it.  That's a million times easier than going through all of the pics manually.

But the automatic sounds nice too. grin



"To err is human; to really screw up requires the root password."
Logged
     
offline Jack Deth
Last Visit: 01/10/16

Administrator
Dev
Joined: 02/13/05
Forum Posts: 3723
 Re: REQ: User Gallery Mod Hack
 Posted on: 01/24/07 at 06:42:35

Another way might be an admin screen which displays the images by their upload date...

also a delete image button which would remove it from the gallery and delete the file would make it just right...

dropping in check boxes that would let allowing deletion of multiple files would be great too.



Beta-Tester Extraordinaire.

Testing on various platforms and operating systems...

http://www.2xlnt.com... external link
http://www.themeapp.com... external link
Logged
       
offline Fliggerty
Last Visit: 06/29/08

Moderator
Dev
Joined: 10/05/06
Forum Posts: 72
 Re: REQ: User Gallery Mod Hack
 Posted on: 02/27/07 at 02:03:09

I'm curious if anyone would be willing to take this small tweak up?  I'd be very appreciative as I don't quite have the know-how to do it myself.
TIA



"To err is human; to really screw up requires the root password."
Logged
     
offline SafePit
Last Visit: 06/25/11

Administrator
Dev
Joined: 11/03/06
Forum Posts: 493
 Re: REQ: User Gallery Mod Hack
 Posted on: 02/27/07 at 03:52:14



Fliggerty said:
I'm curious if anyone would be willing to take this small tweak up?  I'd be very appreciative as I don't quite have the know-how to do it myself.
TIA



Here ya go:

http://www.reids4fun.com

There is a README.txt file in the zip on  how to install it.  Let me know if you have any issues.

Here is the Usage:

The admin user will now have an additional menu item called
"Clear Old Pictures" at the bottom of the Galleries list.  Selecting it will
clear all the pictures older then galleryage.  It will print the name of each
picture removed (with age) and a final cout at the end.



Got a WebAPP site?  Show it off!

Logged
       
offline Jack Deth
Last Visit: 01/10/16

Administrator
Dev
Joined: 02/13/05
Forum Posts: 3723
 Re: REQ: User Gallery Mod Hack
 Posted on: 02/27/07 at 15:54:34

Great to see some more innovation there...

I am curious...  is this for Gallery?  or UserGallery?



Beta-Tester Extraordinaire.

Testing on various platforms and operating systems...

http://www.2xlnt.com... external link
http://www.themeapp.com... external link
Logged
       

  REQ: User Gallery Mod Hack
  Mods Discussion and Support
  Forums
  
Pages: [1] 2 3
Hop to: