Free Arcade Script
FAS Customization => Addons/Modifications => V3.x => : am-fs April 03, 2015, 10:22:55 PM
-
Add a drop down list of all games to your sidebar.
(http://freearcadescript.net/images/monster-allgameslist.jpg)
Monster:
Copy and paste code to file allgameslist.php
Upload to templates/monster/blocks/
<?php
echo'<div class="content">
<select name="dropdownlist" onchange="location.href = this.value;">
<option value="">Select a game...</option>';
$gamelist = $db->query('SELECT * FROM fas_games WHERE active=\'1\' order by `name` ASC');
while($row = $db->Fetch_row($gamelist)){
$gamename = preg_replace('#\W#', '-', $row['name']);
if ($seo_on == 1){
echo "<option value='".$domain."/play/".$row["ID"]."-".$gamename.".html'>".titlelimit($row["name"])."</option>";
}else{
echo "<option value='".$domain."/index.php?action=play&ID=".$row["ID"]."'>".titlelimit($row["name"])."</option>";
}
};
echo'</select>
</div>';
?>
Add to templates/monster/template.php
include("templates/$template/blocks/allgameslist.php");
Tiles:
Copy and paste code to file allgameslist.php
Upload to templates/tiles/blocks/
<?php
echo'<div id="side_holder">
<div align="center">
<select name="dropdownlist" onchange="location.href = this.value;">
<option value="">Select a game...</option>';
$gamelist = $db->query('SELECT * FROM fas_games WHERE active=\'1\' order by `name` ASC');
while($row = $db->Fetch_row($gamelist)){
$gamename = preg_replace('#\W#', '-', $row['name']);
if ($seo_on == 1){
echo "<option value='".$domain."/play/".$row["ID"]."-".$gamename.".html'>".titlelimit($row["name"])."</option>";
}else{
echo "<option value='".$domain."/index.php?action=play&ID=".$row["ID"]."'>".titlelimit($row["name"])."</option>";
}
};
echo'</select>
</div>
</div>';
?>
Add to includes/blocks.php
include("templates/$template/blocks/allgameslist.php");