blank
10-07-2007, 10:49 PM
Obviously the query for the remote address isn't the "proper" way to do it but the game data caching in 4.x is pretty retarded and I just don't want to deal with it. Also later I might edit the admin edit game/movie tool to use remote URL's but for what is needed to use the FREE Movie feed on FFM that's all thats NEEDED so I don't feel like doing more right now. I have too many things to do right now and this SHOULD have been a feature in the initial 4.x release. It's pretty sad that it was never included.
Run this MySQL query:
ALTER TABLE `games` ADD `remote` TEXT NOT NULL ;
create templates/embed/embed_remote.tpl
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="500" height="400">
<param name="movie" value="<?php echo $remote?>">
<param name="quality" value="high"><embed src="<?php echo $remote?>" width=500 height=400 align="center" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed>
</object>
open templates/play.side.center.tpl
find:
echo '<div align="center">';
$embed = 'templates/embed/embed_'.substr($gameset->games[$id]->ext, 1).'.tpl';
include($embed);
echo '</div>';
change to:
echo '<div align="center">';
//determine if remote
$result2 = dbQuery("SELECT remote FROM games WHERE gId = $id");
list ($remote) = mysql_fetch_row($result2);
$embed = 'templates/embed/embed_'.substr($gameset->games[$id]->ext, 1).'.tpl';
$remotecount = strlen($remote);
if ($remotecount >= 4 ) { include('templates/embed/embed_remote.tpl'); } else{
include($embed);}
echo '</div>';
Run this MySQL query:
ALTER TABLE `games` ADD `remote` TEXT NOT NULL ;
create templates/embed/embed_remote.tpl
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="500" height="400">
<param name="movie" value="<?php echo $remote?>">
<param name="quality" value="high"><embed src="<?php echo $remote?>" width=500 height=400 align="center" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed>
</object>
open templates/play.side.center.tpl
find:
echo '<div align="center">';
$embed = 'templates/embed/embed_'.substr($gameset->games[$id]->ext, 1).'.tpl';
include($embed);
echo '</div>';
change to:
echo '<div align="center">';
//determine if remote
$result2 = dbQuery("SELECT remote FROM games WHERE gId = $id");
list ($remote) = mysql_fetch_row($result2);
$embed = 'templates/embed/embed_'.substr($gameset->games[$id]->ext, 1).'.tpl';
$remotecount = strlen($remote);
if ($remotecount >= 4 ) { include('templates/embed/embed_remote.tpl'); } else{
include($embed);}
echo '</div>';