Pages: [1]
Author Topic: Need to display all games in one page, is that possible?  (Read 2398 times)
rojar
Guest


Email
on: Mar 27, 08, 05:12 AM

Hi, on my website, i wanted to have a games page, where i cud list all the games in the whole site with their thumbs, text and description; just like the homepage page, but on a different page, is it possible? if so cud someone please tell me how to do this. thnx alot for the help Grin
Logged
Fernando Gomez
Guest


Email
Reply #1 on: Mar 27, 08, 12:38 PM

Well if you go to the gamescat block on PAGE BLOCKS you can edit how much games are shown per category when someone navigates to that category. Just set it to 100 if you have less than 100 games per category.
Logged
Administrator
Sr. Member
*

Karma: 7
Posts: 486


Email
Reply #2 on: Mar 28, 08, 05:53 AM

I don't think that's a good idea to show all games with thumbs... Instead, let me show you how to make a page containing the simple plain-text list of all games:

1. create a new dynamic (php) block ALLGAMES (see screenshot) with this code:
Code:
<?php
if( substr($cPage08) == 'allgames' )
{
   
$nColumns $cTpl["nColumnsListCat"];
   
$nOrder $cB["ALLGAMES"]["sort"];
   
$tpl->define"tplBList""block_catgameslist.html" );
   
$tpl->assign'CATEGORY''' );
   for( 
$i=0$i<$nColumns$i++ )
$tpl->define_dynamic"dynListCol$i""tplBList" );
   
$tpl->assign"LISTSORTSTR"$cSortStr[$nOrder] );
   
$res $db->super_query"SELECT id, category_id, title FROM " $cMain["dbPrefix"] . "games ORDER BY ".$cSort[$nOrder], true );

   
$col=0;
   foreach( 
$res as $game )
   {
$tpl->assign"LISTURL"GameURL($game["id"], $game["title"]) );
$tpl->assign"LISTTITLE"$game["title"] );
$tpl->parse"DYNLISTGAMES$col"".dynListCol$col" );
$col++;
if( $col == $nColumns)
$col 0;
   }
   
$tpl->parse"ALLGAMES""tplBList" );
}
else
   
$tpl->assign'ALLGAMES'substr($cPage08) );
?>
See its settings on the screenshot

2. Create a new page and name it "allgames" (the filename is important, if you want another filename, you should also change it in the 2nd line of the php code above). Menu item title and other params anot that important.
In the html code of that new page place this: !ALLGAMES!.

That's it Smiley
Demo: http://www.arcadeous.com/docs/allgames.html


* allgames1.png (38.37 KB, 894x637 - viewed 429 times.)

* allgames2.png (32.3 KB, 873x633 - viewed 457 times.)
« Last Edit: Mar 28, 08, 12:00 PM by Sergey » Logged
rojar
Guest


Email
Reply #3 on: Mar 28, 08, 05:57 AM

Hey Fernando,
thnx for the page block help: but the prblem is what i want to do it this: i want to display all the games from all categories in one page: http://toddlehop.com/docs/gameslist.html atm i have dont that using html and so if i add new games it wont be updated, is it possible to do it any other way? thnx and sorry for the bother:)
cheerS:)
Logged
rojar
Guest


Email
Reply #4 on: Mar 28, 08, 05:59 AM

AWESOME SERGEY!!! THNX FOR THAT, I SHALL JUST TRY IT AND REPLY IN A FEW MINS, THAT IS REALLY HELPFUL Smiley
Logged
Customers
Full Member
*

Karma: 0
Posts: 67


Email
Reply #5 on: Sep 19, 11, 03:06 PM

Your example on arcadeous fails with an error.
Logged
Administrator
Sr. Member
*

Karma: 7
Posts: 486


Email
Reply #6 on: Sep 19, 11, 09:13 PM

yes, I've lost the html file while moving the site to a new server.
Logged
Pages: [1]
 
Jump to: