PDA

View Full Version : GS v4.4 remote URL support instructions


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>';

ken
10-22-2007, 04:08 PM
i cet one error:

Game Name: Tommy Johnson
New Movie.
Thumbnail Bytes Written: 6807Bad query: Unknown column 'mCategory1' in 'field list'


this is the only line i get. always Thumbnail Bytes Written: 6807Bad query: Unknown column 'mCategory1' in 'field list'

blank
10-25-2007, 12:52 PM
what is your $system variable set for?

spipe
11-07-2007, 02:30 PM
Mine says this in play.side.center.tpl
<?php
echo '</div></div><div class="cntbox_cnt"><div class="space" align="center">';
$embed = 'templates/embed/embed_'.strtolower(substr($gameset->games[$id]->ext, 1)).'.tpl';
include($embed);
?>


Should it look like this

<?php
echo '</div></div><div class="cntbox_cnt"><div class="space" align="center">';
$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);}
?>
</div></

Error Message:

Game Name: Michael Anthony Smith unplugged at local dance clu

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/gamefree/public_html/onlinefreegamearcade/import.php on line 88
New Movie.
Thumbnail Bytes Written: 8111
Affected MySQL Rows: -1

I think there is an error in the code I believe it is missing an "if" statement for gs4

blank
11-13-2007, 08:53 AM
what is the link to your site?

spipe
11-13-2007, 10:29 AM
http://onlinefreegamearcade.com I would like to have the videos but I think the import.php wont work for gs4.4

blank
11-13-2007, 12:10 PM
http://www.fastfreemedia.com/import.zip use the latest import.php it looks like I forgot a gs4 variable.

spipe
11-13-2007, 04:07 PM
Thanks blank for looking into this although the script didnt add anything to the database. I believe all it did was upload the thumbs. Here is what the installer says.

Game Name: crazy school
New Movie.
Thumbnail Bytes Written: 5111
Affected MySQL Rows: -1

blank
11-13-2007, 07:16 PM
does it have a line number displayed anywhere?

spipe
11-13-2007, 07:45 PM
Umm well it doesn't give any errors just doesnt show up in data base or admin panel on the script.

this is what I did

1.) added ALTER TABLE `games` ADD `remote` TEXT NOT NULL to the database
2.)made embed_remote.tpl with this code

<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>

3.) edited play.side.center.tpl but the code i edited gives an error on the rate function you can see it here http://onlinefreegamearcade.com/play-343-Turbo-Spirit.html

4.) uploaded import.php
5.) ran import.php

The only problem I can see is information not going into the database. I get no errors just Affected MySQL Rows: -1 before you gave me the new import.php it was adding the stuff to the database just had an error. With this import.php does it add a remote address to the remote database field? Sorry if i am a burden I know alil but not alot lol.