Log in

View Full Version : user note link in postbit


The Wise One
10-16-2005, 03:02 PM
in 3.0.x i used the code below (in postbit and postbit_legacy) to display a link to a members user notes in the drop down menu that appears after clicking on a users name in posts. this link was only visible to those who had permissions to see it.


<if condition="($post['userid'] == $bbuserinfo['userid'] AND $permissions['genericpermissions'] & CANVIEWOWNUSERNOTES) OR ($post[userid] != $bbuserinfo['userid'] AND $permissions['genericpermissions'] & CANVIEWOTHERSUSERNOTES)">
<tr><td class="vbmenu_option">
<a href="usernote.php?$session[sessionurl]u=$userinfo[userid]"><phrase 1="$post[username]">$vbphrase[user_notes_for_x]</phrase></a>
</td></tr>
</if>

i attempted to use this code with 3.5 but it no longer works. it wont display the link in the menu for those who have the permissions set to do so. can anyone offer any assistance to get this working?

TIA

peterska2
10-16-2005, 11:04 PM
Try

<if condition="$show['usernotes']">
<div class="fieldset">
<div style="padding:$stylevar[formspacer]px">
$vbphrase[user_notes]:
<if condition="$show['usernoteview']">
<strong>$usernote[total]</strong> [<a href="usernote.php?$session[sessionurl]u=$userinfo[userid]">$vbphrase[view]</a>]
</if>


It might not work exactly but that's taken from the MEMBERINFO template.

I haven't tested it.

The Wise One
10-17-2005, 12:03 AM
thanks for the suggestion. i tried parts of that previously without luck. i ended up using this:

<if condition="in_array($bbuserinfo['usergroupid'], array(5,6,7))">
<tr><td class="vbmenu_option"><a href="usernote.php?$session[sessionurl]u=$post[userid]"><phrase 1="$post[username]">$vbphrase[user_notes_for_x]</phrase></a></td></tr>
</if>
it suits our purposes because only moderators (and above) can view/edit/add/etc...usernotes.