Free Arcade Script
FAS Help => V1.x => : ingrid October 22, 2009, 01:05:00 PM
-
I have a problem with "add tot favorites". Ik can add only one favorite. When I want tot add a second favorite, I get the message that the favorite has been put in my favorites, but it is not placed in my favorites.
How can I solve this problem.
-
Mmmmmm I see what you mean. There is a basic flaw in the process of how the script determins what to display when bringing up a list of favorites. I will see if I can work the flaw out and post in a bit later.
-
I'm pretty much stuck not being able to test it right now, but I have edited the code to /pages/myaccount/php to something that I think should work.
Save a copy of the unedited file first, in case this does not work. Open it up and find the function favorites() and replace that code with this
function favorites(){
global $domain, $db, $usrdata, $thumbsfolder, $gamesfolder, $seo_on;
echo '<h2>My Favorites</h2>';
$ro = $db->fetch_row($db->query(sprintf('SELECT * FROM dd_user_favorites WHERE userid=\''.$usrdata['userid'].'\'')));
echo '<table width=\'100%\' border=\'0\'>';
while($in = $db->fetch_row($ro)){
$r = $db->query(sprintf('SELECT * FROM dd_games WHERE ID=\'%u\'', $in['gameid']));
$gamename = ereg_replace('[^A-Za-z0-9]', '', $r['name']);
if($seo_on == 1){
$playlink = ''.$domain.'/play/'.$r['ID'].'-'.$gamename.'.html';
}else{
$playlink = ''.$domain.'/index.php?action=play&ID='.$r['ID'].'';
}
echo '
<tr>
<td valign=\'top\' colspan=\'2\' class=\'header\'><b>'.$r['name'].'</b></td>
</tr>
<tr>
<td width=\'55\' height=\'55\' valign=\'top\' class=\'content\'>
<a href=\''.$playlink.'\'>
';
if($in['type'] == 1){
echo ' <img src=\''.$domain.'/'.$thumbsfolder.'/'.$r['thumb'].'\' width=\'55\' width=\'55\' border=\'0\'>';
}else{
echo ' <img src=\''.$r['thumburl'].'\' width=\'55\' width=\'55\' border=\'0\'>';
}
echo ' </a>
</td>
<td valign=\'top\' class=\'content\'>'.browsedesclimit($r['description']).'
<a href=\''.$playlink.'\' class=\'playlink\'><b>Play</b></a></td>
</tr>';
}
echo '</table>';
echo ' ';
}
Let me know how it works. If it don't, I will try getting a chance to re edit and testing it tomorrow. Sorry bout that, I need better computer equipment :p
-
Hmmmmm that one didn't work. In fact, I think it crashed the server lol. Don't try it. I'll see if I can't re work it so that it does though. Sorr bout the delay.
-
Alrighty then, lets try this again shall we?
In /pages/myaccount.php replace the function favorites() with this code
function favorites(){
global $domain, $db, $usrdata, $thumbsfolder, $gamesfolder, $seo_on;
echo '<h2>My Favorites</h2>';
$ro = $db->query(sprintf('SELECT * FROM dd_user_favorites WHERE userid=\''.$usrdata['userid'].'\''));
echo '<table width=\'100%\' border=\'0\'>';
while($r = $db->fetch_row($ro)){
$in1 = $db->query(sprintf('SELECT * FROM dd_games WHERE ID=\'%u\'', $r['gameid']));
$in = $db->fetch_row($in1);
$gamename = ereg_replace('[^A-Za-z0-9]', '', $in['name']);
if($seo_on == 1){
$playlink = ''.$domain.'/play/'.$in['ID'].'-'.$gamename.'.html';
}else{
$playlink = ''.$domain.'/index.php?action=play&ID='.$in['ID'].'';
}
echo '
<tr>
<td valign=\'top\' colspan=\'2\' class=\'header\'><b>'.$in['name'].'</b></td>
</tr>
<tr>
<td width=\'55\' height=\'55\' valign=\'top\' class=\'content\'>
<a href=\''.$playlink.'\'>
';
if($in['type'] == 1){
echo ' <img src=\''.$domain.'/'.$thumbsfolder.'/'.$in['thumb'].'\' width=\'55\' width=\'55\' border=\'0\'>';
}else{
echo ' <img src=\''.$in['thumburl'].'\' width=\'55\' width=\'55\' border=\'0\'>';
}
echo ' </a>
</td>
<td valign=\'top\' class=\'content\'>'.browsedesclimit($in['description']).'
<a href=\''.$playlink.'\' class=\'playlink\'><b>Play</b></a></td>
</tr>';
}
echo '</table>';
echo ' ';
}
Let me know how that works and if it is more to your liking. Sorry, could not play with it too long right now, swamped. I did test it a little though.
Sorry too so long.