}` 4. Open `i.php` (in /zen/) 5. Find ` // Create the cached file (with lots of compatibility)...` (app line 250) 6. Add following code BEFORE the line `touch($newfile);`: `/* INCL CODE FOR VIDEO */
if (isset($_GET['video']) && $_GET['video'] == '1') {
$quality = 100;
$sx = imagesx($newim) ;
$sy = imagesy($newim) ;
$Text="VIDEO" ; /* Your text info */
$Font="gs.ttf" ; /* this has to be uploaded in /zen/ folder */
Like for 0.2 version, there is a source package and an installation package. Nothing changes for installation, you just have to replace your old files by new files from ZenVideo packages.
I hope it will be useful for you !
Have fun and report bugs
I'm sorry for releasing this version lately but i've had lot and lot of work...
I actually might implement this into my zenphoto. Like i have stated this gallery is for a summer trip, and some people might take videos for it. Thanks for coding this.
Just a little question, please. I need to display .jpg and .pdf files. This proble looks like .jpg and movies files, no ? So, is it possible to transform zenvideo in a zenpdf viewer ? How hard it is ?
@dldler -- It's not that simple; videos and PDFs are quite different. You could be right though, it could just be a matter of printing the right EMBED for the Adobe plugin...
This is great. Getting video on my photo album is huge... thank you thank you thank you.
OK.. now that I have the thank yous out of the way. Can I bring up the IE video size item again. I know Firefox is the way to go but... I'm loser. Is there a timeline on when you think you can look at the IE video item?
Have fun with it, and don't forget to report bugs. I have fixed the "ie bug", now the size of the video player is the same on every web browser (except lynx).
I'm using Version 0.3.1 and the latest version of ZP and it all works fine except the video is playing upside down. Any ideas? do I need to tweek some code?
Comments
Could you post it somewhere else ?
Thank you !
I've been AFK during holidays, but i'm going to release the new version of ZenVideo based on Zenphoto 1.0.6 in the next days...
Stay tuned.
la0c00n feel free to use that
Maybe you should include the default video thumbnail in the archive too ?
1. Open classes.php
2. Find `function getThumb()`
3. Add `&video=1` here (appr line 404):
`//The file is a viedo and has a thumb
if($this->video == true && $this->videoThumb != NULL){
return WEBPATH . "/zen/i.php?a=".urlencode($this->album->name)."&i=".urlencode($this->videoThumb)."&s=thumb&video=1";
}`
4. Open `i.php` (in /zen/)
5. Find ` // Create the cached file (with lots of compatibility)...` (app line 250)
6. Add following code BEFORE the line `touch($newfile);`:
`/* INCL CODE FOR VIDEO */
if (isset($_GET['video']) && $_GET['video'] == '1') {
$quality = 100;
$sx = imagesx($newim) ;
$sy = imagesy($newim) ;
$Text="VIDEO" ; /* Your text info */
$Font="gs.ttf" ; /* this has to be uploaded in /zen/ folder */
$yourHEXcolor= '00FF99';
$h_int = hexdec($yourHEXcolor);
$FontColor = imagecolorallocate($newim, 0xFF & ($h_int >> 0x10), 0xFF & ($h_int >> 0x8), 0xFF & $h_int);
$black = ImageColorAllocate ($newim,0,0,0) ;
$white = ImageColorAllocate ($newim,255,255,255) ;
$Rotation = 0 ;
/* Iterate to get the size up */
$FontSize=1 ;
do
{
$FontSize *= 1.1 ;
$Box = @ImageTTFBBox($FontSize,0,$Font,$Text);
$TextWidth = abs($Box[4] - $Box[0]) ;
$TextHeight = abs($Box[5] - $Box[1]) ;
}
while ($TextWidth < $sx*0.7) ;
/* Awkward maths to get the origin of the text in the right place */
$x = $sx/2 - cos(deg2rad($Rotation))*$TextWidth/2 ;
$y = $sy/2 + sin(deg2rad($Rotation))*$TextWidth/2 + cos(deg2rad($Rotation))*$TextHeight/2 ;
ImageTTFText ($newim,$FontSize,$Rotation,$x+2,$y+2,$white,$Font,$Text);
ImageTTFText ($newim,$FontSize,$Rotation,$x+1,$y+1,$black,$Font,$Text);
ImageTTFText ($newim,$FontSize,$Rotation,$x,$y,$FontColor,$Font,$Text);
}
`
http://la0c00n.info/zenvideo
Like for 0.2 version, there is a source package and an installation package.
Nothing changes for installation, you just have to replace your old files by new files from ZenVideo packages.
I hope it will be useful for you !
Have fun and report bugs
I'm sorry for releasing this version lately but i've had lot and lot of work...
Thanks, Lordcoffee.
I used a standard windows fond GilSans (renamed it to gs.ttf) and uploaded it. It has to be in the /zen/ directory.
when can you release the vid integration on 1.0.8?
I need to display .jpg and .pdf files. This proble looks like .jpg and movies files, no ?
So, is it possible to transform zenvideo in a zenpdf viewer ? How hard it is ?
OK.. now that I have the thank yous out of the way. Can I bring up the IE video size item again. I know Firefox is the way to go but... I'm loser. Is there a timeline on when you think you can look at the IE video item?
again... THANKS... You rock
I will upload the release on my website asap.
Always at the same url: http://la0c00n.info/zenvideo
I'll post it tomorrow on trac...
Have fun with it, and don't forget to report bugs.
I have fixed the "ie bug", now the size of the video player is the same on every web browser (except lynx).
Thanks, I'll take a look at it and see if integrating can be done easily.
With the patch attached to it.
I think i'm gonna look after the "Password-protected Albums" feature.
I'm using Version 0.3.1 and the latest version of ZP and it all works fine except the video is playing upside down. Any ideas? do I need to tweek some code?
Thanks,
by-product