I used the following modification to only allow usergroup 6 to choose the Thread type.
Thanks Spermy
Quote:
Originally Posted by Spermy
For those that want just postbit for default.
1. In the postbit_select template
Default
Code:
<table cellpadding="0" cellspacing="0" border="0" class="fieldset">
<tr>
<td>
$vbphrase[cp_ttype]:<br />
<select name="ttype" tabindex="1">
<option value="1">Postbit Article</option>
<option value="2">Postbit Flipped</option>
<option value="3">Postbit Normal</option>
<option value="4">Postbit Legacy</option>
</select>
</td>
</tr>
</table>
Change to
Code:
<table cellpadding="0" cellspacing="0" border="0" class="fieldset">
<tr>
<td>
$vbphrase[cp_ttype]:<br />
<select name="ttype" tabindex="1">
<option value="1">Postbit Normal</option>
<option value="2">Postbit Flipped</option>
<option value="3">Postbit Article</option>
<option value="4">Postbit Legacy</option>
</select>
</td>
</tr>
</table>
2. In Chief Post - Postbit Display Complete Plugin
Default
Code:
if ($this->forum['chiefpost']==1 AND $post['postid']==$this->thread['firstpostid'])
{
switch ($this->thread['ttype'])
{
case 1:
$this->templatename = 'postbit_articles';
break;
case 2:
$this->templatename = 'postbit_flipped';
break;
case 3:
$this->templatename = 'postbit';
break;
case 4:
$this->templatename = 'postbit_legacy';
break;
default:
$this->templatename = 'postbit_articles';
break;
}
}
Change to
Code:
if ($this->forum['chiefpost']==1 AND $post['postid']==$this->thread['firstpostid'])
{
switch ($this->thread['ttype'])
{
case 1:
$this->templatename = 'postbit_legacy';
break;
case 2:
$this->templatename = 'postbit_flipped';
break;
case 3:
$this->templatename = 'postbit';
break;
case 4:
$this->templatename = 'postbit_articles';
break;
default:
$this->templatename = 'postbit';
break;
}
}
And i added <if condition="is_member_of($bbuserinfo, 6)"> at the begining In the postbit_select template and </if> at the end so only Admins can use this.
Hope this helps you guys using normal postbit.
|