Hi there and i am trying to, i am not that good at describing the code but what i am trying acheive is that - i need to get some data from a the database and show in one of the block. Have a look at my code
PHP Code:
$blocklist = array_merge($blocklist, array(
'games' => array(
'class' => 'games',
'title' => 'gamess',
'hook_location' => 'profile_left_last'
)
));
// ######################### REQUIRE BACK-END ############################
require_once('./global.php');
global $vbulletin;
class vB_ProfileBlock_games extends vB_ProfileBlock
{
var $template_name = 'memberinfo_block_games';
function confirm_empty_wrap()
{
return false;
}
function confirm_display()
{
return ($this->block_data['games'] != '');
}
function prepare_output($id = '', $options = array())
{
function sql_most_downloaded ($limit)
{
global $vbulletin, $vbphrase;
$sql = $db->query
(
'SELECT * FROM xxx Where xxx = 'xxx'
GROUP BY xxx
ORDER BY xxx DESC
LIMIT x,x'
);
while ($games = $db->fetch_array($sql))
{
$out.= '<li><a href=\"../games/gamess/show/' . $games[ID] . '\" title=\"' . $games[file_title] . '\">' . $games[file_title] . ' [ ' . $games[total_downloads] . ' ]</a></li>';
}
}
$this->block_data['games'] = $out;
}
}
This selection of data is not based on the vbulletin so i think i can't use
PHP Code:
this->something->something
Has anyone have any suggestion