PHPCMS Video Module Implementation List page open content page play video directly

Source: Internet
Author: User

Excerpt from Phpcms forum

Original link Address: http://bbs.phpcms.cn/thread-557691-1-1.html

Previously downloaded the "Butterfly Free to fly" development of the video model, found that the function is good, but the only drawback is that I want to open in the list page, and then directly in the content page play, through the "Miluo window" webmaster, I now share a video module, only call external FLV video, other video formats please find the player code yourself. I am a novice, the purpose is only for the novice to provide convenience, do not good, please do not laughed at experts ...
1: Create a new video model, and then add a video field with the field type "single line of text".
2: Field name "Custom", I write is "video", write your own please remember clearly, the back to call, others look at the office.
3: Create a new video playback page (content page) and add the FLV video player code where you want to display the video, with the following code:
<script type= "Text/javascript" src= "{$siteurl}statics/player/flv/swfobject.js" ></script><!-- Call JS Code--

<span id= "Player1" ><a href= "Get ' >http://www.macromedia.com/go/getflashplayer" >get the Flash Player </a> to see this player.</span>

<script type= "Text/javascript" >

var S1 = new SWFObject ("{$siteurl}statics/player/flv/player.swf", "single", "640", "X", "7");<!--player address, width, height and

S1.addparam ("allowFullScreen", "true");

S1.addvariable ("file", "{$video}");<!--video file path, call the video address field, which is the field name added in the background--

S1.addvariable ("image", "{$thumb}");<!--thumbnail, open video to display thumbnails, no open as player black background, thumbnail to add when publishing content

S1.addvariable ("width", "640");

S1.addvariable ("height", "500");

S1.write ("Player1");

</script>

PHPCMS Video Module Implementation List page open content page play video directly

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.