Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - triaphoto

Pages: [1]
1
ok no prob:
every time you save a jpeg-picture this results in a certain loss of quality.

so if you have to modify a picture NEVER:
save between the steps
close the picture
and open the partially modified picture again to go on with the modification.

for example: by saving the picture you get a quality loss of 10%

if you save the picture AFTER the complete workflow: 10%
if you save it, close it  and reopen it DURING the workflow: 20%

the effect is similar when you use a graphic library.

edit: its no problem if you just save it during the workflow without closing and reopening, because the image is still in your memory
 

2
nice idea!

maybe its a little bit off topic but i think your pictures will suffer a certain loss of quality by watermarking them "on the fly".

the best workflow is:
1. open the picture in original size
2. reduce the size
3. watermark it
4. save it.

never save between step 2 and 3, close the picture and open it again.
So I think its a better idea to upload the unmarked AND the watermarked picture. Or to upload a picture a little bit bigger in size than the output and add an additional command "reduce size" before watermarking the picture.

 

 

3
Feedback & Suggestions / Re: Pic Security
« on: May 27, 2005, 01:18:39 PM »
I think there is only one solution: Watermarks on every picture.
there is another ultimate sollution: dont put it on the web :lol:

strike!
and the very best: even dont take the picture!

4
Feedback & Suggestions / Re: Pic Security
« on: May 27, 2005, 12:24:05 AM »
Sorry but with any protection its just too easy to get a picture.

Just a hardcopy of the screen thats all. I think there is only one solution: Watermarks on every picture.

5
Unfortunately mod_rewrite ist not available by all providers. Strato, a well known german webhoster does not provide mod_rewrite for shared hosting.

6
Mods & Plugins (Releases & Support) / Re: [MOD] Lightbox for GUESTs
« on: March 19, 2005, 08:30:29 PM »
This mod would be perfect, but...
My Gallery runs with 4images 1.7.1. Added pictures are tagged but the lightbox is empty.

I think there is a problem with my version, vano´s gallery runs with 1.7

I checked the cookies, there is one difference:

1.7.1
sessionid  86532440b238abb46f19f1e81d3a09fa

1.7.
4images_sid  0a88f4ebcce9a4b3eea48d3eac2b724e

Could you please post a changed mod that runs also with 1.7.1 ? would be great!

7
This is group project from SLL - idea, Jan - the code, me - adoptation for 4images and finish up*

Finaly u can add multilanguage support not only for the interface ( http://4homepages.de/forum/viewtopic.php?t=4743 ) but also for any text, such as image names, description, anything. Since this is not "real" MOD, I will only show an example how to add this support to image names and description. (basicaly this is more for developers and who know little bit PHP and 4images code structure)

Q: How it works?
A: In the text u'll need add [language] (i.e. [english] or [deutsch]).
Yes, that's it, no [/language] tag requered.
- Everything that is followed after [language] will be used when this language was selected.
- If a text starts with something other then [language] tag and no [language] tag was matched with current language, then the text that can be found before FIRST [language] tag will be showed.
- If a text starts with a [language] tag, and none of the [language] tags are matching with current language, the script will try find [language] tag with 4images default language, if none was found, it will show text as is, with all [] tags.
- If u add [/language] (closing tag) and then add some text after it, that text will be ignored.

Try and see diffirent situations that could be and how this script handle them: http://come.no-ip.com/multilang.php

Here is a little example.

Updated on 08-07-03 2:50PM (EST)

------- Installation ----------
Step 1.
Open /global.php
Find:
Code:
$config['language_dir_default'] = $config['language_dir'];

Add after:
Code:
$handle = opendir(ROOT_PATH."lang");
$config['language_list_array'] = array();
while ($folder = @readdir($handle)) {
  if (@is_dir(ROOT_PATH."lang/$folder") && $folder != "." && $folder != "..") {
    $config['language_list_array'][] = $folder;
  }
}
closedir($handle);
$config['language_list'] = "(".implode("|", $config['language_list_array']).")";


Step 2.
Open /includes/functions.php
Add at the end, just before closing ?>
Code:
function multilang($text, $show_first = 0, $remove = 0){
  global $config;

  preg_match("#\[".$config['language_dir']."\](.*)(\[\/?".$config['language_list']."\]|$)#Uim", $text, $match);
  if (!empty($match[1])) {
    return $match[1];
  }
  preg_match("#^(.*)\[".$config['language_list']."\]#Uim", $text, $match);
  if (!empty($match[1])) {
    return $match[1];
  }
  preg_match("#\[".$config['language_dir_default']."\](.*)(\[\/?".$config['language_list']."\]|$)#Uim", $text, $match);
  if (!empty($match[1])) {
    return $match[1];
  }
  if ($show_first) {
    preg_match("#\[".$config['language_list']."\](.*)(\[\/?".$config['language_list']."\]|$)#Uim", $text, $match);
    if (!empty($match[2])) {
      return $match[2];
    }
  }
  if ($remove) {
    return preg_replace("#\[".$config['language_list']."\](.*)#im", "", $text);
  }
  return $text;
}

function multilang_tag_remove($text){
  global $config;
  return preg_replace("#\[\/?".$config['language_list']."\]#i", " ", $text);
}


This is it.
Now, let me show u how to use it:

U'll need send your text through multilang(); function (i.e. echo multilang($text); this will print result after processing text from $text variable)
Added two keys:multilang($text, $show_first, $remove)
$show_first = 1 would use first matching [language] as default, instead of showing entire text (case 4 and 5 in the example)
$remove = 1 would remove everything, instead of showing entire text (case 4 and 5 in the example)

Practical example:
-------- Image name and description ------------
Open /includes/functions.php find:
Code:
    "image_name" => $image_row['image_name'],
    "image_description" => $description,

replace with:
Code:
    "image_name" => multilang($image_row['image_name']),
    "image_description" => multilang($description),


Important! this is MUST do, other wise your keywords will be messed up!

Open /admin/images.php
Find:
Code:
          $search_words[$image_column] = stripslashes($HTTP_POST_VARS[$image_column]);

Replace with:
Code:
          $search_words[$image_column] = multilang_tag_remove(stripslashes($HTTP_POST_VARS[$image_column]));


Find:
Code:
              $search_words[$image_column] = stripslashes($HTTP_POST_VARS[$image_column.'_'.$i]);

Replace with:
Code:
              $search_words[$image_column] = multilang_tag_remove(stripslashes($HTTP_POST_VARS[$image_column.'_'.$i]));



Open /member.php
Find TWO TIMES:
Code:
          $search_words[$image_column] = stripslashes($HTTP_POST_VARS[$image_column]);

Replace BOTH with:
Code:
          $search_words[$image_column] = multilang_tag_remove(stripslashes($HTTP_POST_VARS[$image_column]));



P.S. I will updating this post if I think of something else Wink
_________________
Please read before posting:
Using forum guide
FAQ


Last edited by V@no on 12.08.2003, 22:47; edited 8 times in total

Pages: [1]