ALTER TABLE `fas_games` ADD `featured` tinyint(1) NOT NULL default '0' AFTER `belowgames`
include("templates/$template/blocks/featured.php");
<?phpecho'<div class="header"> Featured Games </div> <div class="content">'; $sqltitle='featuredgames' ; $featured2 = "SELECT * FROM fas_games WHERE active='1' AND featured='1' ORDER BY RAND () LIMIT 5"; $featured1 = sqlcache($sqltitle, $cachelife, $featured2); if(isset($featured1)){ foreach($featured1 as $row1 ){ $gamename = preg_replace('#\W#', '-', $row1['name']); if($row1['type'] == 1){ $img = "<img src='".$domain."/".$thumbsfolder."/".$row1["thumb"]."' alt='".$gamename."' title='".$gamename."' class='minithumb' />"; }else{ $img = "<img src='".$row1["thumburl"]."' alt='".$gamename."' title='".$gamename."' class='minithumb' />"; } echo '<ul class=\'catmenu\'> <li>'; if ($seo_on == 1){ echo "<a href='".$domain."/play/".$row1["ID"]."-".$gamename.".html'>".$img.titlelimit($row1["name"])."</a>"; }else{ echo "<a href='".$domain."/index.php?action=play&ID=" .$row1["ID"]. "'>".$img.titlelimit($row1["name"])."</a>"; } echo '</li> </ul>'; } }else{ echo'<div align="center">No games have been selected!</div>'; } echo'</div>';?>
<?phpecho'<div class="side_nav">Featured Games</div> <div id="side_holder">'; $sqltitle='featuredgames' ; $featured2 = "SELECT * FROM fas_games WHERE active='1' AND featured='1' ORDER BY RAND () LIMIT 5"; $featured1 = sqlcache($sqltitle, $cachelife, $featured2); if(isset($featured1)){ foreach($featured1 as $row1 ){ $gamename = preg_replace('#\W#', '-', $row1['name']); if($row1['type'] == 1){ $img = "<img src='".$domain."/".$thumbsfolder."/".$row1["thumb"]."' alt='".$gamename."' title='".$gamename."' class='minithumb' />"; }else{ $img = "<img src='".$row1["thumburl"]."' alt='".$gamename."' title='".$gamename."' class='minithumb' />"; } echo '<ul class=\'catmenu\'> <li>'; if ($seo_on == 1){ echo "<a href='".$domain."/play/".$row1["ID"]."-".$gamename.".html'>".$img.titlelimit($row1["name"])."</a>"; }else{ echo "<a href='".$domain."/index.php?action=play&ID=" .$row1["ID"]. "'>".$img.titlelimit($row1["name"])."</a>"; } echo '</li> </ul>'; } }else{ echo'<div align="center">No games have been selected!</div>'; }echo'</div>';?>
function writebody() {global $db, $domain, $sitename, $domain, $cachelife, $template, $gamesfolder, $thumbsfolder, $limitboxgames, $seo_on, $blogentriesshown, $enabledcode_on, $comments_on, $directorypath, $autoapprovecomments, $gamesonpage, $abovegames, $belowgames, $showwebsitelimit, $supportemail, $showblog, $blogentriesshown, $blogcharactersshown, $blogcommentpermissions, $blogcommentsshown, $blogfollowtags, $blogcharactersrss, $usrdata, $userid;
echo '<div class="header2" align="left">Featured Games</div> <div class="content2">'; $sqltitle='featuredhome' ; $featured2 = "SELECT * FROM fas_games WHERE active='1' AND featured='1' ORDER BY RAND () LIMIT 9"; $featured1 = sqlcache($sqltitle, $cachelife, $featured2); if(isset($featured1)){ foreach($featured1 as $row1 ){ $gamename = preg_replace('#\W#', '-', $row1['name']); if($seo_on == 1){ $playlink = '/play/'.$row1['ID'].'-'.$gamename.'.html'; }else{ $playlink = '/index.php?action=play&ID='.$row1['ID'].''; } if($row1['type'] == 1){ echo '<div id="featured_holder"><a href=\''.$playlink.'\'><img src=\'/'.$thumbsfolder.'/'.$row1['thumb'].'\' width=\'90\' height=\'90\' alt= \''.$row1['name'].'\' title= \''.$row1['name'].'\' border=\'0\'/></a></div>'; }else{ echo '<div id="featured_holder"><a href=\''.$playlink.'\'><img src=\''.$row1['thumburl'].'\' width=\'90\' height=\'90\' alt= \''.$row1['name'].'\' title= \''.$row1['name'].'\' border=\'0\'/></a></div>'; } } }else{ echo'<div align="center">No Featured Games have been selected!</div>'; } echo'</div>';
body{ font-family: Tahoma !important; font-size: 12px !important; padding: 0px; margin: 0px; color:#ffffff; background:#0c0d0f;}
#featured_holder { float: left; position: relative; color: #FFF; width: 90px; height: 90px; margin-left: 10px; border: 2px ridge #FFF;}
This Add On will add Featured Games to your sidebar. Show your favorite or sponsored games!Download zip and replace 2 files in pages/adminlog on to your cpanel, in phpmyadmin and run queryCode: [Select]ALTER TABLE `fas_games` ADD `featured` tinyint(1) NOT NULL default '0' AFTER `belowgames`Monster template edit template.phpAdd:Code: [Select] include("templates/$template/blocks/featured.php");Tiles Template edit includes/blocks.phpAdd:Code: [Select]include("templates/$template/blocks/featured.php");Copy and Paste featured code in a new file named ( featured.php ) for your template.Monster:Code: [Select]<?phpecho'<div class="header"> Featured Games </div> <div class="content">'; $sqltitle='featuredgames' ; $featured2 = "SELECT * FROM fas_games WHERE active='1' AND featured='1' ORDER BY RAND () LIMIT 5"; $featured1 = sqlcache($sqltitle, $cachelife, $featured2); if(isset($featured1)){ foreach($featured1 as $row1 ){ $gamename = preg_replace('#\W#', '-', $row1['name']); if($row1['type'] == 1){ $img = "<img src='".$domain."/".$thumbsfolder."/".$row1["thumb"]."' alt='".$gamename."' title='".$gamename."' class='minithumb' />"; }else{ $img = "<img src='".$row1["thumburl"]."' alt='".$gamename."' title='".$gamename."' class='minithumb' />"; } echo '<ul class=\'catmenu\'> <li>'; if ($seo_on == 1){ echo "<a href='".$domain."/play/".$row1["ID"]."-".$gamename.".html'>".$img.titlelimit($row1["name"])."</a>"; }else{ echo "<a href='".$domain."/index.php?action=play&ID=" .$row1["ID"]. "'>".$img.titlelimit($row1["name"])."</a>"; } echo '</li> </ul>'; } }else{ echo'<div align="center">No games have been selected!</div>'; } echo'</div>';?>Tiles:Code: [Select]<?phpecho'<div class="side_nav">Featured Games</div> <div id="side_holder">'; $sqltitle='featuredgames' ; $featured2 = "SELECT * FROM fas_games WHERE active='1' AND featured='1' ORDER BY RAND () LIMIT 5"; $featured1 = sqlcache($sqltitle, $cachelife, $featured2); if(isset($featured1)){ foreach($featured1 as $row1 ){ $gamename = preg_replace('#\W#', '-', $row1['name']); if($row1['type'] == 1){ $img = "<img src='".$domain."/".$thumbsfolder."/".$row1["thumb"]."' alt='".$gamename."' title='".$gamename."' class='minithumb' />"; }else{ $img = "<img src='".$row1["thumburl"]."' alt='".$gamename."' title='".$gamename."' class='minithumb' />"; } echo '<ul class=\'catmenu\'> <li>'; if ($seo_on == 1){ echo "<a href='".$domain."/play/".$row1["ID"]."-".$gamename.".html'>".$img.titlelimit($row1["name"])."</a>"; }else{ echo "<a href='".$domain."/index.php?action=play&ID=" .$row1["ID"]. "'>".$img.titlelimit($row1["name"])."</a>"; } echo '</li> </ul>'; } }else{ echo'<div align="center">No games have been selected!</div>'; }echo'</div>';?>Now login your arcade => admin => Manage Games => Selected games for your featured games.
I don't see the Tiles Template edit includes/blocks.php ( in Tiles Template no have "includes" folder)