Free Arcade Script
FAS Customization => Addons/Modifications => V3.x => : am-fs March 19, 2015, 11:05:26 PM
-
This Add On will add Featured Games to your sidebar. Show your favorite or sponsored games!
(http://freearcadescript.net/images/featured-block.jpg)
Download zip and replace 2 files in pages/admin
log on to your cpanel, in phpmyadmin and run query
ALTER TABLE `fas_games` ADD `featured` tinyint(1) NOT NULL default '0' AFTER `belowgames`
Monster template edit template.php
Add:
include("templates/$template/blocks/featured.php");
Tiles Template edit includes/blocks.php
Add:
include("templates/$template/blocks/featured.php");
Copy and Paste featured code in a new file named ( featured.php ) for your template.
Monster:
<?php
echo'<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:
<?php
echo'<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.
-
Add Featured Games to Home Page on Monster Template
(http://freearcadescript.net/images/featured-monster.jpg)
templates/monster/base_home.php
Find:
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;
Add Below:
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>';
templates/monster/styles.css
Find:
body{
font-family: Tahoma !important;
font-size: 12px !important;
padding: 0px;
margin: 0px;
color:#ffffff;
background:#0c0d0f;
}
Add Below:
#featured_holder {
float: left;
position: relative;
color: #FFF;
width: 90px;
height: 90px;
margin-left: 10px;
border: 2px ridge #FFF;
}
If your using the css switer mod, do this to all 4 styles.css
-
This Add On will add Featured Games to your sidebar. Show your favorite or sponsored games!
(http://freearcadescript.net/images/featured-block.jpg)
Download zip and replace 2 files in pages/admin
log on to your cpanel, in phpmyadmin and run query
ALTER TABLE `fas_games` ADD `featured` tinyint(1) NOT NULL default '0' AFTER `belowgames`
Monster template edit template.php
Add:
include("templates/$template/blocks/featured.php");
Tiles Template edit includes/blocks.php
Add:
include("templates/$template/blocks/featured.php");
Copy and Paste featured code in a new file named ( featured.php ) for your template.
Monster:
<?php
echo'<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:
<?php
echo'<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 followed your instructions
i don't see a link to featured games on admin panel.
Now login your arcade => admin => Manage Games => Selected games for your featured games.
-
did you download the zip file for the admin pages?
you also have to edit the game and then select => Yes for featured
-
works now thanks ;D
-
This Add On will add Featured Games to your sidebar. Show your favorite or sponsored games!
(http://freearcadescript.net/images/featured-block.jpg)
Download zip and replace 2 files in pages/admin
log on to your cpanel, in phpmyadmin and run query
ALTER TABLE `fas_games` ADD `featured` tinyint(1) NOT NULL default '0' AFTER `belowgames`
Monster template edit template.php
Add:
include("templates/$template/blocks/featured.php");
Tiles Template edit includes/blocks.php
Add:
include("templates/$template/blocks/featured.php");
Copy and Paste featured code in a new file named ( featured.php ) for your template.
Monster:
<?php
echo'<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:
<?php
echo'<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)
-
I don't see the Tiles Template edit includes/blocks.php ( in Tiles Template no have "includes" folder)
the includes folder is in the root of your directory