*

Recent

Author Topic: Advertisement In the Background?  (Read 22571 times)

Adam LaCombe

  • Sr. Member
  • ****
  • Posts: 433
  • Force: +17/-0
    • My Blog
Re: Advertisement In the Background?
« Reply #30 on: December 11, 2011, 05:43:16 PM »
its because of the positioning.
The only other way I can think of doing this would be..
use a css template rather than a table and then do the same thing as before, just this time make it the ad boxes fixed.

When I have more time I will see what I can do.. I'll set up a template and fiddle with it.
If anyone else is willing to do the same that would be great, I don't have tons of time so is someone can get this done faster than me, go for it.

Azedbutt

  • Newbie
  • *
  • Posts: 38
  • Force: +0/-0
    • Loose Game
Re: Advertisement In the Background?
« Reply #31 on: January 18, 2012, 10:22:26 AM »
Anyone there who could do it?

kurt

  • Developer
  • Hero Member
  • ******
  • Posts: 634
  • Force: +16/-1
Re: Advertisement In the Background?
« Reply #32 on: January 18, 2012, 12:47:47 PM »
Hate to say it, but I'm not going to be able to even look at it right now. Sorry. Got a sick kid waiting for a call back from the doctor. And that's on top of everything else that normally goes on here. If nobody responds, might want to try a freelanceer type site.

Azedbutt

  • Newbie
  • *
  • Posts: 38
  • Force: +0/-0
    • Loose Game
Re: Advertisement In the Background?
« Reply #33 on: January 28, 2012, 06:31:21 AM »
Hate to say it, but I'm not going to be able to even look at it right now. Sorry. Got a sick kid waiting for a call back from the doctor. And that's on top of everything else that normally goes on here. If nobody responds, might want to try a freelanceer type site.

Don't worry, but thanks anyway. Will search someone on the freelanceer

lopa

  • Newbie
  • *
  • Posts: 20
  • Force: +1/-0
Re: Advertisement In the Background?
« Reply #34 on: January 30, 2012, 04:51:57 AM »
Anyone there who could do it?


Firstly,

This is not really that difficult, but what is needed is to create three columns under one table to keep the viewpoint focused irrespective or the resolution, and for that one needs to create three columns under one table because simply adding left and right "div mark-up" to enable the side adverts, doesn't hold the whole thing together.

And secondly, what you have added is actually in the "foreground", that's why it's overlapping the FAS script/html, and if you were to use CSS to try to put the ads in the background (Though I don't know how that would be possible with what you are trying to achieve) then the FAS script would be on top and overlap your "ads" at lower resolutions. :(

Now, without having to install FAS to test this, and assuming that you have a "test site" or XAMPP to test this with?

After <body>

Add:
<div align="center">
<table style="width:98%;" cellpadding="0" cellspacing="0">
<tr>
<td class="" valign="top" style="width:150px; text-align: center;">

Your left side panel script (ads) goes here.

</td>

<td class="" valign="top" style="width:100%;">


This is all the existing "FAS" html script and should be here.


Go to the bottom of the template and BEFORE </body>

ADD:

</td>

<td class="" valign="top" style="width:150px; text-align: center;">


Your right side panel script/ (ads) goes here.

</td>
</tr>
</table>
</div>
The </body> tag should end up HERE.





« Last Edit: January 30, 2012, 05:25:21 AM by lopa »

Azedbutt

  • Newbie
  • *
  • Posts: 38
  • Force: +0/-0
    • Loose Game
Re: Advertisement In the Background?
« Reply #35 on: February 06, 2012, 06:09:12 AM »
Thanks Lopa,

Could you tell me in which file would these codes go in? As in my Template file or in Base_Home I do not have the tags <Body>

Adam LaCombe

  • Sr. Member
  • ****
  • Posts: 433
  • Force: +17/-0
    • My Blog
Re: Advertisement In the Background?
« Reply #36 on: February 06, 2012, 12:29:39 PM »
<body> should be in template.php around line 16-ish (at least in my file).

Azedbutt

  • Newbie
  • *
  • Posts: 38
  • Force: +0/-0
    • Loose Game
Re: Advertisement In the Background?
« Reply #37 on: February 13, 2012, 06:18:14 AM »
Okay I tried putting the Code as instructed but the page template is kinda messed up with uneven sizes and after a several hours of attempts I give up  ???.

Here is the website after the codes www.testing.loosegame.com

Code at the top

Code: [Select]
<body class="Copyright">
<div align="left">
<table style="width:100%;" cellpadding="0" cellspacing="0">
<tr>
<td class="" valign="top" style="width:150px; text-align: center;">
?>
</td>
</tr>

<td class="header2">Ads</td>
</tr>


<tr>
<td class="content2">


<?php echo $ads1?>
<p>
</td>

</tr>
  </table>
</td>

<td class="" valign="top" style="width:100%;">

Code at the Bottom

Code: [Select]
</td>

<td class="" valign="top" style="width:150px; text-align: center;">

                           
</td>
</tr>

<tr>
               
                         
</td>
</tr>
<tr>
<td class="header2">Ads</td>
</tr>
<tr>
<td class="content2">
                               <?php echo $ads2?>
</td>
</tr>
                <table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
</td>
</tr>
</table>
</div>

Does anyone know where I am wrong? I still can't figure out why the other tables have been affected either.

Dillon

  • Developer
  • Sr. Member
  • ******
  • Posts: 340
  • Force: +3/-0
    • Arcade Freak
Re: Advertisement In the Background?
« Reply #38 on: February 13, 2012, 08:48:26 AM »
Try this

Code at the top

Code: [Select]
<body class="Copyright">
<div align="left">
<table style="width:100%;" cellpadding="0" cellspacing="0">
<tr>
<td class="" valign="top" style="width:150px; text-align: center;">
?>
</td>
</tr>
<tr>
<td class="header2">Ads</td>
</tr>
<tr>
<td class="content2">


<?php echo $ads1?>
<p>
</td>

</tr>
  </table>
</td>

<td class="" valign="top" style="width:100%;">

Code at the Bottom

Code: [Select]
</td>

<td class="" valign="top" style="width:150px; text-align: center;">

                           
</td>
</tr>
<tr>
<td class="header2">Ads</td>
</tr>
<tr>
<td class="content2">
                               <?php echo $ads2?>
</td>
</tr>
                <table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td>
</td>
</tr>
</table>
</div>

Though its hard to tell if itll work without the full code

Azedbutt

  • Newbie
  • *
  • Posts: 38
  • Force: +0/-0
    • Loose Game
Re: Advertisement In the Background?
« Reply #39 on: February 13, 2012, 09:38:25 AM »
It didn't work.

Here is the full code of my templates

Code: [Select]
<?php
    $starttime 
explode(' 'microtime());  
    
$starttime =  $starttime[1] + $starttime[0];  
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<title><?php echo $pagetitle?></title>
<style type="text/css">
<!--
table tr {
color: #333;
}
Links {
color: #00F;
}
-->
</style>
<link href="Link.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
}
a:hover {
text-decoration: none;
}
a:active {
text-decoration: none;
}
-->
</style>
<script src="../../SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
<link href="../../SpryAssets/SpryMenuBarVertical.css" rel="stylesheet" type="text/css" />
<head>
<meta name="keywords" content="<?php echo $metatags?>" />
<meta name="description" content="<?php echo $metadescription ?>" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<link href="<?=$domain?>/templates/<?php echo $template ?>/styles.css" rel="stylesheet" type="text/css">
<?php
include ("js/rating_update.php");

?>

</head>
<body class="Copyright">
<div align="left">
<table style="width:100%;" cellpadding="0" cellspacing="0">
<tr>
<td class="" valign="top" style="width:150px; text-align: center;">
?>
</td>
</tr>
<tr>
<td class="header2">Ads</td>
</tr>
<tr>
<td class="content2">


<?php echo $ads1?>
<p>
</td>

</tr>
 </table>
</td>

<td class="" valign="top" style="width:100%;">






<table width="900" border="0" align="center" class="maintable" cellpadding="0" cellspacing="0">
<tr>
<td colspan="3">
<img src="<?=$domain?>/templates/<?php echo $template ?>/images/banner.png" width="100%"></img>

<?php

      
if (!$headerspace == "") { echo '<br><div align="center">'.$headerspace.'</div>'; };

echo 
"<div align='right'>$show_fb_login</div><br>";


echo ' <div class=\'menutop\'>';
if($seo_on == 1){
echo ' <ul>
<li><a href=\''
.$domain.'\' title=\'Home\'>Home</a></li>
<li><a href=\''
.$domain.'/mostplayed/\' title=\'Most Played\'>Top Games</a></li>
<li><a href=\''
.$domain.'/newest/\' title=\'Newest\'>New Games</a></li>
<li><a href="'
.$domain.'/memberslist/" title="Member List">Member List</a></li>
<li><a href=\''
.$domain.'/search/\' title=\'Search\'>Search</a></li>
<li><a href=\''
.$domain.'/links/\' title=\'Links\'>Links</a></li>
<li><a href=\''
.$domain.'/fineprint/\' title=\'Fine Print\'>Fine Print</a></li>

'
;
if(!isset($suserid)){
$mymenu1 ' <li ><a href=\''.$domain.'/login/\'>Login</a></li>
<li><a href=\''
.$domain.'/forgotpassword/\'>Forgot password?</a></li>
<li ><a href=\''
.$domain.'/signup/\'>Signup</a></li>';
}else{
$mymenu1 '
<li ><a href=\''
.$domain.'/myaccount/\'>My Account</a></li>
<li ><a href=\''
.$domain.'/logout/\'>Logout</a></li>';
}
            if (
$showpages == 1) { echo '<li><a href=\''.$domain.'/pages/\' title=\'pages\'>Pages</a></li>'; };
            if (
$showblog == 1) { echo '<li><a href=\''.$domain.'/blog/\' title=\'blog\'>Blog</a></li>'; };

echo '
                  
</ul>'
;
}else{
echo ' <ul>
<li><a href=\''
.$domain.'\' title=\'Home\'>Home</a></li>
<li><a href=\''
.$domain.'/index.php?action=mostplayed\' title=\'Most Played\'>Top Games</a></li>
<li><a href=\''
.$domain.'/index.php?action=newest\' title=\'Newest\'>New Games</a></li>
<li><a href=\''
.$domain.'/Multiplayer.php\' title=\'Multiplayer\'>Multiplayer</a></li>
<li><a href="'
.$domain.'/index.php?action=memberslist" title="Member List">Member List</a></li>
<li><a href=\''
.$domain.'/index.php?action=search\' title=\'Search\'>Search</a></li>
<li><a href=\''
.$domain.'/index.php?action=signup\' title=\'Register\'>Register</a></li>

'
;
if(!isset($suserid)){
$mymenu1 ' <li ><a href=\''.$domain.'/index.php?action=login\'>Login</a></li>
<li><a href=\''
.$domain.'/index.php?action=forgotpassword\'>Forgot password?</a></li>
<li ><a href=\''
.$domain.'/index.php?action=signup\'>Signup</a></li>';
}else{
$mymenu1 '
<li ><a href=\''
.$domain.'/index.php?action=myaccount\'>My Account</a></li>
<li ><a href=\''
.$domain.'/index.php?action=logout\'>Logout</a></li>';
}
            if (
$showpages == 1) { echo '<li ><a href=\''.$domain.'/index.php?action=pages\'>Pages</a></li>'; };
            if (
$showblog == 1) { echo '<li ><a href=\''.$domain.'/index.php?action=blog\'>Blog</a></li>'; };

echo '
                  
</ul>'
;
}


echo ' </div>';

?>

      
<br />
<br />
<br />
</td>
</tr>
<tr>
<td valign="top" width="170" >
<table width="170" >




<table width="100%">
                        <?php submenu2 (); ?>
                       <td class="header2">Top 10 Games</td>
</tr>

<tr>
<td class="content2">
                   <?php
$minViews 5;
$queryt "SELECT Name, Views, ID FROM dd_games WHERE Views>$minViews ORDER BY Views DESC";
$resultt mysql_query($queryt);
if (!$resultt) {
//do something if nothing is returned from the db
echo'An error occured';
}else{
if ($seo_on == 1){
echo '<ul class=\'catmenu\'>';
for ($i=0$i<10$i++){
echo "<li><a href='".$domain."/play/".mysql_result($resultt$i"ID")."-".mysql_result($resultt$i"Name").".html'>" mysql_result($resultt$i"Name") . " - (" mysql_result($resultt$i"Views") . ")</a></li>";}
echo '</ul>';
                        echo 
'<br />';
                        echo 
'<a href=\''.$domain.'/mostplayed/\' title=\'Most Played\'>View more >>></a>';
}else{
echo '<ul class=\'catmenu\'>';
for ($i=0$i<10$i++){
echo "<li><a href='".$domain."/index.php?action=play&ID=" mysql_result($resultt$i"ID") . "'>" mysql_result($resultt$i"Name") . " - (" mysql_result($resultt$i"Views") . ")</a></li>";}
echo '</ul>';
                            echo 
'<br />';
                           
echo '<a href=\''.$domain.'/index.php?action=mostplayed\' title=\'Most Played\'>View more >>></a>';}}
?>

</td>
<tr>
                <td class="header2">New Games</td>
</tr>
<tr>
<td class="content2">                            
                   <?php
$queryl "SELECT Name, dateadded, ID FROM dd_games ORDER BY dateadded DESC";
$resultl mysql_query($queryl);
if (!$resultl) {
//do something if nothing is returned from the db
echo'An error occured';
}else{
if ($seo_on == 1){
echo '<ul class=\'catmenu\'>';
for ($i=0$i<5$i++){
echo "<li><a href='".$domain."/play/".mysql_result($resultl$i"ID")."-".mysql_result($resultl$i"Name").".html'>" mysql_result($resultl$i"Name") . "</a></li>";}
echo '</ul>';
                        echo 
'<br />';
                        echo 
'&nbsp;<a href=\''.$domain.'/newest/\' title=\'Most Played\'>View more >>></a>';
}else{
echo '<ul class=\'catmenu\'>';
for ($i=0$i<5$i++){
echo "<li><a href='".$domain."/index.php?action=play&ID=" mysql_result($resultl$i"ID") . "'>" mysql_result($resultl$i"Name") . "</a></li>";}
echo '</ul>';
                            echo 
'<br />';
                           
echo '&nbsp;<a href=\''.$domain.'/index.php?action=newest\' title=\'Newest\'>View more >>></a>';}}
                           


writebody();
?>








</td>
<td valign="top" width="170">
<table width="170">
        
        <td class="header2">My Menu</td>
</tr>

<tr>
<td class="content2">
<?php
                              
echo '<ul class=\'catmenu\'>';
                                     echo 
$mymenu1;
                         if($usrdata['user_level'] == 2){echo '<li><a href=\''.$domain.'/index.php?action=admin\'>Admin</a></li>';
   
                                       };
                                     if(
$usrdata['gamelevel'] >= 2) {echo '<li><a href=\''.$domain.'/index.php?action=gameadmin\'>Game Admin</a></li>';};
                                     if(
$usrdata['bloglevel'] >= 2) {echo '<li><a href=\''.$domain.'/index.php?action=blogadmin\'>Blog Admin</a></li>';};
                                     echo 
'<p>';


                                     
submenu1();

echo '</ul>';
?>

<td class="header2">New Members</td>
</tr>
<tr>
<td class="content2">
<?php
$tur1 'SELECT username, userid FROM dd_users WHERE userid!="1" ORDER BY userid DESC LIMIT 0,6';
$resultt mysql_query($tur1);
if (!$resultt) { echo 'Cannot connect to the databese';
}
else
{
$tur sqlcache('newmembers'$cachelife$tur1);
foreach($tur as $r){
echo '
<span style="color:'
.get_random_color().'">'.$r['username'].'</span><br />';
}}
?>

</td>
</tr>
</table>
<table width="100%">
<tr>

</tr>

  </table>
<?php
$totalgames $db->num_rows($db->query(sprintf('SELECT ID FROM dd_games WHERE active="1"')));
$totalusers $db->num_rows($db->query(sprintf('SELECT userid FROM dd_users WHERE activation_key="0"')));
$totalcats $db->num_rows($db->query(sprintf('SELECT ID FROM dd_categories')));
$totalcomments $db->num_rows($db->query(sprintf('SELECT ID FROM dd_comments')));
$time=time()-15*60;
$onlineusers $db->num_rows($db->query("SELECT userid FROM dd_users WHERE status >= $time"));
$year date('Y');
?>


<table width="100%">
<tr>
<td class="header2">Stats</td>
</tr>
<tr>
<td class="content2" style="padding:5px">
Total Games: <?php echo $totalgames?><br />
Total Users: <?php echo $totalusers?><br />
Total Categories: <?php echo $totalcats?><br />
Total Comments: <? echo $totalcomments; ?><br />
                              Total Hits: <?php include ("$directorypath/includes/counter.php"); ?><br />
Users Online: <? echo $onlineusers; ?><br />
<?php
$timeoutseconds  600; // Timeout Value in Seconds - 300 equals 5 minutes.
$timestamp=time();                       
$timeout=$timestamp-$timeoutseconds
$ip $_SERVER['REMOTE_ADDR'];
//Insert all users online
$query_add "INSERT INTO onlineuser VALUES ('$timestamp','$ip')";
$resultt mysql_query($query_add);
if (!$resultt) { echo 'Cannot connect to the database'; }

//Delete guest users after timeout - Does not affect members count
$query_time "DELETE FROM onlineuser WHERE timestamp < $timeout";
$resultt mysql_query($query_time);
if (!$resultt) { echo 'Cannot connect to the database'; }

//Count all members and guests IP's to make a grand total.
//Then subtract the number of members online from the grand total - leaving the Guests.
$query_resultt "SELECT DISTINCT ip FROM onlineuser";
$resultt mysql_query($query_resultt);
if (!$resultt) { echo 'Cannot connect to the database'; }

$totalusers = (mysql_num_rows($resultt)); 

$a="$totalusers";
$b="$onlineusers";
?>


Guests Online: <?php echo $a $b?></span><br />
                              
                              
</tr>

</td>
</tr>
                <tr>
<td class="content2" stlye="padding:5px'">
<!-- AddThis Button BEGIN --><a href="http://www.addthis.com/bookmark.php" onclick="addthis_url   = location.href; addthis_title = document.title; return addthis_click(this);" target="_blank"><img src="http://s7.addthis.com/static/btn/lg-share-en.gif" width="125" height="16" border="0" alt="Bookmark and Share" /></a><script type="text/javascript">var addthis_pub = "sssox";</script><script type="text/javascript" src="http://s7.addthis.com/js/widget.php?v=10"></script>  <!-- AddThis Button END -->
</td>
</table>

</table>    
  </tr>
<div align="center"> </table>
<ul id="Bottomlinks" class="MenuBarVertical">
  <li><a class="MenuBarItemSubmenu" href="#">LooseGame</a>
    <ul>
      <li><a href="/index.php?action=fineprint">Privacy Policy</a></li>
      <li><a href="/Pictures">Free Wallpapers</a></li>
    </ul>
  </li>
  <li><a class="MenuBarItemSubmenu" href="#">Other Links</a>
        <ul>
          <li><a href="http://www.freearcadescript.net/">Free Arcade Scripts</a></li>
          <li><a href="#">Coming Soon</a></li>
        </ul>
  </li>
</ul>
  </li>

</ul>
<p><div align="center"> <?php echo "Copyright ".$sitename." &copy; 2010-".date('Y'); ?> All Rights Reserved
 </p>
<?php echo $footerspace?>
<script type="text/javascript">
<!--
var MenuBar1 = new Spry.Widget.MenuBar("Bottomlinks", {imgRight:"../../SpryAssets/SpryMenuBarRightHover.gif"});
//-->
</script>
</body></html>
</td>

<td class="" valign="top" style="width:150px; text-align: center;">

                            
</td>
</tr>
<tr>
<td class="header2">Ads</td>
</tr>
<tr>
<td class="content2">
                               <?php echo $ads2?>
</td>
</tr>
                <table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td>
</td>
</tr>
</table>
</div>

<div style="font-size: 10px; color: #FFFFFF; text-align: center;">

<?php
    $mtime 
explode(' 'microtime());  
    
$totaltime $mtime[0] +  $mtime[1] - $starttime;  
    
printf('Page loaded in %.3f seconds.',  $totaltime); 
?>


</div>

Dillon

  • Developer
  • Sr. Member
  • ******
  • Posts: 340
  • Force: +3/-0
    • Arcade Freak
Re: Advertisement In the Background?
« Reply #40 on: February 13, 2012, 02:08:11 PM »
Try this... There are a lot of mistakes in your code and i tried to fix most of them however i could have missed some

Code: [Select]
<?php
    $starttime 
explode(' 'microtime());  
    
$starttime =  $starttime[1] + $starttime[0];  
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<title><?php echo $pagetitle?></title>
<style type="text/css">
<!--
table tr {
color: #333;
}
Links {
color: #00F;
}
-->
</style>
<link href="Link.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
}
a:hover {
text-decoration: none;
}
a:active {
text-decoration: none;
}
-->
</style>
<script src="../../SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
<link href="../../SpryAssets/SpryMenuBarVertical.css" rel="stylesheet" type="text/css" />
<head>
<meta name="keywords" content="<?php echo $metatags?>" />
<meta name="description" content="<?php echo $metadescription ?>" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<link href="<?=$domain?>/templates/<?php echo $template ?>/styles.css" rel="stylesheet" type="text/css">
<?php
include ("js/rating_update.php");

?>

</head>
<body class="Copyright">
<div align="left">
<table style="width:20%;" cellpadding="0" cellspacing="0">
<tr>
<td>
<table style="width:20%;" cellpadding="0" cellspacing="0">
<tr>
<td class="" valign="top" style="width:150px; text-align: center;"></td>
</tr>
<tr>
<td class="header2">Ads</td>
</tr>
<tr>
<td class="content2">
<?php echo $ads1?>
<p>
</td>
</tr>
</table>
</td>
<td class="" valign="top" style="width:80%;">
<table width="900" border="0" align="center" class="maintable" cellpadding="0" cellspacing="0">
<tr>
<td colspan="3">
<img src="<?=$domain?>/templates/<?php echo $template ?>/images/banner.png" width="100%"></img>

<?php

      
if (!$headerspace == "") { echo '<br><div align="center">'.$headerspace.'</div>'; };

echo 
"<div align='right'>$show_fb_login</div><br>";


echo ' <div class=\'menutop\'>';
if($seo_on == 1){
echo ' <ul>
<li><a href=\''
.$domain.'\' title=\'Home\'>Home</a></li>
<li><a href=\''
.$domain.'/mostplayed/\' title=\'Most Played\'>Top Games</a></li>
<li><a href=\''
.$domain.'/newest/\' title=\'Newest\'>New Games</a></li>
<li><a href="'
.$domain.'/memberslist/" title="Member List">Member List</a></li>
<li><a href=\''
.$domain.'/search/\' title=\'Search\'>Search</a></li>
<li><a href=\''
.$domain.'/links/\' title=\'Links\'>Links</a></li>
<li><a href=\''
.$domain.'/fineprint/\' title=\'Fine Print\'>Fine Print</a></li>

'
;
if(!isset($suserid)){
$mymenu1 ' <li ><a href=\''.$domain.'/login/\'>Login</a></li>
<li><a href=\''
.$domain.'/forgotpassword/\'>Forgot password?</a></li>
<li ><a href=\''
.$domain.'/signup/\'>Signup</a></li>';
}else{
$mymenu1 '
<li ><a href=\''
.$domain.'/myaccount/\'>My Account</a></li>
<li ><a href=\''
.$domain.'/logout/\'>Logout</a></li>';
}
            if (
$showpages == 1) { echo '<li><a href=\''.$domain.'/pages/\' title=\'pages\'>Pages</a></li>'; };
            if (
$showblog == 1) { echo '<li><a href=\''.$domain.'/blog/\' title=\'blog\'>Blog</a></li>'; };

echo '
                  
</ul>'
;
}else{
echo ' <ul>
<li><a href=\''
.$domain.'\' title=\'Home\'>Home</a></li>
<li><a href=\''
.$domain.'/index.php?action=mostplayed\' title=\'Most Played\'>Top Games</a></li>
<li><a href=\''
.$domain.'/index.php?action=newest\' title=\'Newest\'>New Games</a></li>
<li><a href=\''
.$domain.'/Multiplayer.php\' title=\'Multiplayer\'>Multiplayer</a></li>
<li><a href="'
.$domain.'/index.php?action=memberslist" title="Member List">Member List</a></li>
<li><a href=\''
.$domain.'/index.php?action=search\' title=\'Search\'>Search</a></li>
<li><a href=\''
.$domain.'/index.php?action=signup\' title=\'Register\'>Register</a></li>

'
;
if(!isset($suserid)){
$mymenu1 ' <li ><a href=\''.$domain.'/index.php?action=login\'>Login</a></li>
<li><a href=\''
.$domain.'/index.php?action=forgotpassword\'>Forgot password?</a></li>
<li ><a href=\''
.$domain.'/index.php?action=signup\'>Signup</a></li>';
}else{
$mymenu1 '
<li ><a href=\''
.$domain.'/index.php?action=myaccount\'>My Account</a></li>
<li ><a href=\''
.$domain.'/index.php?action=logout\'>Logout</a></li>';
}
            if (
$showpages == 1) { echo '<li ><a href=\''.$domain.'/index.php?action=pages\'>Pages</a></li>'; };
            if (
$showblog == 1) { echo '<li ><a href=\''.$domain.'/index.php?action=blog\'>Blog</a></li>'; };

echo '
                  
</ul>'
;
}


echo ' </div>';

?>

       
<br />
<br />
<br />
</td>
</tr>
<tr>
<td valign="top" width="170" >
<table width="170" >




<table width="100%">
                        <?php submenu2 (); ?>
                       <td class="header2">Top 10 Games</td>
</tr>

<tr>
<td class="content2">
                   <?php
$minViews 5;
$queryt "SELECT Name, Views, ID FROM dd_games WHERE Views>$minViews ORDER BY Views DESC";
$resultt mysql_query($queryt);
if (!$resultt) {
//do something if nothing is returned from the db
echo'An error occured';
}else{
if ($seo_on == 1){
echo '<ul class=\'catmenu\'>';
for ($i=0$i<10$i++){
echo "<li><a href='".$domain."/play/".mysql_result($resultt$i"ID")."-".mysql_result($resultt$i"Name").".html'>" mysql_result($resultt$i"Name") . " - (" mysql_result($resultt$i"Views") . ")</a></li>";}
echo '</ul>';
                        echo 
'<br />';
                        echo 
'<a href=\''.$domain.'/mostplayed/\' title=\'Most Played\'>View more >>></a>';
}else{
echo '<ul class=\'catmenu\'>';
for ($i=0$i<10$i++){
echo "<li><a href='".$domain."/index.php?action=play&ID=" mysql_result($resultt$i"ID") . "'>" mysql_result($resultt$i"Name") . " - (" mysql_result($resultt$i"Views") . ")</a></li>";}
echo '</ul>';
                            echo 
'<br />';
                           
echo '<a href=\''.$domain.'/index.php?action=mostplayed\' title=\'Most Played\'>View more >>></a>';}}
?>

</td>
<tr>
                <td class="header2">New Games</td>
</tr>
<tr>
<td class="content2">                           
                   <?php
$queryl "SELECT Name, dateadded, ID FROM dd_games ORDER BY dateadded DESC";
$resultl mysql_query($queryl);
if (!$resultl) {
//do something if nothing is returned from the db
echo'An error occured';
}else{
if ($seo_on == 1){
echo '<ul class=\'catmenu\'>';
for ($i=0$i<5$i++){
echo "<li><a href='".$domain."/play/".mysql_result($resultl$i"ID")."-".mysql_result($resultl$i"Name").".html'>" mysql_result($resultl$i"Name") . "</a></li>";}
echo '</ul>';
                        echo 
'<br />';
                        echo 
'&nbsp;<a href=\''.$domain.'/newest/\' title=\'Most Played\'>View more >>></a>';
}else{
echo '<ul class=\'catmenu\'>';
for ($i=0$i<5$i++){
echo "<li><a href='".$domain."/index.php?action=play&ID=" mysql_result($resultl$i"ID") . "'>" mysql_result($resultl$i"Name") . "</a></li>";}
echo '</ul>';
                            echo 
'<br />';
                           
echo '&nbsp;<a href=\''.$domain.'/index.php?action=newest\' title=\'Newest\'>View more >>></a>';}}
                           


writebody();
?>








</td>
<td valign="top" width="170">
<table width="170">
       
        <td class="header2">My Menu</td>
</tr>

<tr>
<td class="content2">
<?php
                              
echo '<ul class=\'catmenu\'>';
                                     echo 
$mymenu1;
                         if($usrdata['user_level'] == 2){echo '<li><a href=\''.$domain.'/index.php?action=admin\'>Admin</a></li>';
   
                                       };
                                     if(
$usrdata['gamelevel'] >= 2) {echo '<li><a href=\''.$domain.'/index.php?action=gameadmin\'>Game Admin</a></li>';};
                                     if(
$usrdata['bloglevel'] >= 2) {echo '<li><a href=\''.$domain.'/index.php?action=blogadmin\'>Blog Admin</a></li>';};
                                     echo 
'<p>';


                                     
submenu1();

echo '</ul>';
?>

<td class="header2">New Members</td>
</tr>
<tr>
<td class="content2">
<?php
$tur1 'SELECT username, userid FROM dd_users WHERE userid!="1" ORDER BY userid DESC LIMIT 0,6';
$resultt mysql_query($tur1);
if (!$resultt) { echo 'Cannot connect to the databese';
}
else
{
$tur sqlcache('newmembers'$cachelife$tur1);
foreach($tur as $r){
echo '
<span style="color:'
.get_random_color().'">'.$r['username'].'</span><br />';
}}
?>

</td>
</tr>
</table>
<table width="100%">
<tr>

</tr>

  </table>
<?php
$totalgames $db->num_rows($db->query(sprintf('SELECT ID FROM dd_games WHERE active="1"')));
$totalusers $db->num_rows($db->query(sprintf('SELECT userid FROM dd_users WHERE activation_key="0"')));
$totalcats $db->num_rows($db->query(sprintf('SELECT ID FROM dd_categories')));
$totalcomments $db->num_rows($db->query(sprintf('SELECT ID FROM dd_comments')));
$time=time()-15*60;
$onlineusers $db->num_rows($db->query("SELECT userid FROM dd_users WHERE status >= $time"));
$year date('Y');
?>


<table width="100%">
<tr>
<td class="header2">Stats</td>
</tr>
<tr>
<td class="content2" style="padding:5px">
Total Games: <?php echo $totalgames?><br />
Total Users: <?php echo $totalusers?><br />
Total Categories: <?php echo $totalcats?><br />
Total Comments: <? echo $totalcomments; ?><br />
                              Total Hits: <?php include ("$directorypath/includes/counter.php"); ?><br />
Users Online: <? echo $onlineusers; ?><br />
<?php
$timeoutseconds  600; // Timeout Value in Seconds - 300 equals 5 minutes.
$timestamp=time();                       
$timeout=$timestamp-$timeoutseconds
$ip $_SERVER['REMOTE_ADDR'];
//Insert all users online
$query_add "INSERT INTO onlineuser VALUES ('$timestamp','$ip')";
$resultt mysql_query($query_add);
if (!$resultt) { echo 'Cannot connect to the database'; }

//Delete guest users after timeout - Does not affect members count
$query_time "DELETE FROM onlineuser WHERE timestamp < $timeout";
$resultt mysql_query($query_time);
if (!$resultt) { echo 'Cannot connect to the database'; }

//Count all members and guests IP's to make a grand total.
//Then subtract the number of members online from the grand total - leaving the Guests.
$query_resultt "SELECT DISTINCT ip FROM onlineuser";
$resultt mysql_query($query_resultt);
if (!$resultt) { echo 'Cannot connect to the database'; }

$totalusers = (mysql_num_rows($resultt)); 

$a="$totalusers";
$b="$onlineusers";
?>


Guests Online: <?php echo $a $b?></span><br />
                             
                             
</tr>

</td>
</tr>
                <tr>
<td class="content2" stlye="padding:5px'">
<!-- AddThis Button BEGIN --><a href="http://www.addthis.com/bookmark.php" onclick="addthis_url   = location.href; addthis_title = document.title; return addthis_click(this);" target="_blank"><img src="http://s7.addthis.com/static/btn/lg-share-en.gif" width="125" height="16" border="0" alt="Bookmark and Share" /></a><script type="text/javascript">var addthis_pub = "sssox";</script><script type="text/javascript" src="http://s7.addthis.com/js/widget.php?v=10"></script>  <!-- AddThis Button END -->
</td>
</table>

</table>
</td>
<td class="" valign="top" style="width:150px; text-align: center;">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="header2">Ads</td>
</tr>
<tr>
<td class="content2">
<?php echo $ads2?>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>   
  </tr>
<div align="center"> </table>
<ul id="Bottomlinks" class="MenuBarVertical">
  <li><a class="MenuBarItemSubmenu" href="#">LooseGame</a>
    <ul>
      <li><a href="/index.php?action=fineprint">Privacy Policy</a></li>
      <li><a href="/Pictures">Free Wallpapers</a></li>
    </ul>
  </li>
  <li><a class="MenuBarItemSubmenu" href="#">Other Links</a>
        <ul>
          <li><a href="http://www.freearcadescript.net/">Free Arcade Scripts</a></li>
          <li><a href="#">Coming Soon</a></li>
        </ul>
  </li>
</ul>
  </li>

</ul>
<p><div align="center"> <?php echo "Copyright ".$sitename." &copy; 2010-".date('Y'); ?> All Rights Reserved
 </p>
<?php echo $footerspace?>
<script type="text/javascript">
<!--
var MenuBar1 = new Spry.Widget.MenuBar("Bottomlinks", {imgRight:"../../SpryAssets/SpryMenuBarRightHover.gif"});
//-->
</script>
<div style="font-size: 10px; color: #FFFFFF; text-align: center;">

<?php
    $mtime 
explode(' 'microtime());  
    
$totaltime $mtime[0] +  $mtime[1] - $starttime;  
    
printf('Page loaded in %.3f seconds.',  $totaltime); 
?>


</div>
</body></html>

Azedbutt

  • Newbie
  • *
  • Posts: 38
  • Force: +0/-0
    • Loose Game
Re: Advertisement In the Background?
« Reply #41 on: February 13, 2012, 03:31:50 PM »
Thanks for correcting the mistakes. I copied and pasted that code and there still seems to be problems with the structure www.testing.loosegame.com

The add are still not fixed in the background  :(

Dillon

  • Developer
  • Sr. Member
  • ******
  • Posts: 340
  • Force: +3/-0
    • Arcade Freak
Re: Advertisement In the Background?
« Reply #42 on: February 13, 2012, 04:22:15 PM »
I really dont know the original code is really messy and hard to understand.

lopa

  • Newbie
  • *
  • Posts: 20
  • Force: +1/-0
Re: Advertisement In the Background?
« Reply #43 on: February 13, 2012, 05:54:32 PM »
This is a modified copy of the "Original default" template.php that I can only suggest you use until you get it right - before adding anything of your own. Then you should find out where you are breaking everything.

 <!DOCTYPE Must be the first line.

You will have to play with ALL of these numbers to pull the three columns together under one table because FAS is fixed-width and not fluid width.

This is the assumed overall width:

<table style="width:1100;" cellpadding="0" cellspacing="0">


This,
<table width="900" border="0" align="center" class="maintable" cellpadding="0" cellspacing="0">
And this,
<td class="" valign="top" style="width:150px; text-align: center;">
And this,
<td class="" valign="top" style="width:150px; text-align: center;">

Need to add up to somewhere near the overall-width.


Code: [Select]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-gb" xml:lang="en-gb">
<?php
    $starttime 
explode(' 'microtime());  
    
$starttime =  $starttime[1] + $starttime[0];  
?>

<head> <!-- DO NOT ADD ANYTHING ABOVE THIS UNLESS IT'S PHP -->

<title><?php echo $pagetitle?></title>

<meta name="keywords" content="<?php echo $metatags?>" />
<meta name="description" content="<?php echo $metadescription ?>" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<link href="<?php echo $domain;?>/templates/<?php echo $template ?>/styles.css" rel="stylesheet" type="text/css" />
<?php
include ("js/rating_update.php");
?>

</head>
<!-- DO NOT ADD ANYTHING HERE -->
<body><!-- CANNOT BE SOME OTHER CLASS - YOU HAVE "body" IN THE .CSS IF YOU WANT TO CHANGE SOMETHING HERE -->

<div align="center">

<table style="width:1100px;" cellpadding="0" cellspacing="0">
<tr>
<td class="" valign="top" style="width:150px; text-align: center;">

<!-- THIS IS THE LEFT PANEL SCRIPT -->

<img src="http://www.arcadebannerclicks.com/userbanners/175-1-2-1324852107.png" />

</td>
<td class="" valign="top" style="width:100%;">


<!-- Start the original FAS mark-up -->

<table width="900" border="0" align="center" class="maintable" cellpadding="0" cellspacing="0">
<tr>
<td colspan="3">
<img src="<?php echo $domain;?>/templates/<?php echo $template ?>/images/banner.png" width="100%"></img>

<?php

      
if (!$headerspace == "") { echo '<br /><div align="center">'.$headerspace.'</div><br />'; };


echo ' <div class=\'menutop\'>';
if($seo_on == 1){
echo ' <ul>
<li><a href=\''
.$domain.'\' title=\'Home\'>Home</a></li>
<li><a href=\''
.$domain.'/mostplayed/\' title=\'Most Played\'>Most Played</a></li>
<li><a href=\''
.$domain.'/newest/\' title=\'Newest\'>Newest</a></li><li><a href="'.$domain.'/memberslist/" title="Member List">Member List</a></li>
<li><a href=\''
.$domain.'/search/\' title=\'Search\'>Search</a></li>
<li><a href=\''
.$domain.'/links/\' title=\'Links\'>Links</a></li>
<li><a href=\''
.$domain.'/fineprint/\' title=\'Fine Print\'>Fine Print</a></li>

'
;
if(!isset($suserid)){
$mymenu1 ' <li ><a href=\''.$domain.'/login/\'>Login</a></li>
<li><a href=\''
.$domain.'/forgotpassword/\'>Forgot password?</a></li>
<li ><a href=\''
.$domain.'/signup/\'>Signup</a></li>';
}else{
$mymenu1 '
<li ><a href=\''
.$domain.'/myaccount/\'>My Account</a></li>
<li ><a href=\''
.$domain.'/logout/\'>Logout</a></li>';
}
            if (
$showpages == 1) { echo '<li><a href=\''.$domain.'/pages/\' title=\'pages\'>Pages</a></li>'; };
            if (
$showblog == 1) { echo '<li><a href=\''.$domain.'/blog/\' title=\'blog\'>Blog</a></li>'; };

echo '
                  
</ul>'
;
}else{
echo ' <ul>
<li><a href=\''
.$domain.'\' title=\'Home\'>Home</a></li>
<li><a href=\''
.$domain.'/index.php?action=mostplayed\' title=\'Most Played\'>Most Played</a></li>
<li><a href=\''
.$domain.'/index.php?action=newest\' title=\'Newest\'>Newest</a></li>
<li><a href="'
.$domain.'/index.php?action=memberslist" title="Member List">Member List</a></li>
<li><a href=\''
.$domain.'/index.php?action=search\' title=\'Search\'>Search</a></li>
<li><a href=\''
.$domain.'/index.php?action=links\' title=\'Links\'>Links</a></li>
<li><a href=\''
.$domain.'/index.php?action=fineprint\' title=\'Fine Print\'>Fine Print</a></li>
'
;
if(!isset($suserid)){
$mymenu1 ' <li ><a href=\''.$domain.'/index.php?action=login\'>Login</a></li>
<li><a href=\''
.$domain.'/index.php?action=forgotpassword\'>Forgot password?</a></li>
<li ><a href=\''
.$domain.'/index.php?action=signup\'>Signup</a></li>';
}else{
$mymenu1 '
<li ><a href=\''
.$domain.'/index.php?action=myaccount\'>My Account</a></li>
<li ><a href=\''
.$domain.'/index.php?action=logout\'>Logout</a></li>';
}
            if (
$showpages == 1) { echo '<li ><a href=\''.$domain.'/index.php?action=pages\'>Pages</a></li>'; };
            if (
$showblog == 1) { echo '<li ><a href=\''.$domain.'/index.php?action=blog\'>Blog</a></li>'; };

echo '
                  
</ul>'
;
}







echo ' </div>';

?>

<br />
<br />
<br />
</td>
</tr>
<tr>
<td valign="top" width="170" >
<table width="170" >

<tr>
<td class="header2">Banner Exchanges</td>
</tr>

<tr>
<td class="content2"><?php echo $bannersleft?></td>
</tr>

<tr>
<td class="header2">My Menu</td>
</tr>

<tr>
<td class="content2">
<?php
                              
echo '<ul class=\'catmenu\'>';
                                     echo 
$mymenu1;
                         if($usrdata['user_level'] == 2){echo '<li><a href=\''.$domain.'/index.php?action=admin\'>Admin</a></li>';
   
                                       };
                                     if(
$usrdata['gamelevel'] >= 2) {echo '<li><a href=\''.$domain.'/index.php?action=gameadmin\'>Game Admin</a></li>';};
                                     if(
$usrdata['bloglevel'] >= 2) {echo '<li><a href=\''.$domain.'/index.php?action=blogadmin\'>Blog Admin</a></li>';};
                                     echo 
'<p>';


                                     
submenu1();

echo '</ul>';
?>

</td>
</tr>
</table>


<table width="100%">
                        <?php submenu2 (); ?>
                        
<tr>
<td class="header2">Ads</td>
</tr>


<tr>
<td class="content2">


<?php echo $ads1?>
<p>
</td>

</tr>
</table>
</td>
<td valign="top" width="560">





<?php
writebody
();
?>








</td>
<td valign="top" width="170">
<table width="170">
<tr>
<td class="header2">Banner Exchanges</td>
</tr>
<tr>
<td class="content2">
                               <?php echo $bannersright?>
</td>
</tr>
<tr>
<td class="header2">Ads</td>
</tr>
<tr>
<td class="content2">
                               <?php echo $ads2?>
</td>
</tr>
</table>
<table width="100%">
<tr>
<td class="header2">Links</td>
</tr>
<tr>
<td class="content2" stlye="padding:5px'">
<?php
$rlinkx2 "SELECT * FROM dd_links where activate = '2' " ;
                              
$rlinkx1 sqlcache('sitewidelinks'$cachelife$rlinkx2);


echo '<ul  class=\'catmenu\'>';
foreach($rlinkx1 as $rlinkx){
echo '<li><a href=\''.$rlinkx['url'].'\'>'.$rlinkx['title'].'</a></li>';
} echo '</ul>';
?>

</td>
</tr>
<tr>
<td class="content2" stlye="padding:5px'">
<!-- AddThis Button BEGIN --><a href="http://www.addthis.com/bookmark.php" onclick="addthis_url   = location.href; addthis_title = document.title; return addthis_click(this);" target="_blank"><img src="http://s7.addthis.com/static/btn/lg-share-en.gif" width="125" height="16" border="0" alt="Bookmark and Share" /></a><script type="text/javascript">var addthis_pub = "sssox";</script><script type="text/javascript" src="http://s7.addthis.com/js/widget.php?v=10"></script>  <!-- AddThis Button END -->
</td>
</tr>
</table>
<?php
$totalgames $db->num_rows($db->query(sprintf('SELECT ID FROM dd_games WHERE active="1"')));
$totalusers $db->num_rows($db->query(sprintf('SELECT userid FROM dd_users WHERE activation_key="0"')));
$totalcats $db->num_rows($db->query(sprintf('SELECT ID FROM dd_categories')));
$totalcomments $db->num_rows($db->query(sprintf('SELECT ID FROM dd_comments')));
$time=time()-15*60;
$onlineusers $db->num_rows($db->query("SELECT userid FROM dd_users WHERE status >= $time"));
$year date('Y');
?>

<table width="100%">
<tr>
<td class="header2">Stats</td>
</tr>
<tr>
<td class="content2" style="padding:5px">
Total Games: <?php echo $totalgames?><br />
Total Users: <?php echo $totalusers?><br />
Total Categories: <?php echo $totalcats?><br />
Total Comments: <? echo $totalcomments; ?><br />
                              Total Hits: <?php include ("$directorypath/includes/counter.php"); ?><br />
Users Online: <? echo $onlineusers; ?><p>
                              <a href="<?php echo $domain?>/rss-arcade.php"><img src="<? echo $domain; ?>/templates/default/images/rss.gif"  border="0" ></img> RSS-Games</a><br />
                              <?php   if ($showblog == 1) { echo '<a href="'.$domain.'/rss-blog.php"><img src="'.$domain.'/templates/default/images/rss.gif" border="0" ></img> RSS-Blog</a><br />' ; };

                              
?>


</td>
</tr>
</table>
<br />
</td> </tr></table><br />
<div align="center">
 <! -- Please do not remove the "powered by" link unless, you've purchased the removal. -- >
<div align="center"> <?php echo "Copyright ".$sitename." &copy; 2008-".date('Y'); ?> All Rights Reserved - Powered By <a href="http://www.freearcadescript.net" target="_blank">Free Arcade Script</a>.</div> <br />
<?php echo $footerspace?>


<!-- End the original FAS mark-up -->

</td>
<td class="" valign="top" style="width:150px; text-align: center;">

<!-- THIS IS THE RIGHT PANEL SCRIPT -->

<img src="http://www.arcadebannerclicks.com/userbanners/175-1-2-1324852107.png" />

</td>
</tr>
</table>
</div>

</body>
</html>
« Last Edit: February 15, 2012, 04:40:59 AM by lopa »