Video in stock pulse gallery

Hello people ! My name is Danut, from Romania. I have one question … how can i upload video and show in “works” page? From config.php, i have added “.mp4” extension, video uploaded succesful, but on page in gallery 1 it is show with question mark. If i click on it, video is working. How can i have an thumbnail?

Regards, Danut

The best way is to hang a video on YouTube, Vimeo, or the like.
Then just embed the embed code with the required space.
Example:
<iframe src="http://player.vimeo.com/video/57175742"></iframe>
Or
<iframe width="854" height="480" src="https://www.youtube.com/embed/7XZXYbhLI2M" frameborder="0" allowfullscreen=""></iframe>

USE PLUGIN, PLUMB-DESIGN. LINK HERE:

1 Like

Thanks Ivaro. But, i want to upload videos direct to the gallery, like photos… from admin …

Thanks @Hwfreak this is a good request

As @IvaRo mentioned it’s easy to add a video with copy/paste but there is not video gallery at the moment. That’s something a future Addon might bring?

You are right to upload videos the way you are doing and embed them but the gallery is for images only at the minute

I need to make this working … my client need video upload. Tomorrow is the last day.

Michael, responded more than 1 hour ago!
I do not know how you want to insert a video into a page.
More videos or one video?
Gal.php script is not intended for government video.
Perhaps, if you do a similar gal.php script.
Replacing variables “<img” under the tag <video> … and other adjustments.
Be careful, a lot of videos slow down the page.
Examples of inserting videos into pages.
1-, 2-, 3-.
Send me an email at IvaRoSoft

1 Like

Hi, @Hwfreak

May perform work with modifications.

HTML 5 Video

<?php
$galdir = $tag_var1;
$images = glob("content/media/{$galdir}/*");
$taken  = array();
$path_new = '/';
if (!empty($path)) {
	$path_new = $path.'/';
}

$opFile = "content/media/{$galdir}/gallery.txt";

if (file_exists($opFile)) { 
	$fp          = fopen($opFile,"r");    	
	$data        = @fread($fp, filesize($opFile));
	fclose($fp);
	$line        = explode("\n", $data);		


	foreach($line as $test){
		if(!empty($test)){
    		$test_line[] = explode("|", $test); 
		}     	        
	}
        
	foreach ($test_line as $t){
		$image = "content/media/{$galdir}/" . $t[0];
		$info  = pathinfo($image);
		$ext   = $info['extension'];
		if ($ext != 'txt' || empty($ext)) {
			$taken[] = $image;
			echo "<video controls>\n";
			echo "<source src='{$path_new}{$image}'>\n";
			echo "</video>\n";
		}  
	}
}

foreach ($images as $image) { 
	if (!in_array($image, $taken)){
		$info = pathinfo($image);
		$ext  = $info['extension'];
		if ($ext != 'txt') {
			echo "<video controls>\n";
			echo "<source src='{$path_new}{$image}'>\n";
			echo "</video>\n";
		}
	}
}

unset($galdir,$images,$test_line,$tag_var1,$image,$opFile,$line,$fp,$data,$test,$taken);
?>

To add a caption of the edit (Edit file: admin/inc/open.php) in row 48 add $pics_files = array(’.jpg’,’.jpeg’,’.gif’,’.svg’,’.png’,’.mp4’);

Kind Regards,
Armendi

2 Likes

This topic was automatically closed after 44 hours. New replies are no longer allowed.