Three phpQA Tweaks
Here are 3 tweaks for the phpquickarcade.
Compatible for version 3.0.20. If in the future they do not work with new upgrades post a comment and let me know.
- Total Games and Members on Nav Bar - Adds a counter on number of members and games to your site.
- Description on Game Page - Adds the game description underneath the game for instructional and SEO purposes.
- Random Games Bar - Adds a horizontal list of thumbnails linked to random games installed on your arcade.
Total Games and Members on Nav Bar
Open Arcade.php
————Find:———-
echo "Viewing Arcade Index</td><td class='arcade1' style='width:1px'><a href='?play=".$f[0]."'>Random Game</a>";}
echo "</td></tr></table></div>";
——–Replace With:——
echo "Viewing Arcade Index</td>
<td class='arcade1' style='width:1px'><a href='?play=".$f[0]."'>Random Game</a></td>";
}
echo "</td>";
$categ = mysql_query("SELECT gameid FROM phpqa_games");
$totalgames=mysql_num_rows($categ);
echo "<td class='arcade1'> Total Games: <b>$totalgames</b></td>";
$accquer = mysql_query("SELECT id FROM phpqa_accounts");
$membercount=mysql_num_rows($accquer);
echo "<td class='arcade1'> Total Members: <b>$membercount</b></td>
</tr></table></div>";
——-Save and Upload——
Description On Game Page
Open Arcade.php
————Find:———-
echo "You must be logged in to play the arcade games. Register an account to play - it's free <a href='Arcade.php?action=register'>Click here</a>!</td><td class='arcade1' valign='top' align='center'>";
}
?></td>
</tr>
——–After Add:——–
<tr>
<td class='arcade1' colspan='2'>
<strong>Description: </strong><?php echo $g[about];?>
</td>
</tr>
——-Save and Upload——
Random Games Bar
Open Arcade.php
————Find:———-
} // End acct based check for big table
} // End check for big table
} // end play check
?>
</td>
</tr>
——–After Add:——–
<tr>
<td colspan='3' class='arcade1' align='center'><strong>Random Games:</strong>
<?php
$randomg = run_query("SELECT gameid,game,id FROM phpqa_games ORDER BY rand() LIMIT 0,20");
while($g=mysql_fetch_array($randomg)){
echo "<a href=\"Arcade.php?play=$g[0]\"><img height='20' width='20' src='arcade/pics/$g[0].gif' alt='$g[1]' title='$g[1]' border='0' /></a> ";
}
?>
</td>
</tr>
You can change the number of random games shown by adjusting LIMIT 0,20
If support is needed for these feel free to post a comment here.


I just wanted to share…
I added to the Randum Games Bar and changed it to a Scrolling onto the screen from the right to the left - I set the limit up to 50 games and doubled the size of the images for better recognition of the games as they scroll by…
<?php
$randomg = run_query(”SELECT gameid,game,id FROM phpqa_games ORDER BY rand() LIMIT 0,50″);
while($g=mysql_fetch_array($randomg)){
echo “ ”;
}
?>