Quote:
Originally Posted by Steve M
I have usergroup perms setup to allow each person of the usergroup to: - View Quote
- Add Quote
- Delete Own Quotes
- Delete Others Quote
For the life of me the vars I use won't work.
So here it is.
Plugin: global_start - Usergroup Permissions
PHP Code:
$canaddquote = $permissions['bfc_quote'] & $vbulletin->bf_ugp['bfc_quote']['canaddquote']; $candeleteown = $permissions['bfc_quote'] & $vbulletin->bf_ugp_bfc_quote['candeleteown']; $candeleteothers = $permissions['bfc_quote'] & $vbulletin->bf_ugp_bfc_quote['candeleteothers']; $canviewquote = $permissions['bfc_quote'] & $vbulletin->bf_ugp_bfc_quote['canviewquote'];
Next plugin: usercp_complete - Template Edit
PHP Code:
$find = '$template_hook[usercp_navbar_bottom]'; $usersid = $vbulletin->userinfo['userid']; $replace = '<if condition=\"$canaddquote\"><tr><td class=\"thead\">Quotes</td></tr><tr><td class=\"alt2\" nowrap=\"nowrap\"><a class=\"smallfont\" href=\"quote.php?$session[sessionurl]do=addquote&userid=$usersid\">Add New</a></td></tr></if>'; $vbulletin->templatecache['USERCP_SHELL'] = str_replace($find, $replace . $find, $vbulletin->templatecache['USERCP_SHELL']);
Next is template: memberinfo_block_bfc_quote (part of MEMBERINFO templates)
HTML Code:
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="thead" width="25%">Quoted Who</td>
<td class="thead" width="<if condition="$candeleteown OR $candeleteothers">65%<else />75%</if>">Quote</td>
<if condition="$candeleteown OR $candeleteothers">
<td class="thead" width="10%">Options</td>
</if>
</tr>
<div class="alt1 block_row">
<ul class="list_no_decoration">
$block_data[bfc_quote]
</ul>
</div>
</table>
Now anytime I try to use the variables nothing happens and the if condition's I'm sure are correct.
So any help much appreciated. This is the last step then I can update the mod on here.
Thanks
Steve
|
Forget the old "<if, <else /> </if>". Now the correct are:
Code:
<vb:if condition.......>
<vb:else />
......
</vb:if>
Maria