TinyPortal

Development => Block Codes => Topic started by: robert420 on March 02, 2006, 09:37:18 AM

Title: Farvorite Game Block
Post by: robert420 on March 02, 2006, 09:37:18 AM
require('./Settings.php');

$link = mysql_connect($db_server, $db_user, $db_passwd);
mysql_select_db($db_name, $link);
// Functions begin
// All returns array

// game_list( [category id] )


//function game_list($cat_id = ""){


global $link,$db_prefix,$boarddir,$boardurl;

function game_list($cat_id = ""){

{
// Game listing (Default)

$context['sub_template'] = 'game_list'; // Set subtemplate to correct

$query= "SELECT * FROM {$db_prefix}games_favorite WHERE member='{$ID_MEMBER}'";
while($fob = mysql_fetch_array($res))
{
$myf[] = $fob['game'];
}
// 0 - 11
$order_array = array('name','id','game','dsc','highscore','category','width','height','type','file','bgcolor','help','rating');
}



i started this code but i cant seem to get it to work if anyone insrested and helping me  feel free this is my first time trying to code something
Title: Re: Farvorite Game Block
Post by: elpvn on March 07, 2006, 05:49:23 AM
It's not work with my site  :o
Title: Re: Farvorite Game Block
Post by: G6Cad on March 07, 2006, 09:59:17 AM
If you read the whole post you can see why itÂÃ,´s not working ;)

Quotestarted this code but i cant seem to get it to work if anyone insrested and helping me  feel free this is my first time trying to code something
Title: Re: Farvorite Game Block
Post by: yjobcreations on April 04, 2007, 08:13:18 AM
why is this included in the Snippets Index if it's not working?
Title: Re: Farvorite Game Block
Post by: IchBin on April 04, 2007, 02:50:31 PM
Because we don't test any of the snippets, its just an index of posts. More is planned for the block code snippets board, but as it stands I'm not going to go through and make sure everything works in this board until Bloc is ready to change he way we do it for TP 1.0.