Announcement

Collapse
No announcement yet.

Little Help With Postbit...

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Little Help With Postbit...

    I am currently modifying the postbit template.. I have made it so that when you click the username, in the drop down list, there is now user notes... I have that functioning, but, I only want it to show for those that have permission... HOw can I accomplish this?

    Herei s the code I currently have

    Code:
        <tr><td class="vbmenu_option">
     <a href="usernote.php?$session[sessionurl]u=$userinfo[userid]"><phrase 1="$post[username]">$vbphrase[user_notes]</a></phrase></a></td></tr>
    Now that works fine and I can see the user notes option, but everyone else can as well...

    When I viewed the memberoptions templates... I noticed they used an If command that was this:

    Code:
        <if condition="$show['usernotes']">
    That worked for the viewing a memebers profile... Only people who are supposed to see the User Notes can see them in the profile...

    So I decided to add that little part to my code, thus having

    Code:
        <if condition="$show['usernotes']">
        <tr><td class="vbmenu_option">
     <a href="usernote.php?$session[sessionurl]u=$userinfo[userid]"><phrase 1="$post[username]">$vbphrase[user_notes]</a></phrase></a></td></tr>
        </if>
    But, now no one at all can see them...

    What have I dont wrong here?

    Thanks.
    Last edited by TripleH; Tue 9th Dec '03, 1:33pm. Reason: Fixed typo;)

  • #2
    Checkout your </if? tag..

    shoud be </if>
    Chamber of Secrets - The Ultimate Harry Potter Community!

    Comment


    • #3
      That was a type when I posted that.. lol.. But it is the </if> in the template... I just dont get why it wont work.. lol

      Comment


      • #4
        Give this a shot, but keep in mind i haven't fully tested it It worked for what i tried on my test boards at least:

        Code:
        <if condition="($post['userid'] == $bbuserinfo['userid'] AND $permissions['genericpermissions'] & CANVIEWOWNUSERNOTES) OR ($post[userid] != $bbuserinfo['userid'] AND $permissions['genericpermissions'] & CANVIEWOTHERSUSERNOTES)">
        [Edit note: fixed some mistakes ]
        (just reupdated this again, appears to work)
        Last edited by Babylon; Tue 9th Dec '03, 1:38pm.

        Comment


        • #5
          When I do that, everyone is able to see the links to the User Notes Thanks though for trying I appreciate it

          Just noticed you updated it... trying the new version.

          Comment


          • #6
            It worked. Thanks very much.. !!

            Comment


            • #7
              Originally posted by TripleH
              It worked. Thanks very much.. !!
              Glad i could help I only had a minor problem where the link will still show (for those who have permissions) if you have "Can View Notes About Self" set to yes" but "Can set notes about this group" to no. That's just minor picky detail
              Last edited by Babylon; Tue 9th Dec '03, 2:00pm.

              Comment


              • #8
                Weird, I can see the notes link about myself... lol

                Comment


                • #9
                  Originally posted by TripleH
                  Weird, I can see the notes link about myself... lol
                  I couldn't work that one out, but my newly edited post has details of the work around.. sort of

                  Just make sure you set Can View User Notes About Self to No if you also have User Notes Can Be Posted About This Group set to No

                  Comment

                  widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                  Working...
                  X