hi,
i programed award hack when member get award the link of this award saved in additional field in userfield tabled called 'awardicon'
in (member_build_blocks_start) hook i using this code
PHP Code:
$blocklist = array_merge($blocklist, array(
'myawards' => array(
'class' => 'my_awards',
'title' => $vbphrase['my_awards'],
'hook_location' => 'profile_left_last'
)));
class vB_ProfileBlock_my_awards extends vB_ProfileBlock
{
var $template_name = 'memberinfo_block_my_awards';
function confirm_empty_wrap()
{
return false;
}
function confirm_display()
{
return ($this->block_data['my_awards'] != '');
}
function prepare_output($id = '', $options = array())
{
global $show, $vbphrase, $stylevar, $vbcollapse, $bgclass, $vbulletin;
if($this->profile->userinfo['awardicon'])
{
// something her
}
}
}
but i see that it doesn't work with all
when i write this
PHP Code:
$blocklist = array_merge($blocklist, array(
'myawards' => array(
'class' => 'my_awards',
'title' => $vbphrase['my_awards'],
'hook_location' => 'profile_left_last'
)));
class vB_ProfileBlock_my_awards extends vB_ProfileBlock
{
var $template_name = 'memberinfo_block_my_awards';
function confirm_empty_wrap()
{
return false;
}
function confirm_display()
{
return ($this->block_data['my_awards'] != '');
}
function prepare_output($id = '', $options = array())
{
global $show, $vbphrase, $stylevar, $vbcollapse, $bgclass, $vbulletin;
echo $this->profile->userinfo['awardicon']
}
}
i doesn't get any output with all ( have award or not )
when i test it in new test forum it working fine !!!
i think there are some thing in my forum doesn't load all additional userinfo field
because this work
Quote:
echo $this->profile->userinfo['field1']
|

