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

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 12 Guests are viewing this topic.

tedlow

Quote from: Stramm on March 20, 2006, 08:56:17 AM
has been answered b efore. It's permission problems you have. In a standard coppemine the pics you upload don't get modified.. so they just need read permissions. When you apply a watermark the system needs write permissions too...
chmod the folder to 755 or 777. If that doesn't already work, then chmod the to batch pics to 666 (if that doesn't do the trick 755 or 777)

Hmm I didn't recall seeing anything on the thread about permissions but anyway, I did originally set the directory to 777 that didn't work so I switched to 755 and I eventually switched to 666 (though it becomes 766) and all of those methods do not work.

Stramm


RobbenR

finaly i'm getting closer to the watermark problem. I have installed imagemagick and it's working fine BUT as stramm already point out to me with the watermark.png file .
I have installed in into mageMagick ... small typo error but big problem for watermarking I guess. I'm running now on GD2 en there it is.
will re-install ImageMagick to see if I'm correct.

Will keep you informed people.. next chapter in the land of coppermine & mods.. ;D
There is no such thing as strangers,
only friends we haven't met.

tedlow

Quote from: Stramm on March 20, 2006, 06:29:55 PM
here's the link
http://forum.coppermine-gallery.net/index.php?topic=28367.msg134575#msg134575

if chmoding the folder doesn't work you might have to chmod the files too (to 666)



Heh chmoding the files to 666 make's the pictures not viewable.
I managed to get all the files to have the watermark but one now.  I used filezilla to make them all 777.  I just did it a few times and kept reloading.  I don't know heh.  They are in the same folder and sometimes they get it sometimes they don't. 

Edit: Nevermind I guess I had to refresh my cache.  Silly me.

Don't scold me! *hides*

Stramm


RobbenR

Guys I'm still having problems with my Watermark.
It only works with GD2 and not with Imagemagick.. 

same path,, same picture..

only swapping between ImageMagick and GD2

Imagemagick is tested and works fine becuase I can see the Logo if i do the test.
I have re-installed everyting just to make sure but still the problem persists

any Idea's...

ps, what is the difference between GD2 and Imagemagick.. I've been reading some stuff about how smooth the pictures wil be with imagemagick but Is it worthy to go on for days searching for my problem if the GD2 will do the same trick for me!
There is no such thing as strangers,
only friends we haven't met.

Stramm

There are some differences but it's not about the quality anymore. If you do not know them already, you probably won't care if I'd tell you. In most cases it's not worth to spend a few hours to make one working if the other already does.

RobbenR

thx stramm for your answer..

I will give it a try with the GD2 option...
There is no such thing as strangers,
only friends we haven't met.

darkpollo

Hi Stramm, i need you again  ::)

I have just finished the web page, but i noticed that Buddies doesnt work. It could be that i am using a SMF bridge?

Another question (more important for me than buddies :))

Is there any posibility to make that the normal_ pictures are stored in a separate folder of the thumbs and orig ones?

Stramm

Works smooth in my test environment. What's the actual problem and as usual link, test user account(s) etc ;)

And I'm pretty sure it's possible to store normal_  images in eg. a subfolder. However it's a lot of work and what for?

darkpollo

Buddies problem solved: Disabled XD
It was cause im using the CPG wrapped on the joomla, and set a code to avoid open the forum standalone. That disabled all the links from CPG to the forum. But i think i prefer that way. So nothing to do here.  ;D

About the folder, i have installed a joomla block that show up a random picture from a folder. I want it to pick the pictures from the album folder of cpg, but there is a lot of pictures there, thumbs, orig, etc. I want only the 150x150 (or similar) to show in the block, so i need to copy them to a new folder.

Do you understand? ???
Im doing my best with my english  ::)

Stramm

far easier than to modify CPG (as I already mentioned that's a lot of work) is probably (although I do not know it at all) to modify that 'joomla block' and add a filter to it so it shows only what you want (preg_match the normal_ prefix)

darkpollo

That could be a good fix... :D

Thanks, i will go to search on the joomla forums :D

Thanks for your quickly answer... :D


darkpollo

Well, i know this is not a mambo or php forum, but i don´t know how to create that filter :S

(im just starting to learn php)
Could you help me?

This is the code to create the block:
$type = $params->get( 'type', 'jpg' );
$folder = $params->get( 'folder' );
$link = $params->get( 'link' );
$width = $params->get( 'width' );
$height = $params->get( 'height' );
$abspath_folder = $mosConfig_absolute_path .'/'. $folder;
$the_array = array();
$the_image = array();

if (is_dir($abspath_folder)) {
if ($handle = opendir($abspath_folder)) {
while (false !== ($file = readdir($handle))) {
if ($file != '.' && $file != '..' && $file != 'CVS' && $file != 'index.html' ) {
$the_array[] = $file;
}
}
}
closedir($handle);

foreach ($the_array as $img) {
if (!is_dir($abspath_folder .'/'. $img)) {
if (eregi($type, $img)) {
$the_image[] = $img;
}
}
}

if (!$the_image) {
echo 'No images';
} else {

  $i = count($the_image);
  $random = mt_rand(0, $i - 1);
  $image_name = $the_image[$random];

  $i = $abspath_folder . '/'. $image_name;
  $size = getimagesize ($i);

  if ($width == '') {
  $width = 100;
  }
  if ($height == '') {
  $coeff = $size[0]/$size[1];
  $height = (int) ($width/$coeff);
  }

  $image = $mosConfig_live_site .'/'. $folder .'/'. $image_name;

}
  ?>
<div align="center">
<?php
   if (
$link) {
  
?>

  <a href="<?php echo $link?>" target="_self">
  <?php
   }
  
?>

<img src="<?php echo $image?>" border="0" width="<?php echo $width?>" height="<?php echo $height?>" alt="<?php echo $image_name?>" /><br />
<?php
   if (
$link) {
  
?>

  </a>
  <?php
   }
  
?>

</div>
  <?php
}


I think i must to create somethin here:
if ($handle = opendir($abspath_folder)) {
while (false !== ($file = readdir($handle))) {
if ($file != '.' && $file != '..' && $file != 'CVS' && $file != 'index.html' ) {
$the_array[] = $file;
}
}
}
closedir($handle);

foreach ($the_array as $img) {
if (!is_dir($abspath_folder .'/'. $img)) {
if (eregi($type, $img)) {
$the_image[] = $img;
}
}
}

But i dont know how to make it...

Stramm

yup, not the right forum and not the right thread...

if (eregi($type, $img) && eregi("normal_", $img)) {

darkpollo

Thanks, thank you very very much.. ::), and sorry  ::)

Would you like that i edit the post and delete the code?

::)

thoxic

I´m using GD version 2 and my watermark is not working anymore :(

darkpollo

Well.. it seems my problems cannot finish!!  :'(

I have everything working now (i thought) but when i want to use the batch tool to set the images into the album i found this problem:
Error executing ImageMagick - Return value: 1

If i use the upload feature it is working fine, so i think that imagemagick is fine...

Thanks again for your help.

http://todo-motos.es/public/

darkpollo

Quote from: RobbenR on March 22, 2006, 04:21:09 PM
Guys I'm still having problems with my Watermark.
It only works with GD2 and not with Imagemagick.. 

same path,, same picture..

only swapping between ImageMagick and GD2

Imagemagick is tested and works fine becuase I can see the Logo if i do the test.
I have re-installed everyting just to make sure but still the problem persists

any Idea's...

ps, what is the difference between GD2 and Imagemagick.. I've been reading some stuff about how smooth the pictures wil be with imagemagick but Is it worthy to go on for days searching for my problem if the GD2 will do the same trick for me!
I have got the same problem
The Imagemagik creates all the files, but it fail when must assign to the albums...
I have change into GD2 and is working fine.

Stramm

Quote from: thoxic on March 25, 2006, 11:06:21 PM
I´m using GD version 2 and my watermark is not working anymore :(

Probably something on your server changed. Scripts don't tend to suddenly stop working. And with that less information it's hard to say more