Suggestion for auto-template invitation block in home usercp:
Create new template called "usercp_invitation_block"
Use this code inside:
HTML Code:
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="tcat">$vbphrase[invitation_system] <if condition="$show['invitation_left']"><phrase 1="$bbuserinfo[invitation]">($vbphrase[invitation_x_left])</phrase></if></td>
</tr>
<tr>
<td class="alt1"><span class="smallfont"><a href="profile.php?$session[sessionurl]do=invitation">$vbphrase[invitation_click_here_to_invitation_new_users]</a></span></td>
</tr>
</table>
<br />
Create new Plugin called "Invitation Auto Template" with hook "parse_templates"
Use this code inside:
PHP Code:
if ($vbulletin->options['invitation_active'])
{
eval('$template_hook[usercp_main_pos1] .= "' . fetch_template('usercp_invitation_block') . '";');
}
Create new Plugin called "Invitation Cache Templates" with hook "cache_templates"
Use this code inside:
PHP Code:
$globaltemplates = array_merge( $globaltemplates, array('usercp_invitation_block') );
Use this hack for added link into menu. For now not have time to create this..
Thanks for hack.. this very good project =)