OK, Pizza is destroyed now.
3. util.php
Find line
function deleteorig()
Near line 206
Add new line Above text "function deleteorig()"
and paste code from below
function vesileimaathumbit()
{
global $picturetbl, $CONFIG, $lang_util_php;
$phpself = $_SERVER['PHP_SELF'];
$albumid = $_POST['albumid'];
$updatetype = $_POST['updatetype'];
$numpics = $_POST['numpics'];
$startpic = 0;
$startpic = $_POST['startpic'];
$query = "SELECT * FROM $picturetbl WHERE aid = '$albumid'";
$result = MYSQL_QUERY($query);
$totalpics = mysql_numrows($result);
if ($startpic == 0) {
// 0 - numpics
$num = $totalpics;
// Over picture limit
if ($totalpics > $numpics) $num = $startpic + $numpics;
} else {
// startpic - numpics
$num = $startpic + $numpics;
if ($num > $totalpics) $num = $totalpics;
}
$i = $startpic;
while ($i < $num) {
$image = $CONFIG['fullpath'] . mysql_result($result, $i, "filepath") . mysql_result($result, $i, "filename");
if ($updatetype == 0 || $updatetype == 2) {
$imagesize = getimagesize($image);
if (max($imagesize[0], $imagesize[1]) > $CONFIG['picture_width'] && $CONFIG['make_intermediate']) {
$image = $CONFIG['fullpath'] . mysql_result($result, $i, "filepath") . $CONFIG['normal_pfx'] . mysql_result($result, $i, "filename");
} else {
$image = $CONFIG['fullpath'] . mysql_result($result, $i, "filepath") . mysql_result($result, $i, "filename");
}
if (watermark($image)) {
print $image .' '. $lang_util_php['updated_succesfully'] . '!<br />'; //$normal .' '. $lang_util_php['updated_succesfully'] . '!<br />';
my_flush();
} else {
print $lang_util_php['error_create'] . ':$image<br />'; //$lang_util_php['error_create'] . ':$normal<br />';
my_flush();
}
}
if ($updatetype == 1 || $updatetype == 2) {
$image = $CONFIG['fullpath'] . mysql_result($result, $i, "filepath") . mysql_result($result, $i, "filename");
if (watermark($image)) {
print $image .' '. $lang_util_php['updated_succesfully'] . '!<br />'; //$normal .' '. $lang_util_php['updated_succesfully'] . '!<br />';
my_flush();
} else {
print $lang_util_php['error_create'] . ':$image<br />'; //$lang_util_php['error_create'] . ':$normal<br />';
my_flush();
}
}
++$i;
}
$startpic = $i;
if ($startpic < $totalpics) {
?>
<form action=<?php echo $phpself;
?> method="post">
<input type="hidden" name="action" value="continuewatermarks" />
<input type="hidden" name="numpics" value="<?php echo $numpics?>" />
<input type="hidden" name="startpic" value="<?php echo $startpic?>" />
<input type="hidden" name="updatetype" value="<?php echo $updatetype?>" />
<input type="hidden" name="albumid" value="<?php echo $albumid?>" />
<input type="submit" value="<?php print $lang_util_php['continue'];
?>" class="submit" /></form>
<?php
}
}
Between lines
updatethumbs();
(last one, near line 358)
and
filenametotitle(0);
(should be only few lines after "updatethumbs();" )
Paste this code
echo '<br /><a href="' . $phpself . '">' . $lang_util_php['back'] . '</a>';
} else if ($action == 'watermarks') {//tämä
global $picturetbl, $CONFIG;
print '<a href="' . $phpself . '">' . $lang_util_php['back'] . '</a><br />';
print '<h2>' . $lang_util_php['watermark_wait'] . '</h2>';
vesileimaathumbit();
echo '<br /><a href="' . $phpself . '">' . $lang_util_php['back'] . '</a>';
} else if ($action == 'continuewatermarks') {//tämä
print '<a href="' . $phpself . '">' . $lang_util_php['back'] . '</a><br />';
print '<h2>' . $lang_util_php['watermark_wait'] . '</h2>';
vesileimaathumbit();
echo '<br /><a href="' . $phpself . '">' . $lang_util_php['back'] . '</a>';
} else if ($action == 'title') {
echo '<a href="' . $phpself . '">' . $lang_util_php['back'] . '</a><br />';
print '<h2>' . $lang_util_php['titles_wait'] . '</h2>';
(yes, You should replace few lines. Yes, the lines are identical, but I dont know how to describe it beter in english
)
Then You have to find this
print '<br />';
starttable('100%', '<input type="radio" name="action" value="title" id="title" class="nobg" /><label for="title" accesskey="F" class="labelradio">' . $lang_util_php['filename_title'] . '</label> (1)');
(Near line 442)
On the empty line between, add new line and put this
starttable('100%', '<input type="radio" name="action" value="watermarks" id="watermarks" class="nobg" /><label for="watermarks" accesskey="w" class="labelradio">' . $lang_util_php['watermarks'] . '</label> (1)');
print '
<tr><td>
' . $lang_util_php['update_what'] . ' (2):<br />
<input type="radio" name="updatetype" value="0" id="thumb" class="nobg" /><label for="thumb" accesskey="w" class="labelradio">' . $lang_util_php['watermark_normal'] . '</label><br />
<input type="radio" name="updatetype" value="1" id="resized" class="nobg" /><label for="resized" accesskey="r" class="labelradio">' . $lang_util_php['watermark_image'] . '</label><br />
<input type="radio" name="updatetype" value="2" checked="checked" id="all" class="nobg" /><label for="all" accesskey="a" class="labelradio">' . $lang_util_php['watermark_both'] . '</label><br />
' . $lang_util_php['update_number'] . '
<input type="text" name="numpics" value="' . $defpicnum . '" size="5" /><br />
' . $lang_util_php['update_option'] . '<br /><br />
</td></tr>';
endtable();
print '<br />';
on new line that You just created.
If everything has been done fine, You can now add watermarks on albums by going to "Resize Pictures". there should be new section: "Add watermarks". Just select imagesizes You want to be watermarked, and at the bottom of page, select album what You are going to watermark images in.
There should also be .PNG image "called logo.png". In my case, logo.png is on includes folder. If your logo.png is 30% trnsparent, then You get transparent watermark
You should also change the full path to point correct file (logo.png, or what ever Your watermark image is called)
Hope that I remember to put everything in it :?