Alright my free piece of code for the day. The video variables are located in index_dl.pm line 609-637. The two important lines are: $file->{video_img_url}="$1/i/$dx/$file->{file_real}.jpg"; $file->{video_thumb_url}="$1/i/$dx/$file->{file_real}_t.jpg"; Take whatever other variables you need like vid_height, vid_width. They're optional as you don't need these and can hard set them in your template (default is 400x300). In index.cgi go to line 2934 $files = $db->SelectARef("SELECT f.*, DATE(f.file_created) as created, (SELECT COUNT(*) FROM Comments WHERE cmt_type=1 AND file_id=cmt_ext_id) as comments FROM Files f WHERE f.usr_id=? AND f.file_fld_id=? ".&makeSortSQLcode($f,'file_created').$ses->makePagingSQLSuffix($f->{page}),$ses->getUserId,$f->{fld_id}); and replace with: $files = $db->SelectARef("SELECT f.*, DATE(f.file_created) as created, s.srv_htdocs_url, (SELECT COUNT(*) FROM Comments WHERE cmt_type=1 AND file_id=cmt_ext_id) as comments FROM Files f, Servers s WHERE f.usr_id=? AND f.file_fld_id=? AND f.srv_id=s.srv_id ".&makeSortSQLcode($f,'file_created').$ses->makePagingSQLSuffix($f->{page}),$ses->getUserId,$f->{fld_id}); Go to line 2973: $_->{comments}||=''; If you only want video thumbnails then underneath it add: if( ($c->{m_v} && $_->{file_name}=~/\.(avi|divx|flv|mp4|wmv|mkv)$/i) ) { my $iurl = $_->{srv_htdocs_url}; $iurl=~s/^(.+)\/.+$/$1\/i/; my $dx = sprintf("%05d",($_->{file_real_id}||$_->{file_id})/$c->{files_per_folder}); $_->{video_img_url}="$iurl/$dx/$_->{file_real}.jpg"; $_->{video_thumb_url}="$iurl/$dx/$_->{file_real}_t.jpg"; } If you only want image thumbnails then underneath it add: if( ($c->{m_i} && $_->{file_name}=~/\.(jpg|jpeg|gif|png|bmp)$/i ) { my $iurl = $_->{srv_htdocs_url}; $iurl=~s/^(.+)\/.+$/$1\/i/; my $dx = sprintf("%05d",($_->{file_real_id}||$_->{file_id})/$c->{files_per_folder}); $_->{video_img_url}="$iurl/$dx/$_->{file_real}.jpg"; $_->{video_thumb_url}="$iurl/$dx/$_->{file_real}_t.jpg"; } If you want to use video and image thumbnails then use: if( ($c->{m_i} && $_->{file_name}=~/\.(jpg|jpeg|gif|png|bmp)$/i ) || ($c->{m_v} && $_->{file_name}=~/\.(avi|divx|flv|mp4|wmv|mkv)$/i) ) { my $iurl = $_->{srv_htdocs_url}; $iurl=~s/^(.+)\/.+$/$1\/i/; my $dx = sprintf("%05d",($_->{file_real_id}||$_->{file_id})/$c->{files_per_folder}); $_->{video_img_url}="$iurl/$dx/$_->{file_real}.jpg"; $_->{video_thumb_url}="$iurl/$dx/$_->{file_real}_t.jpg"; } Congratulations, you've now got template variables video_img_url and video_thumb_url available in my_files. I've tested this as working.