Another nice feature I made to print a tekst (f.e. 'VIDEO') on the thumb, if it exists:
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 [b]BEFORE[/b] 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);
}
`