04-20-2008, 09:44 PM
How to embed videos on phpcow
One of my favorite features I added was embedding video on phpcow. Here is how I went about doing it;
Go to your admin panel>templating>create new function
The next window that pops up should have the following:
function name
description
code
function name :enter whatever you want to call it ex. video embedding
description: this is what will show up for the listing, also good to take advantage of some SEO here
code: here is where you will drop in the code from whatever website it is you're grabbing the video from. ex:<div id="container" style="position:relative;width:320px;height:308px"><div id="flash_container" style="position:absolute;top:0px;left:0px;z-index:1"><OBJECT id="player296" codeBase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" height="308" width="320" padding="0" classid="clsid27cdb6e-ae6d-11cf-96b8-444553540000" VIEWASTEXT><PARAM NAME="FlashVars" VALUE="autoplay=false&assetId=video:assetmms:2104122&playerId=player296"><PARAM NAME="Movie" VALUE="http://o.aolcdn.com/mediaplayer/players/fpm/fpm.swf"><PARAM NAME="src" VALUE="http://o.aolcdn.com/mediaplayer/players/fpm/fpm.swf"><PARAM NAME="WMode" VALUE="transparent"><PARAM NAME="AllowScriptAccess" VALUE="always"><PARAM NAME="AllowNetworking" VALUE="all"><embed src="http://o.aolcdn.com/mediaplayer/players/fpm/fpm.swf" FlashVars="autoplay=false&assetId=video:assetmms:2104122&playerId=player296" quality="high" width="320" height="308" name="player296" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" wmode="transparent"></embed></OBJECT></div><div id="videoContainer" style="position:absolute;left:0px;top:32px; z-index:2"></div></div>
thats just a current story from aol video on my site
Thats it! Then hit save, and then put the function into your template wherever you want it to appear. If you want to keep updating the video daily/weekly or whatever you then need only go into the same location, and instead of create function, click on edit function, change out the description, insert the new code and then check the "rebuild template" box before saving and it will automatically update your website with the new video.
One of my favorite features I added was embedding video on phpcow. Here is how I went about doing it;
Go to your admin panel>templating>create new function
The next window that pops up should have the following:
function name
description
code
function name :enter whatever you want to call it ex. video embedding
description: this is what will show up for the listing, also good to take advantage of some SEO here
code: here is where you will drop in the code from whatever website it is you're grabbing the video from. ex:<div id="container" style="position:relative;width:320px;height:308px"><div id="flash_container" style="position:absolute;top:0px;left:0px;z-index:1"><OBJECT id="player296" codeBase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" height="308" width="320" padding="0" classid="clsid27cdb6e-ae6d-11cf-96b8-444553540000" VIEWASTEXT><PARAM NAME="FlashVars" VALUE="autoplay=false&assetId=video:assetmms:2104122&playerId=player296"><PARAM NAME="Movie" VALUE="http://o.aolcdn.com/mediaplayer/players/fpm/fpm.swf"><PARAM NAME="src" VALUE="http://o.aolcdn.com/mediaplayer/players/fpm/fpm.swf"><PARAM NAME="WMode" VALUE="transparent"><PARAM NAME="AllowScriptAccess" VALUE="always"><PARAM NAME="AllowNetworking" VALUE="all"><embed src="http://o.aolcdn.com/mediaplayer/players/fpm/fpm.swf" FlashVars="autoplay=false&assetId=video:assetmms:2104122&playerId=player296" quality="high" width="320" height="308" name="player296" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" wmode="transparent"></embed></OBJECT></div><div id="videoContainer" style="position:absolute;left:0px;top:32px; z-index:2"></div></div>
thats just a current story from aol video on my site
Thats it! Then hit save, and then put the function into your template wherever you want it to appear. If you want to keep updating the video daily/weekly or whatever you then need only go into the same location, and instead of create function, click on edit function, change out the description, insert the new code and then check the "rebuild template" box before saving and it will automatically update your website with the new video.
