Jump to content


Photo
- - - - -

[Split] Hawk's mods and skins (v0.9.2 DEV)


  • Please log in to reply
15 replies to this topic

#1 Hawk

Hawk

    Full Member

  • Moderators
  • 54 posts

  • Poland

Posted 12 November 2006 - 04:01 PM

I'm new to ZPG, but I already have a small wishlist original.gif

1. Option in Admin CP to select if I want album thumbnails to be small piece of 1:1 image (default now) or full thumbnail of an image.

2. Image previews in upload queue and comments queue same way they're done in batch add menu.

3. Use of my chosen JPEG quality everywhere. Currently its not used at all in doItToBrowser() and quality 100 is used in addWatermark(). First one causes worse preview image quality than I chosen, second causes watermarked source images to grow usually by hundreds of kilobytes.

4. I don't like username requirement for 6 chars minimum. 3 chars will satisfy most of users and will not affect anything.

5. Some other way of checking if someone already voted. They're lot of users behind NATs these days, and if we are checking against IP numbers, only one user from behind NAT will be able to vote for same photo. Maybe an option in Admin CP to disable this check?

6. Allow guests to type their nicks when adding comment. This behaviour may be configurable via Admin CP.

7. Some captcha for guest comments and users registration to avoid spammer attacks.

8. "Go back to correct index page" from detailed picture view. I mean, If I click some photo on 4th page in some album then such link should take me back to 4th index page of that album. Hitting "back" in browser isn't what I like in galleries wink.gif

Now... I've already done points 1 - 5 for my personal use. 6 is almost ready and 7 - 8 I'm not touching yet as they'll require more time. If someone wants diff files, I could post them here.

#2 Hawk

Hawk

    Full Member

  • Moderators
  • 54 posts

  • Poland

Posted 12 November 2006 - 10:50 PM

I forgot about one feature on my wishlist: ability to choose fixed width for medium size preview. I've already implemented that one too. I'll post all my diffs here after little tune up (in two or three days).

#3 Hawk

Hawk

    Full Member

  • Moderators
  • 54 posts

  • Poland

Posted 13 November 2006 - 08:15 PM

And one more... Batch delete should have paging. Deleting images from large gallery is now very uncomfortable when thumbnails are shown.

#4 Hawk

Hawk

    Full Member

  • Moderators
  • 54 posts

  • Poland

Posted 13 November 2006 - 09:14 PM

Ehh. My code changes are getting bigger and bigger. Now I'm thinking about allowing users to edit/delete their own photos as well as allowing them to upload/add pictures via incoming directory.

#5 usr.c

usr.c

    Boss, my code's compiling (xkcd)

  • Admins
  • 10,440 posts
  • Gender:Male
  • Interests:Software
    Soccer
    Photography
    RC cars
    Electronics

  • Nothing Selected

Posted 13 November 2006 - 09:35 PM

Thanks for the suggestions..looking forward to your mods! We can even have them be part of the next release if you want.


Things that I don't suck at: Photography (flickr, JPG Mag), Skydiving, Splitting atoms, Flying a space shuttle
"Don't bail; the best gold is at the bottom of barrels of crap!" -Randy Pausch
I have people-skills goddamnit! What is wrong with you people!!! | www.skyrill.com

#6 Hawk

Hawk

    Full Member

  • Moderators
  • 54 posts

  • Poland

Posted 13 November 2006 - 10:55 PM

I've already prepared few diffs. I'm attaching them to this message as text files. They also contain chunks for my polish translation, so applying them to source without lang/polish.php will produce at least one error message which can be ignored.

Info: since I'm working under linux I've converted whole ZPG source with dos2unix to get rid of windows CR/LF chars at end of lines. My diffs are for such source. I'm sorry i thats wrong. BTW, I think that official tarballs should be distributed in unix CR/LF format (most PHP apps are distributed like that) and with default privileges of 644 for files and 755 for directories (777 for incoming, uploads, lang and outgoing). Currently default installation of ZPG gives full write access to everynone for all ZPG files and directories. Also puting empty index.html inside dirs would be good idea IMO to prevent direct folder browsing.

Below are short descriptions of attached patches...

01_full_album_thumbs - adds an option to Admin CP which allows to choose if we want full thumbs for albums or 1:1 crops.

02_fixed_medium_image_size - adds an option to Admin CP which allows to specify fixed image width for medium size preview (so all medium previews have same width, no matter what size source image is), leave this field empty in Admin CP to keep old behaviour (medium preview size depends on source image size)

03_thumbs_in_queues - adds small thumbs to "pendind images" and "pending comments" queues, its nice to see what images we are accepting and for which images we are accepting comments

04_less_user_pass_restrictions - allows usernames between 3 and 20 chars and passwords from six chars (no upper limit, password hash has same length anyway)

05_voting_comments_enhancement - enhances voting and comments permissions, with this mod we can select (through Admin CP) who can rate pictures and/or who can add comments (no one, only registered users, all users), additionaly this mod adds 2 options to Admin CP. First one when enabled allows users to enter any nickname they want for their comment, second one allows to enable multiple voting from same IP address.

06_batch_add_del_enhancement - this one changes big thumbs in batch delete into smaller thumbs (yes, it takes much loonger to load page with thumbs shown, but result is much better IMO and long load time may be drastically reduced by adding paging here), additionaly this mod adds new field to batch add - image description - if we are batch adding lets say 100 images, we then need to add descriptions to them one by one - lots of unecessary mouse clicks wink.gif now we may add descriptions immediately when we are adding images just +1 mouse click original.gif

I hope that at least some of those mods will be usefull. If I'll have some more mods ready I'll post them here.

Oh, I forgot to write that patch 05 also allows to disable IP checks for voting via Admin CP.

Attached Files


Edited by Hawk, 13 November 2006 - 10:58 PM.


#7 usr.c

usr.c

    Boss, my code's compiling (xkcd)

  • Admins
  • 10,440 posts
  • Gender:Male
  • Interests:Software
    Soccer
    Photography
    RC cars
    Electronics

  • Nothing Selected

Posted 14 November 2006 - 03:01 PM

Great, thanks a lot for all that original.gif


Things that I don't suck at: Photography (flickr, JPG Mag), Skydiving, Splitting atoms, Flying a space shuttle
"Don't bail; the best gold is at the bottom of barrels of crap!" -Randy Pausch
I have people-skills goddamnit! What is wrong with you people!!! | www.skyrill.com

#8 Hawk

Hawk

    Full Member

  • Moderators
  • 54 posts

  • Poland

Posted 14 November 2006 - 09:56 PM

Two more quick patches.

07_jpeg_quality.txt - fixes bug in doItToBrowser. $quality var was misplaced - was in imagepng() should be imagejpeg() - now all images created by this functions have proper quality (the one user has selected in Admin CP), additionaly addWatermark now uses user configured quality instead of "100", pros: watermarked files doesn't grow in size, cons: each thumbnail regeneration decreases quality of all images if watermarking is enabled (re-watermarking must be solved somehow which will eliminate that problem, I'll work on this later)

08_no_user_infos.txt - small cosmetical change on main page - don't show number of registered users and last registered user if registrations are disabled.

BTW, shouldn't $lang['image_description'] be used on line 138 of edit.php instead of $lang['description']?

Attached Files


Edited by Hawk, 14 November 2006 - 09:58 PM.


#9 Hawk

Hawk

    Full Member

  • Moderators
  • 54 posts

  • Poland

Posted 15 November 2006 - 11:51 PM

Hello again. I've updated two patches, 05 and 06. They were missing few new language items sad.gif Sorry for that.

There are two new patches too:

09_no_skin_change_no_size_change.txt - two new options in Admin CP, allow/disallow changing gallery style, allow/disallow changing preview image size, also this patch causes b]every[/b] picture view (no matter what size) is counted.

10_allow_self_image_change.txt - allows users to edit/delete their own photos

I also converted my own color style from old gallery to ZPG - "Rainy day" is style with various shades of purple colors.

Attached Files



#10 Hawk

Hawk

    Full Member

  • Moderators
  • 54 posts

  • Poland

Posted 16 November 2006 - 04:55 PM

One more mod original.gif

Folder and video thumbnails are stored as jpg images. Thats IMO look ugly in styles other than default. This mod fixes this issue.

11_png_folder_video_icons.txt - this patch makes required code changes

updated_styles.tar.gz - archive with modified styles, delete old ones completly and replace them with attached ones. Following things were changed: background color was removed from behind thumbnails (in stylesheet.css files), some gifs get their background replaced with transparency, each style now has folder icon (category_no_pics.png), default style has now new video icon. All new icons were taken from KDE styles.

I'm also attaching modified version of my "Rainy Day" style, adjusted for above changes.

Attached Files



#11 Hawk

Hawk

    Full Member

  • Moderators
  • 54 posts

  • Poland

Posted 20 November 2006 - 09:30 PM

Hello again.

I've redesigned some of my patches, changed some ideas, added few new features, simplified some code etc. So I'm reposting all my patches again. If you want to use some of them, make sure you will use those versions, not previous ones.

Patches must be applied in order (01-..., 02-... etc.), most of them require previous ones, so using just selected ones may not be possible without messing up with code. You are using them at your own risk original.gif

To aplly these patches your ZPG sources must be in unix CR/LF, you need polish language pack and patch utility (usually installed on all *nixes and available for windows too, you can easily google out windows version).

Info: "Rainy Day" style attached to this post has few stylesheet fixes (few colors get changed so texts don't blend with background in some places)

Below is list of all patches along with changes they incorporate and some notes

01_full_album_thumbs.txt
- allows admin to choose between full size and cropped album thumbnails

02_fixed_medium_image_size.txt
- allows admin to force fixed image width for medium size preview

03_thumbs_in_queues.txt
- adds image mini thumbs in "pending comments" and "pending images" queues

04_less_user_pass_restrictions.txt
- softens user/pass restrictions (3 - 20 char usernames, 6 or more char passwords)

05_voting_comments_enhancement.txt
- replaces showRadioButtonAdminStyle function with more flexible one
- visual changes in "add comment" form
- allows admin to choose who may rate pictures (no one, only registered users, all users)
- allows admin to choose who may comment pictures (no one, only registered users, all users)
- admin may now allow users to enter any nick they want for their comments (this feature may be disabled or allowed to registered users only)
- fixes bug: incorrect number of comments was shown below thumbnails for some images

06_batch_add_del_enhancement.txt
- when batch adding you may now specify descriptions for all images
- changes appearance of batch add/batch delete admin functions (thumbnail view is nicer but slower, batch delete on large galleries is totally uncomfortable - this may/will be resolved by adding paging)

07_jpeg_quality.txt
- forces user selected jpeg quality for medium size previews and watermarking output
- corrects one code type (imagepng() accepts only two parameters)

08_no_user_infos.txt
- no user infos (number of members, last registered member) are shown on main page if user registration is disabled

09_no_skin_change_no_size_change.txt
- admin may allow/disallow users to change gallery style
- admin may allow/disallow users to change image preview size

10_allow_self_image_change.txt
- users may now edit/delete their own pictures (warning: any guest user will possibly be allowed to edit/delete any image uploaded by other guest users - I wasn't testing this, but who allow guests to upload pictures anyway? original.gif)

11_png_folder_video_icons.txt
- ZPG will now look for video.png and folder.png instead of video.jpg and folder.jpg (that allows using alpha channel images)
- note 1: after applying this patch you should delete your skins directory and replace it with ones from updated_styles.zip - they already have nice png icons + they have modified gif images (replaced static backgrounds with transparency)
- note 2: "Rainy Day" style attached here is also prepared for this modification

12_back_to_index.txt
- fixes SQL query bug: when few entries have exactly the same time and date sorting them by date may give different order each time query is run - secondary sort order was added
- visual changes on image preview page: "mark for download" option was moved below picture
- previous/next navigation was moved to separate bar above picture
- "back to index" link was added on navigation bar, clicking it will take you back to correct index page

13_enhanced_news_bar.txt
- news on main page are now displayed inside box
- news field in admin CP is now textarea

14_album_display_enhancements.txt
- numerous visual changes of album display, see below
- entries in album view are now sorted alphabetically
- entries in album view are now properly aligned based on options selected in Admin CP (they were always alligned to left, no matter what you have selected in Admin CP)
- texts below thumbnails are now aligned against thumbnail width not table cell width - this really improves appearance especially with texts aligned to left or right
- few more small aligment fixes
- when you now enter an album which contains subcategories they may be presented as folder list (default ZPG behaviour) or as an album view (looks a lot nicer) - this is configurable via Admin CP
- don't show "no pictures in this category" for albums that contains subcategories but no pictures

15_captcha.txt
- adds visual confirmation to user registration and image comments
- captcha is very simple, written by me in pure php and it is configurable by editing top of captcha.php
- since fonts used in captcha are constant and there are no distortions used it is probably easy to crack it, but most spammers should be stopped (its better than no protection at all)
- admin may enable/disable captcha for registration process and choose who needs to visually confirm his comments (no one, guests only, all users)

16_less_exif.txt
- strip unprintable characters form exif data shown on picture preview page
- shows less exif information (only those which are known to exist in almos all cameras)

Attached Files



#12 usr.c

usr.c

    Boss, my code's compiling (xkcd)

  • Admins
  • 10,440 posts
  • Gender:Male
  • Interests:Software
    Soccer
    Photography
    RC cars
    Electronics

  • Nothing Selected

Posted 21 November 2006 - 02:22 PM

Cool! As promised, they'll be worked into the next release in some form and credited of course.


Things that I don't suck at: Photography (flickr, JPG Mag), Skydiving, Splitting atoms, Flying a space shuttle
"Don't bail; the best gold is at the bottom of barrels of crap!" -Randy Pausch
I have people-skills goddamnit! What is wrong with you people!!! | www.skyrill.com

#13 Hawk

Hawk

    Full Member

  • Moderators
  • 54 posts

  • Poland

Posted 21 November 2006 - 06:38 PM

Please include polish lang too original.gif I'll maintain it. Just send me new texts before release and I'll translate them.

#14 usr.c

usr.c

    Boss, my code's compiling (xkcd)

  • Admins
  • 10,440 posts
  • Gender:Male
  • Interests:Software
    Soccer
    Photography
    RC cars
    Electronics

  • Nothing Selected

Posted 21 November 2006 - 07:44 PM

Sure thing original.gif


Things that I don't suck at: Photography (flickr, JPG Mag), Skydiving, Splitting atoms, Flying a space shuttle
"Don't bail; the best gold is at the bottom of barrels of crap!" -Randy Pausch
I have people-skills goddamnit! What is wrong with you people!!! | www.skyrill.com

#15 usr.c

usr.c

    Boss, my code's compiling (xkcd)

  • Admins
  • 10,440 posts
  • Gender:Male
  • Interests:Software
    Soccer
    Photography
    RC cars
    Electronics

  • Nothing Selected

Posted 28 November 2006 - 08:15 PM

Almost done incorporating all of your mods into v0.9.4 DEV. I'll be sure to send it to you before it goes live!


Things that I don't suck at: Photography (flickr, JPG Mag), Skydiving, Splitting atoms, Flying a space shuttle
"Don't bail; the best gold is at the bottom of barrels of crap!" -Randy Pausch
I have people-skills goddamnit! What is wrong with you people!!! | www.skyrill.com




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users