Advanced search  

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]

Pages: 1 2 [3] 4 5 6 7 ... 10   Go Down

Author Topic: Coppermine should also allow Video  (Read 132458 times)

0 Members and 1 Guest are viewing this topic.

omniscientdeveloper

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 901
Coppermine should also allow Video
« Reply #40 on: January 19, 2004, 01:18:11 pm »

Thanks, but I don't drink.  :wink:

For those of you that can code a bit, here are the language file changes that I made:

Add this entry to the "ecard.php" section of your language file:
Code: [Select]
       'error_not_image' => 'Only images can be sent as an ecard', // Translate 'Only images can be sent as an ecard' to your language.

Add the following changes in the "editpics.php" section of your language file:
Code: [Select]
'pwidth' => 'width', // Translate 'width' to your language.
'pheight' => 'height', // Translate 'height' to your language.
'pic_info_str_movie' => ' - %s KB - %s views - %s votes', // Translage 'views' and 'votes' to your language.


NOTE: Your language file is found in the 'lang' folder. These changes aren't necessary if you're using English.

This should help out the translators a bit.
Logged

STRiDOR

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 23
    • Nordin Rahhali's World Lounge
nice work! Thanks
« Reply #41 on: January 20, 2004, 02:33:00 am »

I've just updated my gallery with your mod omniscientdeveloper, and just wanted to say thanks.  It works wonderfully.
Logged
STRiDOR

moorey

  • VIP
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 404
Coppermine should also allow Video
« Reply #42 on: January 20, 2004, 04:38:28 am »

Excellent work! Trying it out now.
Logged

moorey

  • VIP
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 404
Coppermine should also allow Video
« Reply #43 on: January 20, 2004, 09:37:57 am »

Sweet.. it works great! Had to disable the watermarking mod though to get it working - a pity but makes sense. I was hoping there was an option to upload a custom thumbnail representation of the particular video, not just file types.
Logged

omniscientdeveloper

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 901
Coppermine should also allow Video
« Reply #44 on: January 20, 2004, 10:16:48 am »

:) (I've already thought of that.)

Like gaugau said, this is more of a beta release. The final version will have that capability. It'll be accomplished by uploading a pic with "thumb_" as the prefix (or whatever is set in the config) and the extension being either a jpg or png.

Example:

video name: myvideo.wmv
thumb name: thumb_myvideo.jpg or thumb_myvideo.png

(ofcourse coppermine can do the resizing, so the user won't have to do it)
Logged

hardlocke

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 35
Coppermine should also allow Video
« Reply #45 on: January 20, 2004, 11:56:47 am »

i can't view the thumbs and and the videos doesn't start....
is there a conflict with the watermark hack???


 :?:
Logged

omniscientdeveloper

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 901
Coppermine should also allow Video
« Reply #46 on: January 20, 2004, 12:00:43 pm »

Most likely. See the previous poster. He had to uninstall the watermark mod. I'll download it, when I get some time later this week, and see how it works so I can make them work together.
Logged

hardlocke

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 35
Coppermine should also allow Video
« Reply #47 on: January 20, 2004, 12:13:17 pm »

in my watermark hack, i replaced only one line in functions.inc.php:

original code
Code: [Select]
return $url_prefix[$pic_row['url_prefix']]. path2url($pic_row['filepath']. $pic_prefix[$mode]. $pic_row['filename']);

with this code
Code: [Select]
return 'logo.php?picturename='.$url_prefix[$pic_row['url_prefix']]. path2url($pic_row['filepath']. $pic_prefix[$mode]. $pic_row['filename']);



and here is the logo.php
Code: [Select]

<?
// SCHIPT BY DJ AXION
// e-mail: DJ@the-expansion.com
// Enjoy this script!

// GET SOURCE PICTURE FROM FORM INPUT
$b = imagecreatefromjpeg($picturename) or die ("Could not create from JPEG");



$bx = imagesx($b); // source width
$by = imagesy($b); // source height


$lm = $b;

if ($bx > 200 and $bx < 600 )  {  // this ensures no watermark is added to small images (e.g. thumbnails)
// ADD WATERMARK (medium Image)
$pos = "bottomright"; //where is the watermark displayed...

if ($pos == "topleft") {
        $src_x = 0;
        $src_y = 0;
        } else if ($pos == "topright") {
        $src_x = $bx - 193;
        $src_y = 0;
        } else if ($pos == "bottomleft") {
        $src_x = 0;
        $src_y = $by - 187;
        } else if ($pos == "bottomright") {
        $src_x = $bx - 105;
        $src_y = $by - 26;
}
// THIS IS THE CODE FOR THE WATERMARK
ImageAlphaBlending($lm, true) or die ("Could not alpha blend"); // Enable when on GD 2+
$logoImage = ImageCreateFromPNG('logo_small.png'); // logo.png is a watermark it add's...
$logoW = ImageSX($logoImage);
$logoH = ImageSY($logoImage);
ImageCopy($lm,$logoImage,$src_x,$src_y,0,0,$logoW,$logoH);
}

if ($bx > 600)  {  // this ensures no watermark is added to small images (e.g. thumbnails)
// ADD WATERMARK (Big Image)
$pos = "bottomright"; //where is the watermark displayed...

if ($pos == "topleft") {
        $src_x = 0;
        $src_y = 0;
        } else if ($pos == "topright") {
        $src_x = $bx - 193;
        $src_y = 0;
        } else if ($pos == "bottomleft") {
        $src_x = 0;
        $src_y = $by - 187;
        } else if ($pos == "bottomright") {
        $src_x = $bx - 580;
        $src_y = $by - 160;
}
// THIS IS THE CODE FOR THE WATERMARK
ImageAlphaBlending($lm, true) or die ("Could not alpha blend"); // Enable when on GD 2+
$logoImage = ImageCreateFromPNG('logo_big.png'); // logo.png is a watermark it add's...
$logoW = ImageSX($logoImage);
$logoH = ImageSY($logoImage);
ImageCopy($lm,$logoImage,$src_x,$src_y,0,0,$logoW,$logoH);
}

Imagejpeg($lm,'',80); //80 means JPEG quality
imageDestroy($lm);
?>
Logged

omniscientdeveloper

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 901
Coppermine should also allow Video
« Reply #48 on: January 20, 2004, 12:28:05 pm »

Which function is the line you replaced in?
Logged

hardlocke

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 35
Coppermine should also allow Video
« Reply #49 on: January 20, 2004, 03:36:48 pm »

i don't know... this code is not from me..... :lol:
Logged

omniscientdeveloper

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 901
Coppermine should also allow Video
« Reply #50 on: January 21, 2004, 12:07:10 am »

:?

I don't understand. Are you saying that you didn't write that code or that it didn't come from your site?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Coppermine should also allow Video
« Reply #51 on: January 21, 2004, 12:44:29 am »

the watermark hack hardlocke is referring to can be found on the old board: http://coppermine.sourceforge.net/oldboard/viewtopic.php?t=961

I wouldn't spend too much time on fixing it: using the watermark hack is not recommended, because it applies the watermark to every pic that is requested from the server (this way, it consumes large server ressources) - can only be used on sites with very little traffic (and a webhost who is very tolerant :wink: ).

Hopefully there'll be an additional feature in coppermine instead in a future version that will batch-add watermarks images (or text) to multiple pics only once (for those who can't/won't apply watermarks on their pc before uploading the pic).

I used to be worried in the first place when the watermark hack was submitted that it'll cause troubles with other mods, as it doesn't use displayimage.php, but uses a separate file (logo.php) which just isn't state-of-the-art any longer (sorry to say that, DJAxion).

GauGau
Logged

omniscientdeveloper

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 901
Coppermine should also allow Video
« Reply #52 on: January 21, 2004, 01:17:32 am »

It could "possibly" be fixed by caching the watermarked file. From looking at the code, it doesn't look like it does that.

Maybe "wmk_" as a prefix?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Coppermine should also allow Video
« Reply #53 on: January 23, 2004, 12:04:20 am »

split unrelated posting into separate thread. Do not hijack other's threads :evil:

GauGau
Logged

Tarique Sani

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 2712
    • http://tariquesani.net
Coppermine should also allow Video
« Reply #54 on: January 23, 2004, 08:22:06 am »

Quote from: "omniscientdeveloper"
It could "possibly" be fixed by caching the watermarked file.

Yes caching of watermarked files is the answer and watermarking itself should be an upload time as well as Admin settable option.

This combine with your Picture URL obscuring script has got great potential in Stock Photo (and such) sites which show watermarked pictures to unsubscribed users....
Logged
SANIsoft PHP applications for E Biz

salvemeum

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Coppermine should also allow Video
« Reply #55 on: January 23, 2004, 02:31:35 pm »

I have a problem uploading video files. I tried both the xp publish wizard, and the upload file function in the gallery.
I only get a message that it isnt a picture file. And I get an empty album, with no name on it, so I am not able to delete it, since I dont get any edit, delete ... buttons on it.
It was an wmv file I tried uploading, maybe that is the problem?
Logged

salvemeum

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Coppermine should also allow Video
« Reply #56 on: January 23, 2004, 02:51:14 pm »

Hmm.. Now I tried uploading 2 files to an album.. 2 files that were 2.48 and 2.45 mb... in mpg format, with the mpeg extension to the filenames. The 2.48 mb file uploaded nicely, and worked fine, but the 2.45 mb file I got an
" No picture was uploaded !
If you have really selected a picture to upload, check that the server allows file uploads... !  error... What could cause this? since the files are about the same size + they have the same extension.. non of the files has illigal characters in their name either, one is called mcsplash.mpeg, the other hjelle.mpeg .. strange...
Logged

omniscientdeveloper

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 901
Coppermine should also allow Video
« Reply #57 on: January 23, 2004, 03:14:11 pm »

I never editted the xp_publish file, so I don't know how it works. Post a link. If your site isn't porn I'll check it out.
Logged

salvemeum

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Coppermine should also allow Video
« Reply #58 on: January 23, 2004, 03:34:30 pm »

hehe.. no porn, maybe as far away from porn that you can get :p

http:galleri.flyby-fester.no

and I made a test account
login: testuser
pass: test
Logged

salvemeum

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Coppermine should also allow Video
« Reply #59 on: January 23, 2004, 03:35:23 pm »

hehe.. no porn, maybe as far away from porn that you can get :p

http://galleri.flyby-fester.no

and I made a test account
login: testuser
pass: test
Logged
Pages: 1 2 [3] 4 5 6 7 ... 10   Go Up
 

Page created in 0.028 seconds with 19 queries.