This is a mod for livestreaming on phpmotion V2. It would work just the same on V3 with small adaptation of course. But here is what it is.
First you are going to open an account on livestream.com and upload some videos to your account and you will be able also to do direct live streaming once you are set up with them.
You will create a channel name.
And then you will go to
https://secure.livestream.com/myaccount/channelsThen on that same account you will have to create an API key
Wich looks like devkey=xR7p8N7iFU6wveertyeq1uwuDPM98WS4DLDfdoijhdgLDAlnpTPFVe0JvYpJLRgjd3x1Vi-UXuY-nPzjTZavEfdjmxq34PGslzMYOqxQKBg
And the name of your channel;
yourchannel 1-You are going to add some files to your script which are original files that have been changed to fit our purpose:
make a copy of index.php and rename it indexlive.php
make a copy of inner_play.htm and rename it inner_replay
A) Open indexlive.php in your favorite editor and find
//what to display when user logged in
if ($_SESSION["user_id"] != ""){
$template = "templates/main_1.htm";
$inner_template1 = "templates/inner_index.htm";//middle of page
Replace with
//what to display when user logged in
if ($_SESSION["user_id"] != ""){
$template = "templates/main_1.htm";
$inner_template1 = "templates/inner_replay.htm";//middle of page
Same with
//what to display when not logged - and remove such things as login box
$show_login_box = 1;
$template = "templates/main_1.htm";
$inner_template1 = "templates/inner_index.htm";//middle of page
Replace with
//what to display when not logged - and remove such things as login box
$show_login_box = 1;
$template = "templates/main_1.htm";
$inner_template1 = " templates/inner_replay.htm ";//middle of page
B)
Open inner_replay in your favorite editor and replace the script between these two limits
<!--start of flv player-->
<!-- end of flv player -->Replace with
<object id="player" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" name="player" style="width: 550px; height: 345px">
<param name="movie" value="[var.base_url] /player.swf" />
<param name="allowfullscreen" value="true" />
<param name="allowscriptaccess" value="always" />
<param name="flashvars" value="file=NAMEOFYOURCHANNEL&type=livestream&livestream.devkey=HEREYOURDEVKEY&logo=[var.base_url] /image_s/playerlogo.png&skin=[var.base_url] /silverywhite.swf&autostart=true " />
</object>
PS:Change the name of the skin to fit your needs.
Now we need to create a link from the top menu to that Live Stream page .
Open main_1.htm and look for
<div class="Menu_Container">
<!-- main menu -->
<div class="MenuButtons_main">
<ul>
<li><a href="index.php">Home[/url]</li>
Below
<li><a href="index.php">Home[/url]</li>
Add
<li><a href="index.php">Our TV[/url]</li>
I f you like Alternativly instead of using inner_play.htm you can use inner_index.htm to have the “OurTv” page look like the Index page .In inner_index.htm look for.
<!-- start of now showing -->
<div id="IndexNowShowing">
<object type="application/x-shockwave-flash" data="watchingnow.swf?x=watchingnow.php&t=Videos being watched right now..." width="550" height="115" align="top">
<param name="allowScriptAccess" value="sameDomain">
<param name="movie" value="watchingnow.swf?x=watchingnow.php&t=Videos being watched right now...">
<param name="quality" value="high">
<param name="bgcolor" value="">
</object>
</div>
<!--end of now showing -->
<div id="IndexRecentlyAdded_title" class="font4_14"> Recently Added Videos</div>
<!-- Start of Carousel -->
<div id="mycarousel" class="carousel-component">
<div class="carousel-prev"> <img id="prev-arrow" class="left-button-image"
src="carousel_files/images/left-enabled.gif" alt="Previous"/> </div>
<div class="carousel-next"> <img id="next-arrow" class="right-button-image"
src="carousel_files/images/right-enabled.gif" alt="Next Button"/> </div>
<div class="carousel-clip-region">
<ul class="carousel-list">
<li id="mycarousel-item-1"><a href="[var.base_url]/play.php?vid=[mp.indexer]"><img width="116" height="90" src="[var.base_url]/uploads/thumbs/[mp.video_id;block=li].jpg" alt="[mp.title:block=td]"/>[/url]
<!--[mp.title;block=div;ope=max:15;comm]-->
<!--[mp.date_uploaded;block=div;comm]-->
</li>
</ul>
</div>
</div>
<!-- End of Carousel -->
And replace it with
<object id="player" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" name="player" style="width: 550px; height: 345px">
<param name="movie" value="[var.base_url] /player.swf" />
<param name="allowfullscreen" value="true" />
<param name="allowscriptaccess" value="always" />
<param name="flashvars" value="file=NAMEOFYOURCHANNEL&type=livestream&livestream.devkey=HEREYOURDEVKEY&logo=[var.base_url] /image_s/playerlogo.png&skin=[var.base_url] /silverywhite.swf&autostart=true " />
</object>
Upload all those files to your site using ftp
indexlive.php in the root folder (if your phpmotion script is in the root folder)
And inner_replay.htm and main_1.htm to the templates folder.
You are done .