NOTE: I'm creating a new mode for Shelfari called "My Shelfari Bookshelf". I reserve this idea, so please don't steal my idea
Having a hard time applying this for a new tab called "Shelfari" (shelfari.com)
The template is:
memberinfo_block_shelfari
Code:
<div class="alt1 block_row">
<ul class="list_no_decoration">
$block_data[shelfari]
</ul>
</div>
The plugin is:
Code:
$blocklist = array_merge($blocklist, array(
'mymodification' => array(
'class' => 'Shelfari',
'title' => 'My Shelfari Bookshelf',
'hook_location' => 'profile_left_last'
)
));
class vB_ProfileBlock_Shelfari extends vB_ProfileBlock
{
var $template_name = 'memberinfo_block_shelfari';
function confirm_empty_wrap()
{
return false;
}
function confirm_display()
{
return ($this->block_data['shelfari'] != '');
}
function prepare_output($id = '', $options = array())
{
$this->block_data['shelfari'] = '<embed width="500" height="500" src="http://www.shelfari.com/ws/shelf.swf" wmode="transparent" FlashVars="UserName=chadi&ShelfType=list&verE=s1.5&ListType=isowned&booksize=large&Alpha=0&BGColor=FFFFFF"></embed>';
}
}
Note, "chadi" in that Shelfari embed code I pasted at the end of the plugin is my actual Shelfari username. However, I created a user profile field called "My Shelfari Bookshelf", which is field44.
I tried replacing chadi with $userinfo[field44] and it did not pull correctly.
What is the actual proper replacement code to pull whatever content from the user's field44 profile field to replace my actual username?
Can some also please explain how to properly create a plugin file for this, so I can share it as a mod?