Design

Category: Tutorials|Jun 12, 2018 | Author: Admin

CMSMS HTML5 Video UDT

Share on

CMS Made Simple 1.11.x / 1.12 | 1-10-2014 | Pascal Merks | 

Here is a UDT for CMS Made Simple to put videos on your website without using youtube. You just host your video on your own website.

 

Create a new UDT:
Extensions \ User separated tags \ Add tag

Name: video

Code:

$config = cmsms()->GetConfig();
echo '<video width="100%" controls poster="' . $config['root_url'] . '/uploads/videos/' . ($params['file']) . '.jpg">
<source src="' . $config['root_url'] . '/uploads/videos/' . ($params['file']) . '.mp4" type="video/mp4">
<source src="' . $config['root_url'] . '/uploads/videos/' . ($params['file']) . '.ogv" type="video/ogg">
<source src="' . $config['root_url'] . '/uploads/videos/' . ($params['file']) . '.webm" type="video/webm">
Your browser does not support HTML5 video.
</video>';

Create a new folder:
Go to Content / File manager and create a folder of videos in the folder uploads (here the videos are shown).

Upload 4 files with the named name in this folder.

The video file in MP4 format. (File extension .mp4)
The video file in OGG format. (File extension .ogv)
The video file in WEBM format. (File extension .webm)
A preview image in JPG format. (File extension .jpg)

Through this website https://video.online-convert.com you can convert your videos to the correct format or use a program for this /any-video-converter.com/products/for_video_free/ is there a good one for that.

View video on your website:
If you have done everything right, you can now call your video via this line:

Bracket Start video file = "name video" Bracket end

name video is the name you gave to all the files without the file extension (mp4, ogv, jpg).

Example video:

{video file = "test"}

Sponsored Ads:

Comments:

Sponsored Ads:

Discord

Page 1 of 1010  >  >>

Microsoft’s free PC optimizer makes it easier to free up storage space

news/id3030/Microsoft-PC-Manager-1.png Microsoft-PC-Manager-1.png

May 13, 2024 | Category: Microsoft | Comments

Adios, CCleaner? Microsoft has added helpful new features to its free PC Manager.

read more…

Stack Overflow Users Are Revolting Against an OpenAI Deal

news/id3029/GettyImages-571978003.png GettyImages-571978003.png

May 12, 2024 | Category: IT | Comments

Members of the software developer community have reported deleting or altering their posts to prevent them from being used by OpenAI.

read more…

ChatGPT is probably coming to the iPhone

news/id3028/bilde-23-1155x770.png bilde-23-1155x770.png

May 11, 2024 | Category: Apple | Comments

Apple has more or less come to an agreement with OpenAI to integrate ChatGPT on the iPhone. That is revealed by Bloomberg.

read more…

Page 1 of 1010  >  >>