vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   user note link in postbit (https://vborg.vbsupport.ru/showthread.php?t=98540)

The Wise One 10-16-2005 03:02 PM

user note link in postbit
 
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.

Code:

<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

HTML Code:

                        <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:

Code:

<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.


All times are GMT. The time now is 07:43 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00948 seconds
  • Memory Usage 1,716KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)bbcode_html_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete