The Arcive of vBulletin Modifications Site. |
|
|
#1
|
|||
|
|||
|
I'm following the article here:
https://vborg.vbsupport.ru/showthread.php?t=165554 And am getting stuck on the last bit by Wayne. Here's my plugin right now, complete with default names. ![]() Code:
$blocklist = array_merge($blocklist, array(
'mymodification' => array(
'class' => 'MyModification',
'title' => 'Gear Details',
'hook_location' => 'profile_left_last'
)
));
class vB_ProfileBlock_MyModification extends vB_ProfileBlock
{
var $template_name = 'memberinfo_block_mymodification';
function confirm_empty_wrap()
{
return false;
}
function confirm_display()
{
return ($this->block_data['mymodification'] != '');
}
function prepare_output($id = '', $options = array())
{
$this->block_data['mymodification'] = 'Coming soon.';
}
}
Code:
CPF1: $post[field5]<br /> CPF2 @post [field2]<br /> Here's my plugin according to the article, which doesn't work: Code:
$blocklist = array_merge($blocklist, array(
'mymodification' => array(
'class' => 'MyModification',
'title' => 'Gear Details',
'hook_location' => 'profile_left_last'
)
));
class vB_ProfileBlock_MyModification extends vB_ProfileBlock
{
var $template_name = 'memberinfo_block_mymodification';
function confirm_empty_wrap()
{
return false;
}
function confirm_display()
{
return ($this->block_data['mymodification'] != '');
}
function prepare_output($id = '', $options = array())
{
$this->block_data['custom'] = $this->profile->userinfo['field5'] : "Stuff: $this->profile->userinfo['field5']" ? "Nothing to see here";
}}
Any insight would be appreciated. --------------- Added [DATE]1206216937[/DATE] at [TIME]1206216937[/TIME] --------------- I got this sorted out - using the first bit of code, I ended up putting the fields in the actual template.
|
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|