Modpack with bridge support: PM, avatar, watermark, cropped/ sharpened thumbs... Modpack with bridge support: PM, avatar, watermark, cropped/ sharpened thumbs...
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Modpack with bridge support: PM, avatar, watermark, cropped/ sharpened thumbs...

Started by Stramm, February 24, 2006, 01:34:35 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Stramm

[Edit GauGau]
This thread is locked - please don't try to reply to it (because you won't be able to do so), but start your own thread on the board "cpg1.4 modpack by Stramm" for questions on the modpack.
[/edit]


I'm starting a new thread for the new modpack version cause it it's bridge compatible.
For now I've added bridge files for PhpBB 2.0.18, 19, SMF 1.0x and punbb
Included are my two themes Oranje and Tentacle
Tentacle: http://forum.coppermine-gallery.net/index.php?topic=28273.0
Oranje: http://forum.coppermine-gallery.net/index.php?topic=27438.0
more (ported) themes on my site

demo: http://stramm.st.funpic.org/

Short overview
-Automatically downsize watermark on small images
-Enhances Nibbler's onlinestats like in the 1.3 version (online/ offline status in buddylist and profile)
-supported languages atm. english, german, french, greek, italian (theres a txt file that describes changes for russian - modpack support board)
-Custom thumb tool (for all file types - upload an image and let the system create a thumb/ manually crop the thumb)
more info: http://forum.coppermine-gallery.net/index.php?topic=47538.0
-Admin tools auto refresh (update images/ thumbs without the need to permanently click the continue button)
-Watermark (transparent) with undo possibility (GD2, ImageMagick)
-Unsharp mask for thumbs -> crystal clear thumbs
-Possibility to give an exact size for thumbs (cropping) -> all have the same size
-Notification emails on comments to subscribed users
-Private Message system
-Avatars (profile, next to comments, PMs, buddy list)
-Mini thumbs -> I use them for the subscribtion manager (notifications) so that users not only read the pic title but also have a preview
also the mini thumbs are used for the avatars and the buddy list
-Buddy list -> Users can make friends on your site -> quick access to friends last comments, last uploads, profile... album permissions can be set that only album owners and his buddies can view albums (doesn't work yet if you're running a bridged CPG with forum and cpg db using different MySQL users) should work from 1.4.10 v1 incl fixes on
-If user views a movie then a direct link to the movie's shown in the picinfo
-If you change a username then the names get changed now in comments and picinfo too
-Possibility to disable language auto detect
-Login form on top of the site ... when logged in buddy and PM stats instead
-Speeded up stats... galleries with a lot of pics, users can get a huge performance boost

Everything can be switched on and off in admin, you'll need to use the english language to make changes in config (or you translate stuff and add it to your language file)

Of course bridged versions use PM and avatar system of the forum. Due to how SMF works only the 'hosted' avatars get considered here.

Installation:
Before you do anything make a backup of your files and your database!!!!!!
Unpack and upload the files in the archive. Keep the folder structure intact. Then run update.php .... done (you'll get a fatal error if you open the index without running update.php)
If you have a bridged Coppermine rerun the bridgemanager

Docs in the next post
latest update: 11-08-2007 -> Modpack v1 for CPG 1.4.14 bridge support
updated:
- modpack with all fixes

how to update your modpack to v1 for CPG 1.4.14: download, upload files to your server and run update.php
get it here: http://stramm.st.funpic.org    <-- have a look in the category downloads, no need to register but of course you may and explore the features a lil bit. And sorry, the attachment file size on the board wasn't big enough anymore. So I had to put the zips on my demo site

again... download here: http://stramm.st.funpic.org

Stramm

Docs


Watermark... (default off)
Settings in config->Image watermarking
Works with IM and GD2. The watermark image should be a .png file. You can make it's background transparent. The transparency settings in config will make the entire watermark transparent to the image background (ImageMagick only).
You'll have to enter the absolute or relative path to the watermark image in config. Preset is a sample watermark in coppermines images directory. So you should see this sample when enabling the watermark function and upload a test image.
There's a new nifty feature. Automatically downsizing of the watermark image when the uploaded picture is smaller than the width you set (Downsize watermark if width of an picture is smaller than entered value. That is the 100% reference point. Resizing of the watermark is linear (0 to disable)).
If you eg. enter here 1024 (like I did on my demo site), then the 100% reference is at images with a width of 1024px or bigger. If you upload pics > 1024px the watermark image won't get resized and attached with its full size. If you let coppermine create an intermediate image with a width of 400 pics, then the watermark will get downsized to 39% of it's original size. Is the fullsized eg. 512px, then the watermark will have 50% of it's orig size. Of course this sucks some CPU. And it's working excellent together with (example: http://stramm.st.funpic.org/displayimage.php?pos=-96 )
Files and thumbnails settings -> Auto resize images that are larger than max width or height (set it to the same as you used for the 100% reference... in the example 1024)
this way the watermark will always fit perfectly onto your images

To undo a watermark turn off watermarking and use the admin tools
If you use GD2 then the transparency setting in config has no function. If you want the watermark to be transparent against the background, then reduce layer transparency of your watermark image in your paint proggy to eg. 50 (this I did for the sample watermark)...

custom thumb tool... (default on)
Files and thumbnails settings -> Enable Custom Thumbs (movie, audio, document)
Image watermarking -> Watermark custom thumbs (movie, audio, document)
what it does.. easily change thumbs for movies, audio and document files. User permissions of course get considered.
If you want you can let coppermine apply a watermark (I've already prepared some with the wording audio, movie and doc). You do not need to crop or resize on the new thumbnail on your locval box. That's done when uploading.
The 'change thumb' you can always find above the thumb in approve, edit picture (click below normal size image) and edit multiple pictures (click edit next to an album). You only will see the link when you enable it in config, when the user has the right to edit that image or when it's not an image but movie, audio, document. The new watermark files need to be placed in the folder where you've put your main watermark file. If you don't use the watermark yet follow the instructions for watermarking first. The watermark files for thumb watermarking need to be named wm_audio.png, wm_document.png and wm_movie.png. You can find my samples in the folder images/
the thumb watermarking is not dependent of the config setting 'Watermark Image yes|no'. That's only for normal and fullsize images
If you've enabled minithumbs these will get created for the custom thumbs too and you can use them eg. again as category lead image (check my demo site)

Better admin tools (auto refresh)
When you're recreating thumbs/ images in the admin tools then you can set an auto refresh flag. If set, the update process auto refreshes and you won't need to click 'continue' anymore.
The big advantage.... you can set the nuimber of images to process to a  low value eg (2-5). Now the chances the script times out are limited. Means you don't need to restart the entire process and sit in front of your monitor for hours clicking 'continue' (if you've a huge number of pics in your db)

You can turn auto refresh on/ and off on the admin tools page
Update thumbs and/or resized photos (1) - (checkbox) Auto refresh (no need to click continue button anymore)

Better thumbs... (default off)
In config under 'Thumb Sharpening' and 'Files and thumbnails settings'
To crop your thumbnails you'll have to set 'Files and thumbnails settings '-> Use dimension ( width or height or Max aspect for thumbnail ) to 'exact'. Below enter your desired thumb width/ height. Now all thumbnails have the exact same size.
'Thumb Sharpening' works similar to Photoshop unsharpen mask. To learn more about it please search the web. I've preset decent values. To get even sharper thumbs increase 'Amount' to 100-150



Notification emails on comments to subscribed users (default off)
'User settings' -> Enable user notification on comments
It's doing exactly this. Check your user profile. Here you'll see two new checkboxes. 'Automatically subscribe to pictures you posted' and 'Automatically subscribe to pictures you commented'... pretty selfexplaining... If you use a bridged Coppermine then it takes the values of the forums user profile. Now have a look at an image. Scroll down to the 'Add your comment' comment area. Next to it you'll see a 'Unsubscribe comment notification' or a 'Get notified about new comments' link (depending on your status)
Admin can turn it off/ on in config 'User settings' -> Enable user notification on comments
Check your profile. Here's a link to the subscribtion manager (standalone only... if you want to use the subscribtion manager in a bridged version you need to place a link to it somewhere). Users can unsubscribe from all or certain pics. If you've enabled mini thumbs then it gets even more descriptive for the user.


Mini thumbs (default off)
Config -> Files and thumbnails settings - Enable Mini Thumbs, Mini Thumb Width - Mini Thumb Height 
They are used for the comment notification system, the avatars, the buddy list and, if you want they'll replace the huge category lead image with thumbs of a size you like. If you want to use the avatar you'll have to enable the mini thumbs to get the full functionality (if not then only user uploaded avatars will work, if enabled, users can pick one of their uploaded pics and make them their avatar). There's a lot of more you can do with them. Eg. replacing the normal thumbs in filmstrip with the mini thumbs (need theme modification). This way you can dispaly a huge bunch more without messing with your layout.....

Use mini thumb as category lead image (default off)
Config -> Album list view - Use mini thumb as category lead image

Avatar (default off)
Config -> User settings - Enable User Avatar (Mini Thumbs Required)
Check your profile as well. Here's a link to the avatar manager. Surfers who have uploaded pics can choose their avatar from them or users just can upload an image that gets resized to the mini thumbs settings (mini thumbs of course get sharpened too). If you have choosen an avatar all users will see it in your profile and next to your comments, PMs, in the buddy list etc. If you use a bridged Coppermine your forums avatars gets used instead

Buddylist (default off)
Have a look at the config. Users can request friendship in profile. In the main menu you'll have a new link 'My Friends': Here you manage your friends. Accept, delete, block, unblock and watch your friends list. You can quick view all your buddies last comments, last uploads and user albums. Possibility to include PM etc. If admin has enabled private albums then users have another option in th album manager. They can make albums private but allow buddies to view them.

Login form on top of the page (default off)
Config->Themes settings
This login form will be visible below the top menu if you enable it in config (config->Language, Themes & Charset settings ). If you have the buddy list enabled logged in users will see buddy quick stats (eg. Friends: 3 request, active 15). Otherwise users just see a 'Welcome back USERNAME'... use it only when you haven't a bridged coppermine

Additional info when logged in (default off)
Config -> Performance settings -> Display buddy status info when logged in, Display pm status info when logged in
displays additional info when a user's logged in, PM info only when you don't use a bridged coppermine


Performance hacks
Config -> Performance settings ->
Enable gallery statistics (enabled, coppermine default) 
Use fast stats (default off)
This will speed up or disable the album info (X files in X albums and X categories with X comments viewed X times)
When you use fast stats Coppermine counts all images and albums, even private ones a user won't be able to see. In tests with a huge gallery this improved performance by a factor of 2-3

Disable language auto detect (default off)
Config -> Language & Charset settings -> Enable language auto detect

Move info from below the thumb to the right of it (default off)
Config -> Thumbnail view -> Display info right of thumb (or below)
yes --> info on the right, no (default) --> below
Here's another little change, you can now display even the comment count below (or right of) the thumb
Config -> Thumbnail view -> Display number of comments below the thumbnail
Config -> Thumbnail view -> Display pic rating below the thumbnail
Config -> Thumbnail view -> Display number of votes below the thumbnail

PM System
Config -> Private messaging (default off)
If you use a bridge, then your forum's PM system gets used
If turned on there'll be PM icons next to usernames in thumb view, comments. If you use my thumes then above the image (normal view) the uploader name and a PM icon will be. PM links in the profile and the buddy list too
Additional features: links, BBCode, smilies, images, flood protection, you can set the number of max messages, notification

Nibbler's onlinestats enhancement
If you've installed Nibblers onlinestats and enabled it (adding 'onlinestats' to config -> Album list view ->The content of the main page) you'll see online / offline text+images in the users profile and in the buddy list

Manually crop thumbs / replace thumbs for images and media
1. Either next to an album click 'edit files' or below the intermediate image click 'edit file information'. Now you'll find above the thumb a link 'change thumb'. That's not really new for modpack users but read on.
2. Click the change thumb link and find the 'changeThumb.php' interface. Now you not only can create new thumbs for media files but also for images. You can upload new images or (if the original is an image) create the thumb from the image again. Also you can decide if you want to let the system automatically create thumbs or do that manually to find the best part of the image.
3. If you decide to upload a new image to create a thumb from that you have the possibility to check the checkbox 'Manually crop after upload'. If you do that, manually cropping is enabled, if not, the system auto crops the image (of course that's faster). If you manually crop, the image loads and a box appeares that indicates the area that will be cropped. This area has a min size of your thumb dimensions and will keep the aspect. So far I've tested with the modpacks 'exact size' thumbs and did some quick'n dirty tests with 'width' and 'height'. When you've found the part of the image you want to use as thumb click the 'save' button. Done... you just created a new custom thumb for your picture or media file.
4. a) Either upload a image to use as base for cropping
      aa) manually crop (checkbox 'Manually crop after upload')
      bb) auto crop (don't check 'Manually crop after upload')
    b)
       aa) click (if the orig is an image) 'Use the original image as base to crop the thumb' and you can manually crop the thumb from the original image
     c) check the checkbox 'Remove current thumb' and click the button 'Remove current thumb' to delete the custom thumb. If it's a media file, then the media icon will display, if it's an image... then no thumb will display anymore.
more info/ screenshots: http://forum.coppermine-gallery.net/index.php?topic=47538.msg227090#msg227090

Constantin

Great! I am startindg to back up the files which will have to be replaced and as soon as I am ready I will report the results here. If you want we can exchange somekind of IM info so that we can coordinate faster.

Constantin

OK, so far I have changed all the php files in the gallery dir and all works well at first view. I am now going to perform a detailed isnpection of the functions, but before that I want to ask you something - should I run the sql query, having in mind that I already ran it when I applied the non-bridge-able mod yesterday. Do you want to set up an account on my site so that you can check things yourself? If so, please PM me.

Stramm

It's save top run update.php... if the SQL entries are already existing they won't get changed. If not, they get added

If you'd like you can pm me your URL and a test user account. Much appreciated  ;D

andrewshu329

Hi Stramm,
One question:
Is it possible, when using squared thumbnails, for the image to not be distorted?
Thanks,
Andrew
CPG 1.4.2
Apache 2.0.54
PHP 5.0.5
MySql 4.1

Stramm

Quote from: andrewshu329 on February 25, 2006, 04:00:57 PM
Hi Stramm,
One question:
Is it possible, when using squared thumbnails, for the image to not be distorted?
Thanks,
Andrew

of course... that's the purpose of the mod and not to have distorted crap. Have a look at my demo site (freehost, often down lately ...) http://stramm.st.funpic.org/
If you don't start from scratch but have existing images in the db then you need to run the admin tools and recreate the thumbs

xplicit

I'm rebuilding my ancient coppermine version and allthough I have written a lot of mods myself including buddy list and a PM system in the past I now have to start from scratch again and decided to install stramms  mod on a clean install but it seems to have a few problems...

I cant send buddy requests from someones profile page link will display:

buddy_manage.php?event=make&id=

And also private messages are not correct formatted, link will display:

pm_send.php?id=

Also the name in the profile is not shown.

It displays the correct profile though but it seems it doenst pick up the user id

I can however send private messages from the pictures itself (in the text above the picture :  from user PM)

Perhaps some screenshots make it more clear.

Am I the only one experiencing this?

(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fpicserver.student.utwente.nl%2Fview_image.php%2F9YSS5XV48444&hash=3c99d05b94af5d17deb8f6a0e6a5d65949b542d3)
Don't ask me: Can you do this .... or Give me that...or I need Quick help in PM's. I'm not Santaclaus so post your questions on the board so it will be in the benefit for everyone.

Stramm

unbridged coppermine... weird, I can't reproduce that error. So it doesn't get the user name, id but additional stuff (joined, comments etc)
Can you try to reupload profile.php and all files in bridge/

edit: I've tried to save a query in profile.php... if you don't use the avatar you'll need to do this modification. The next version will have it included (for version 1.4.4 that'll be out soon)
open profile.php, find
            //$user_data = $cpg_udb->get_user_infos($uid);
and replace with

if (!$CONFIG['enable_avatar']) {
                         $user_data = $cpg_udb->get_user_infos($uid);
}


xplicit

Hi,

Did some test again today and problem disappeared suddenly.. (before reading your post by the way so without your suggested change)

What I changed was I added another user.

When I got the error I had as users:

* administrator
* test

testuser could not send things or see things from to the administrator, neither could de administrator do things to the testuser

I added a 3'th user today and now it suddenly works...

I will look further today if I can find the little nasty bug.

only 2 users is never the case in galleries so I think its not a big issue (as long as we know where it's comming from)
Don't ask me: Can you do this .... or Give me that...or I need Quick help in PM's. I'm not Santaclaus so post your questions on the board so it will be in the benefit for everyone.

Stramm

k, I've figured it out. Hasn't to do anything with the user count but with enabling/disbaling the avatar. First thing to do is checking if user has a avatar (that's cause of the profile.php layout). Now to save a query I can read with the avatar all other user data.
But when the avatar is disable then the userdata won't get read.
So the fix avbove is necessary. I've changed it a lil bit so it won't do the redundant query when the avatar is enabled

xplicit

Yeahh!

That must be it!

I indeed also enabled the avatar in between this operations!

Solved :) Great work!



Don't ask me: Can you do this .... or Give me that...or I need Quick help in PM's. I'm not Santaclaus so post your questions on the board so it will be in the benefit for everyone.

nem3sis

very nice work that is. will try to integrate that into my coppermine. thx !!!

PepoElMaster

Just installed the mod pack.
i reinstalled Coppermine becouse i was testing it. I drop averything on the DB, and all the files on the gallery directory. Uploaded cpg1.4.4, runed install.php

Then I upload the mod pack and run update.php
I selected Oranje as theme and English as language, but nothing new is showing on the configurations... No option to activate modpck features... What could be the problem?

Stramm

check if you uploaded everything in the correct location. It's mandatory that you keep the folder structure intact.
Run update.php again and look for the last line ... it should be INSERT INTO cpg144_bridge (name, value) values ('avatar_path', '') Already Done

in the config enable 'Display language list'... confirm and now chose  'english US'

free

Hi! This is the very best Mod i've ever seen for coppermine! thanks!

But i have e little problem with the Watermark option: If I have checked the option "Both" in "Which files to watermark" I have the Watermark only on the resized, but not on the orignial size pic. Could you help me?

erroneus

What edits do I have to make to my Eyeball theme to make it compatible with your mod pack?

n3n

Hi Stramm. I was wondering, I would like to for my intermediate and fullsize images to have different watermarks.
How hard would it be to copy the code for the watermarking. Could you give me a hint in the right direction where i should look ?

farhan

what modifications do i need to do to the theme to show Mini thumbs in film strips ?

thanks for the wonderfull mod :)