View file autoindex/plugins/video_watermark_plugin.php

File size: 1.17Kb
<?php
// Video WaterMark Thumb plugin
// master autoindex
// author: Sohel (masterloft.net)
// Site: http://masterloft.net
// Fb: http://facebook.com/master.lab.90
/**
* Video Watermark Plugin - This will  add the wartermark image TTF text genrator in your image thumb
* author: Sohel
* 28 November 2013
*/
$plugins->add_hook("index_files","video_watermark_preview");
$plugins->add_hook("file","video_watermark_preview2");
function video_watermark_info(){
return    array(
"name" => "Video Watermark Plugin",
"author" => "Sohel (masterloft.net)",
"author_site" => "http://masterloft.net",
"description" => "This will allow image TTF text watermark on Video images files(requires gd lib or ffmpeg installed)",
);
}
function video_watermark_preview(){
global $icon,$ext,$d;
if(in_array($ext->extension,array("3gp","avi","mp4","wmv","flv")))
$icon = "/show.php?s=".base64_encode($d->path);
}
function video_watermark_preview2($value){
global $ext,$icon,$show_icon,$file;
if(in_array($ext->extension,array("3gp","avi","mp4","wmv","flv"))){
$new_icon = "/show.php?s=".base64_encode($file->path);
$show_icon = str_replace($icon,$new_icon,$show_icon);
}
return $value;
}