*

Recent

Author Topic: base_home.php and other pages...?  (Read 5553 times)

Trasion

  • Guest
base_home.php and other pages...?
« on: September 04, 2009, 06:11:25 PM »
Why are all pages different from base_home.php?

I'd like the spacing to be the same as base_home.php, in the other 3 pages (allgames.php, newest.php and mostplayed.php).

Here's to show you how it looks like:

base_home.php:


newest.php:


And here's the codes:

base_home.php
Code: [Select]
<?php
$count 
0;

$r $db->query('SELECT * FROM dd_categories ORDER BY name');
echo 
'<table width=\'99%\' border=\'0\' align=\'center\'>';
while(
$row $db->fetch_row($r)){

$categorynamev $row['name'];
$categorynameu ereg_replace('[^A-Za-z0-9]''-'$categorynamev );

if(
$seo_on == 1){
$categoryurl ''.$domain.'/browse/'.$row['ID'].'-'.$categorynameu.'.html';
}else{
$categoryurl ''.$domain.'/index.php?action=browse&amp;ID='.$row['ID'].'';
    };


if(
$count%2==0){
       echo 
'<tr>
       <td width=\'50%\' valign=\'top\'>
       <table width=\'97%\' border=\'0\'>
       <tr>
       <td class=\'header\'><a href=\''
.$categoryurl.'\'>'.$row['name'].' Games</a></td>
       </tr>
       <tr>
       <td>'
;
       echo '<table>';
       $ir $db->query(sprintf('SELECT * FROM dd_games WHERE category=\'%u\' and active=\'1\' ORDER BY rand() LIMIT 0,'.$limitboxgames.''$row['ID']));
       while($row $db->fetch_row($ir)){
       $gamename ereg_replace('[^A-Za-z0-9]''-'$row['name']);
       if($seo_on == 1){
       $playlink ''.$domain.'/play/'.$row['ID'].'-'.$gamename.'.html';
       }else{
       $playlink ''.$domain.'/index.php?action=play&amp;ID='.$row['ID'].'';
       }
       echo ' <tr>
       <td width=\'45\' height=\'45\' valign=\'top\' class=\'content\'>
       <a href=\''
.$playlink.'\'>
       '
;
       if($row['type'] == 1){
       echo ' <img src=\''.$domain.'/'.$thumbsfolder.'/'.$row['thumb'].'\' width=\'45\' width=\'45\' border=\'1px solid #000000\'>';
       }else{
       echo ' <img src=\''.$row['thumburl'].'\' width=\'45\' width=\'45\' border=\'1px solid #000000\'>';
       }
      
       echo '
       </a>
       </td>
       <td valign=\'top\' class=\'content\'><div class=\'gamehometitle\'><a href=\''
.$playlink.'\'>'.$row['name'].'</a></div>
       <div class=\'gamehomedesc\'><b>Description:</b> '
.desclimit($row['description']).'
       </div></td>
       </tr>'
;
       };  







  

      echo '  </table>';
      
       echo ' </td>
       </tr>
       </table>
       </td>'
;
}else{
echo 
'
       <td width=\'50%\' valign=\'top\'>
       <table width=\'97%\' border=\'0\'>
       <tr>
       <td class=\'header\'><a href=\''
.$categoryurl.'\'>'.$row['name'].' Games</a></td>
       </tr>
       <tr>
       <td>'
;
              echo '<table>';
       $ir $db->query(sprintf('SELECT * FROM dd_games WHERE category=\'%u\' and active=\'1\' ORDER BY rand() LIMIT 0,'.$limitboxgames.''$row['ID']));
       while($row $db->fetch_row($ir)){
       $gamename ereg_replace('[^A-Za-z0-9]''-'$row['name']);
       if($seo_on == 1){
       $playlink ''.$domain.'/play/'.$row['ID'].'-'.$gamename.'.html';
       }else{
       $playlink ''.$domain.'/index.php?action=play&amp;ID='.$row['ID'].'';
       }
       echo ' <tr>
       <td width=\'45\' height=\'45\' valign=\'top\' class=\'content\'>
       <a href=\''
.$playlink.'\'>';
       if($row['type'] == 1){
       echo ' <img src=\''.$domain.'/'.$thumbsfolder.'/'.$row['thumb'].'\' width=\'45\' width=\'45\' border=\'1px solid #000000\'>';
       }else{
       echo ' <img src=\''.$row['thumburl'].'\' width=\'45\' width=\'45\' border=\'1px solid #000000\'>';
       }
      
       echo ' </a>
       </td>
       <td valign=\'top\' class=\'content\'><div class=\'gamehometitle\'><a href=\''
.$playlink.'\'>'.$row['name'].'</a></div>
       <div class=\'gamehomedesc\'><b>Description:</b> '
.desclimit($row['description']).'
       </div></td>
       </tr>'
;
       };






   
      echo '  </table>';
      
       echo ' </td>
       </tr>
       </table>
       </td>
       </tr>'
;
}
$count++;
}
echo 
"</table>";
$pgname 'Your resource for fantastic games!';
?>

newest.php:
Code: [Select]
<?php
$max 
$gamesonpage;
$show clean($_GET['page']);
if(empty(
$show)){
$show 1;
}
$limits = ($show 1) * $max
$r $db->query(sprintf('SELECT * FROM dd_games ORDER BY dateadded DESC LIMIT '.$limits.','.$max.' '));
$totalres mysql_result($db->query('SELECT COUNT(ID) AS total FROM dd_games'),0);
$totalpages ceil($totalres $max); 
echo 
'<table width=\'100%\' border=\'0\' align=\'center\'>
<tr>
<td colspan=\'2\' class=\'header\'>Newest Games</td>
</tr>'
;
$count 0;
while(
$in $db->fetch_row($r)){
$gamename ereg_replace('[^A-Za-z0-9]''-'$in['name']);
if($seo_on == 1){
$playlink ''.$domain.'/play/'.$in['ID'].'-'.$gamename.'.html';
}else{
$playlink ''.$domain.'/index.php?action=play&amp;ID='.$in['ID'].'';
}
if(
$count%2==0){

       echo 
'<tr>
       <td width=\'50%\' valign=\'top\'>
      
       <table width=\'100%\' border=\'0\'>
      
       <tr>
       <td width=\'55\' height=\'55\' valign=\'top\' class=\'content\'>
       <a href=\''
.$playlink.'\'>
       '
;
       if($in['type'] == 1){
       echo ' <img src=\''.$domain.'/'.$thumbsfolder.'/'.$in['thumb'].'\' width=\'45\' width=\'45\' border=\'1px solid #000000\'>';
       }else{
       echo ' <img src=\''.$in['thumburl'].'\' width=\'45\' width=\'45\' border=\'1px solid #000000\'>';
       }
      
       echo ' </a>
       </td>
       <td valign=\'top\' class=\'content\'><div class=\'gamehometitle\'><a href=\''
.$playlink.'\'>'.$in['name'].'</a></div>
       <div class=\'gamehomedesc\'><b>Description:</b> '
.browsedesclimit($in['description']).'
       </div></td>
       </tr>
       </table>
      
       </td>
'
;
}else{
 echo 
'
       <td width=\'50%\' valign=\'top\'>
      
       <table width=\'100%\' border=\'0\'>
      
       <tr>
       <td width=\'55\' height=\'55\' valign=\'top\' class=\'content\'>
       <a href=\''
.$playlink.'\'>
       '
;
       if($in['type'] == 1){
       echo ' <img src=\''.$domain.'/'.$thumbsfolder.'/'.$in['thumb'].'\' width=\'45\' width=\'45\' border=\'1px solid #000000\'>';
       }else{
       echo ' <img src=\''.$in['thumburl'].'\' width=\'45\' width=\'45\' border=\'1px solid #000000\'>';
       }
      
       echo ' </a>
       </td>
       <td valign=\'top\' class=\'content\'><div class=\'gamehometitle\'><a href=\''
.$playlink.'\'>'.$in['name'].'</a></div>
       <div class=\'gamehomedesc\'><b>Description:</b> '
.browsedesclimit($in['description']).'
       </div></td>
       </tr>
       </table>
      
       </td>
</tr>'
;
}
$count++;
}

echo 
"</table>";

$pgname 'Newest Games';




?>

If you know what I mean. The spacing in between the right side of the red top parts, and that underline with the title. (sorry, I'm bad at describing it).

Can someone make it so the pages look the same in that area? The 3 pages I mentioned are too close in those areas..

kurt

  • Developer
  • Hero Member
  • ******
  • Posts: 634
  • Force: +16/-1
Re: base_home.php and other pages...?
« Reply #1 on: September 04, 2009, 10:33:25 PM »
I suspect from the last one we went over like this that this one is also having to do with the table tag modifiers such as padding, spacing, etc. I can try to take a look into it this weekend, but I'm not making any promises. I just got back from the 6th ER visit in the last 3 weeks.

The templating system is a hold over from version 1.0. It has been something that we have wanted to fix for some time, and offer a variety of them. However, as said before, there were a couple of other things that needed fixing of a much higher priority as fixing the template first, would mean that the template would need to be fixed again once those other things were taken care of, and because they were tied so close to the templating system to begin with. Those other items are being taken care of even now, and that means that the templating system has moved up in priority. The intent is to take the whole system to a tabless CSS system in the future, though that might have to wait for a few extra months.

kurt

  • Developer
  • Hero Member
  • ******
  • Posts: 634
  • Force: +16/-1
Re: base_home.php and other pages...?
« Reply #2 on: September 05, 2009, 01:01:38 AM »
Actually, just looking at it something does seem to be causing it that is rather easy to fix. Haven't tried it, but it probably is causing at least part of the problem. In the base_home.php file it has this

Code: [Select]


       <td width=\'50%\' valign=\'top\'>
       <table width=\'97%\' border=\'0\'>
       <tr>



Where as newest.php has this

Code: [Select]

       <td width=\'50%\' valign=\'top\'>
       
       <table width=\'100%\' border=\'0\'>
       


They have the above in 2 spots each. Notice the difference? One says 97% width the other says 100% width. Try making them all the same. You would need to do it in 2 spots in each file. It might clear it up totaly, or it might only be  a step in the right direction.

Let me know how it works.

Trasion

  • Guest
Re: base_home.php and other pages...?
« Reply #3 on: September 05, 2009, 08:08:53 AM »
Wow, what an easy fix, but hard to spot! Can't believe I didn't notice it! Thank you so much!