*

Recent

Author Topic: 1,2,3,4, next or just one link to all games in that category  (Read 4845 times)

Sterling

  • Jr. Member
  • **
  • Posts: 81
  • Force: +1/-0
    • Hitchhike games
1,2,3,4, next or just one link to all games in that category
« on: April 21, 2009, 10:03:28 PM »
On Home Page After the 5 games(or whatever) on each category have a link to all the games or 1,2,3,4,next. Because The category links on the right side are not enough in  my opinion. I hope I'm explaining it right...Hope you guys can help!!! :)

kurt

  • Developer
  • Hero Member
  • ******
  • Posts: 634
  • Force: +16/-1
Re: 1,2,3,4, next or just one link to all games in that category
« Reply #1 on: April 21, 2009, 11:02:15 PM »
Mmmmmm I'm not quite sure I understand what you're asking. At the bottom of browse a category there are links to pages 1, 2, 3, etc. Are you asking to move that to the bottom of the few that are shown on the main page?

Robbie

  • Sr. Member
  • ****
  • Posts: 343
  • Force: +16/-0
Re: 1,2,3,4, next or just one link to all games in that category
« Reply #2 on: April 22, 2009, 06:18:49 AM »
Dont understand the
Quote
right side not enough
.

Sterling

  • Jr. Member
  • **
  • Posts: 81
  • Force: +1/-0
    • Hitchhike games
Re: 1,2,3,4, next or just one link to all games in that category
« Reply #3 on: April 22, 2009, 08:45:32 PM »
Like on most game sites there is a section that displays a few games from a category(shooting,sports, ect...). And under these sections is a link to a page dedicated to that section's games!!! Does that clear it up at all :-\

kurt

  • Developer
  • Hero Member
  • ******
  • Posts: 634
  • Force: +16/-1
Re: 1,2,3,4, next or just one link to all games in that category
« Reply #4 on: April 22, 2009, 10:48:18 PM »
Take a look at the demo's main page and tell me if that is what you're looking for. If it is I'll post it. If not, then explain some more please.
« Last Edit: April 23, 2009, 06:40:15 AM by admin »

Sterling

  • Jr. Member
  • **
  • Posts: 81
  • Force: +1/-0
    • Hitchhike games
Re: 1,2,3,4, next or just one link to all games in that category
« Reply #5 on: April 23, 2009, 10:25:40 PM »
Yes sir, that is what i mean... ;D

kurt

  • Developer
  • Hero Member
  • ******
  • Posts: 634
  • Force: +16/-1
Re: 1,2,3,4, next or just one link to all games in that category
« Reply #6 on: April 23, 2009, 10:40:11 PM »
Save your old /pages/base_home.php file and paste this into it.

Code: [Select]

<?php
$count 
0;

$r $db->query('SELECT * FROM dd_categories');
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\'>'
.$row['name'].'</td>
       </tr>
       <tr>
       <td>'
;
       echo '<table>';
       $ir $db->query(sprintf('SELECT * FROM dd_games WHERE category=\'%u\' 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=\'0\'>';
       }else{
       echo ' <img src=\''.$row['thumburl'].'\' width=\'45\' width=\'45\' border=\'0\'>';
       }
      
       echo '
       </a>
       </td>
       <td valign=\'top\' class=\'content\'><div class=\'gamehometitle\'>'
.$row['name'].'</div>
       <div class=\'gamehomedesc\'>'
.desclimit($row['description']).'
       <a href=\''
.$playlink.'\'>Play</a></div></td>
       </tr>'
;
       };  


echo 
'<tr><td colspan=\'2\' class=\'content\'>';       
echo 
'<a href=\''.$categoryurl.'\'>Play more '.$categorynamev.' games</a>';
echo 
'</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\'>'
.$row['name'].'</td>
       </tr>
       <tr>
       <td>'
;
              echo '<table>';
       $ir $db->query(sprintf('SELECT * FROM dd_games WHERE category=\'%u\' 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=\'0\'>';
       }else{
       echo ' <img src=\''.$row['thumburl'].'\' width=\'45\' width=\'45\' border=\'0\'>';
       }
      
       echo ' </a>
       </td>
       <td valign=\'top\' class=\'content\'><div class=\'gamehometitle\'>'
.$row['name'].'</div>
       <div class=\'gamehomedesc\'>'
.desclimit($row['description']).'
       <a href=\''
.$playlink.'\'>Play</a></div></td>
       </tr>'
;
       };


echo 
'<tr><td colspan=\'2\' class=\'content\'>';       
echo 
'<a href=\''.$categoryurl.'\'>Play more '.$categorynamev.' games</a>';
echo 
'</td></tr>';




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




Make sure that you save the old file in case something goes haywire. This is right off the test/dev site and I forget what all I've done to it. Meaning it might not work. If it don't then I'll have to edit your old file to work.

Let me know how it goes either way.

Sterling

  • Jr. Member
  • **
  • Posts: 81
  • Force: +1/-0
    • Hitchhike games
Re: 1,2,3,4, next or just one link to all games in that category
« Reply #7 on: April 24, 2009, 12:05:37 AM »
It worked great...Thanks ;D