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