4images Forum & Community
Welcome, Guest. Please login or register.
Did you miss your activation email?
December 08, 2016, 10:44:45 AM

Login with username, password and session length
Search:     Advanced search
You're looking for some 4images templates and styles? Then visit this thread to show websites with 4images templates to download.
Togle to toolbar
Translate this page with =>
Translate this page >
* Home Help Search Login Register
 
+  4images Forum & Community
|-+  4images Modifications / Modifikationen
| |-+  Mods & Plugins (Releases & Support) (Moderators: mawenzi, Rembrandt)
| | |-+  [Mod] Image Annotation (Watermark)
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] 2 3 4 5 ... 62 » »» Print
Current Topic Rating: ***
Author Topic: [Mod] Image Annotation (Watermark)  (Read 659968 times)
SLL
Hero Member
*****
Offline Offline

Posts: 585

Thank You
-Given: 0
-Receive: 2


View Profile
« on: January 27, 2003, 04:30:46 PM »

Quote  [Expand]
Auto annotate images MOD for 4images - Image Gallery Management System.

Version:      1.4

Author:       Silly Little Lamer <sll@dalnet.ru>

Description:

This MOD automatically places a line of custom text, called "Annotation" on every image uploaded to the Gallery. Fully customizable: font type, size and color, shadow usage, offsets, annotation location, etc. "Batch Annotate" admin plug-in included, to annotate images, uploaded to your gallery before you installed this MOD.

Requirements:    

To use in text annotation mode: GD2+ Library compiled with Freetype support. Also works with ImageMagic, but GD still needed for some functions, which ImageMagic is missing.
For "image embedding" mode you don't need anything.

New in v.1.4

•   NetPBM support in both text and image embedding mode.
•   Media type check (applies annotation only on jpeg images); no ‘gif’ errors anymore.
[/b]

New in v.1.31

•   You can choose the annotation method now: text annotation or embedded PNG image (logo, text, etc.). Image embedding (hopefully) works with ImageMagick even if GD library is not installed on your server. CP annotation settings are now separated from the Gallery Settings. Simplified MOD installation.

New in v.1.2

•   Misc. corrections (read 4images forum), code cleanup. Problem with *nix"rename" solved (hopefully".
•   Now checking if annotation text would fit image width, skipping if not.
•   Now you can use variables in the "annotation text" setting, which will be automatically replaced during annotation:
                   %N for Site Name , %H for full Site URL (http://www.mysite.com), %U for short Site URL (www.mysite.com)  
                   %S for User Name (image uploader name), %D for current date, %T for current time, %B to insert line break into annotation text.
[EDIT by V@no]
there is a bug in annotate.php so, either use single quotes around the variables above (i.e. '%N' or '%T') or do these changes: http://www.4homepages.de/forum/index.php?topic=13719.msg68084#msg68084
[/EDIT]
[/i]

New in v.1.1

•   Now you can customize both text and shadow colors and set alpha blending (text transparency) value for your annotation (thanks to V@no). Transparency using GD2 only!

Installation Level:    Easy
Installation Time:      10 Minutes

Files To Edit:       3

   /4images/member.php
/4images/admin/settings.php
   /4images/lang/english/admin.php

Before installing this MOD! (only if you going to use it in "text annotation mode")
Run this small code below (dont' forget to adjust font path). If you see black square with white text, than your system meets all neccessary requirements.
1
2
3
4
5
6
7
8
9
<?php
header 
("Content-type: image/png");
$im imagecreate (18030);
$black imagecolorallocate ($im000);
$white imagecolorallocate ($im255255255);
imagettftext ($im1401021$white"/home/public_html/arial.ttf""GD Freetype test");
imagepng ($im);
imagedestroy ($im);
?>

download: http://www.4homepages.de/forum/index.php?action=dlattach;topic=13719.0;attach=4186


If you get error when run batch_annotate.php
Quote  [Expand]
Warning: require(./../admin/admin_global.php) [function.require]: failed to open stream: No such file or directory in admin/plugins/batch_annotate.php on line 8
Fatal error: require() [function.require]: Failed opening required './../admin/admin_global.php' (include_path='.') in admin/plugins/batch_annotate.php on line 8
Then open batch_annotate.php
Find:
1
$root_path = (eregi("\/plugins\/"$PHP_SELF)) ? "./../../" "./../";

Replace it with:
1
$root_path "./../../";

The attached package already fixed.

* annotation_1_4.zip (37.77 KB - downloaded 672 times.)
« Last Edit: July 18, 2014, 05:52:53 PM by kai » Logged
edwin
Full Member
***
Offline Offline

Posts: 199

Thank You
-Given: 0
-Receive: 0


View Profile WWW
« Reply #1 on: January 27, 2003, 04:37:57 PM »

Where can i see a demo of this MOD
Logged
V@no
If you don't tell me what to do, I won't tell you where you should go :)
Administrator
4images Guru
*****
Offline Offline

Posts: 17849

Thank You
-Given: 47
-Receive: 564

mmm PHP...


View Profile WWW
« Reply #2 on: January 27, 2003, 05:54:25 PM »

try here:
http://come.no-ip.com/categories.php?cat_id=78
Logged

Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)
SLL
Hero Member
*****
Offline Offline

Posts: 585

Thank You
-Given: 0
-Receive: 2


View Profile
« Reply #3 on: January 27, 2003, 07:40:39 PM »

Cyrillic users only:

To be able to write annotations in Russian, add this function at the beginning of annotate.php

1
2
3
4
5
6
7
8
9
function CyrText($aTxt) {
$isostring = convert_cyr_string($aTxt, "w", "i");
for ($i=0; $i < strlen($isostring); $i++){
$thischar=substr($isostring,$i,1);
$charcode=ord($thischar);
$uniline.=($charcode>175) ? "&#" . (1040+($charcode-176)). ";" : $thischar;
}
return $uniline;
}


and after both lines: $ann_text = $config['annotation_text'];
add:
1
$ann_text = CyrText($ann_text);
Logged
wenzel-orf
Pre-Newbie

Offline Offline

Posts: 7

Thank You
-Given: 0
-Receive: 0


View Profile
« Reply #4 on: January 31, 2003, 08:27:05 PM »

Fatal error: imagecolorresolvealpha(): requires GD 2.0 or later in /homepages/7/d13364081/htdocs/4images/admin/plugins/batch_annotate.php on line 52

I can only use GD 1.62 - is there a way to use this script with 1.62?

Thx
Robert
Logged
SLL
Hero Member
*****
Offline Offline

Posts: 585

Thank You
-Given: 0
-Receive: 2


View Profile
« Reply #5 on: January 31, 2003, 09:05:19 PM »

Quote from: wenzel-orf   [Expand]
I can only use GD 1.62 - is there a way to use this script with 1.62?

I can't check myself, but I don't think it will work... there's at least 3 functions used, which are from GD2. Anyway, I wouldn't recommend using this MOD with GD1 due to the miserable quality of resulting images. It's probably acceptable with thumbnails, but not with fullsize images.
Logged
FreDyz
Newbie
*
Offline Offline

Posts: 36

Thank You
-Given: 0
-Receive: 0


View Profile
« Reply #6 on: February 14, 2003, 01:21:01 AM »

I've got GD 2.0 with FreeType Support enabled (I can see this in phpinfo) but if I try test the server with the small code it doesn't work. I don't know if the problem is with font path: I've uploaded arial.ttf to the server and put the font path according this.... am I doing something bad?
Logged
V@no
If you don't tell me what to do, I won't tell you where you should go :)
Administrator
4images Guru
*****
Offline Offline

Posts: 17849

Thank You
-Given: 47
-Receive: 564

mmm PHP...


View Profile WWW
« Reply #7 on: February 14, 2003, 01:24:21 AM »

make sure u did this:
http://www.4homepages.de/forum/viewtopic.php?t=4053&highlight=define+gd2
Logged

Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)
FreDyz
Newbie
*
Offline Offline

Posts: 36

Thank You
-Given: 0
-Receive: 0


View Profile
« Reply #8 on: February 14, 2003, 01:43:47 AM »

But that is for use GD in order to make thumbails, I've use GD for thumbails and it works fine in the server but the small code doesn't work.  Confused
Logged
V@no
If you don't tell me what to do, I won't tell you where you should go :)
Administrator
4images Guru
*****
Offline Offline

Posts: 17849

Thank You
-Given: 47
-Receive: 564

mmm PHP...


View Profile WWW
« Reply #9 on: February 14, 2003, 01:49:42 AM »

but did u do that?  Rolling Eyes
this mod REQUERED GD2.
making thubnails does not requered GD2, and if u dont do that changes, 4images wont use fully features of GD2
Logged

Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)
FreDyz
Newbie
*
Offline Offline

Posts: 36

Thank You
-Given: 0
-Receive: 0


View Profile
« Reply #10 on: February 14, 2003, 01:59:19 AM »

Yes I do that.

But I don't try to install the mod yet, I want to be sure that it will work, and for this reason I used the small test code to test the server, but this doesn't work. Will work the MOD?
Logged
V@no
If you don't tell me what to do, I won't tell you where you should go :)
Administrator
4images Guru
*****
Offline Offline

Posts: 17849

Thank You
-Given: 47
-Receive: 564

mmm PHP...


View Profile WWW
« Reply #11 on: February 14, 2003, 02:07:11 AM »

ah now I understud what do u mean by "small code".
well, it might be because your GD doesnt support Freetype. did u check the links SLL provided?
Logged

Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)
FreDyz
Newbie
*
Offline Offline

Posts: 36

Thank You
-Given: 0
-Receive: 0


View Profile
« Reply #12 on: February 14, 2003, 02:20:53 AM »

Hmmm.... I thought that only GD2 with FreeType support was necessary but checking the links I see that a patch for GD is necessary too Sad

Sorry for my questions without read well before  Embarassed
Logged
SLL
Hero Member
*****
Offline Offline

Posts: 585

Thank You
-Given: 0
-Receive: 2


View Profile
« Reply #13 on: February 14, 2003, 08:34:03 AM »

Quote from: FreDyz   [Expand]
Hmmm.... I thought that only GD2 with FreeType support was necessary but checking the links I see that a patch for GD is necessary too Sad
This patch is not a "must", but with patched GD image quality is much better
Logged
V@no
If you don't tell me what to do, I won't tell you where you should go :)
Administrator
4images Guru
*****
Offline Offline

Posts: 17849

Thank You
-Given: 47
-Receive: 564

mmm PHP...


View Profile WWW
« Reply #14 on: February 20, 2003, 04:06:14 AM »

I think the code that inserts in /member.php should be inserted BEFORE
1
    if (!$uploaderror) {
not after
1
2
 if (create_thumbnail($src, $dest, $quality, $dimension, $resize_type)) {
     $new_thumb_name = $new_name;

because Annotation wont work if auto thumbnail not enabled in the settings.
Logged

Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)
Pages: [1] 2 3 4 5 ... 62 » »» Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.128 seconds with 19 queries.
Post your comments here