Any ideas why this only works if "test" is used in the $taburl variable? If I change the #test to #quoted ($blockid var) nothing shows up.
PHP Code:
if (isset($vbulletin->GPC['tab']))
{
$selected_tab = $vbulletin->GPC['tab'];
}
$blockinfo['title'] = $vbphrase['who_quoted'];
$blockid = "quoted";
$taburl = $memberurl = fetch_seo_url('member', $prepared) . "&tab=quoted#test";
$templater = vB_Template::create('memberinfo_tab');
$templater->register('selected_tab', $selected_tab);
$templater->register('relpath', $relpath);
$templater->register('blockinfo', $blockinfo);
$templater->register('blockid', $blockid);
$templater->register('taburl', $taburl);
$template_hook['profile_tabs_last'] .= $templater->render();
// ### Your code to fill the tab ###
// Don't forget you need to register any variables for use in templates
$quoted_tab_content = "Congratulations, you can see me, I'm your PHP Code!";
$templater = vB_Template::create('memberinfo_block_WhoQuoted');
$templater->register('selected_tab', $selected_tab);
$templater->register('quoted_tab_content', $quoted_tab_content);
$template_hook['profile_tabs'] .= $templater->render();
Template
HTML Code:
<div id="view-quoted" class="<vb:if condition="$selected_tab == 'quoted'">selected_view_section<vb:else />view_section</vb:if><vb:if condition="$userinfo['userid'] != $bbuserinfo['userid']"> vm_other_prof</vb:if>">
<div class="blocksubhead subsectionhead userprof_headers userprof_headers_border">
<h4 class="subsectionhead-understate">Test</h4>
</div>
<br />This is a <b>custom tab</b> test.<br />
{vb:raw quoted_tab_content}
</div>