Announcement

Collapse
No announcement yet.

Add A Private Message Button?

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

  • [Forum] Add A Private Message Button?

    Hi,

    I'm trying to add a 'SEND PM' Button in the postbit, i'm using this code but its only showing for admins and users are not seeing the PM link/button

    Code:
    <vb:if condition="$show['pmlink']"><a class='pminpostbit' href="private.php?{vb:raw session.sessionurl}do=newpm&amp;u={vb:raw post.userid}" rel="nofollow"><img src="{vb:raw vboptions.cleargifurl}" alt="{vb:rawphrase send_pm}" />SEND PM</a>
    Any idea's?

    Cheers

  • #2
    You're missing the closing </vb:if> tag...I suspect you're putting the code in the wrong place and probably wrapped up in the EDIT conditional, or similar.
    Need to see really where you've tried to put it.
    MARK.B | vBULLETIN SUPPORT

    TalkNewsUK - My vBulletin 5.5.2 Demo
    AdminAmmo - My Cloud Demo

    Comment


    • #3
      Originally posted by Mark.B View Post
      You're missing the closing </vb:if> tag...I suspect you're putting the code in the wrong place and probably wrapped up in the EDIT conditional, or similar.
      Need to see really where you've tried to put it.
      Thanks mark, aye sorry, forgot to add the </vb:if> here, ive got it in the template, have it placed in postbit_legacy as ideally want beside the edit button.

      Code:
      <vb:if condition="THIS_SCRIPT != 'usernote' && THIS_SCRIPT != 'announcement'"><span class="seperator">&nbsp;</span></vb:if>
      
      
      <!-- ////////start PM button in postbit////// -->
      <vb:if condition="$show['pmlink']"><a class='pminpostbit' href="private.php?{vb:raw session.sessionurl}do=newpm&amp;u={vb:raw post.userid}" rel="nofollow"><img src="{vb:raw vboptions.cleargifurl}" alt="{vb:rawphrase send_pm}" />SEND PM</a>
                                              
      <!-- ////////end PM button in postbit////// -->
      
      					</vb:if>
      					<vb:if condition="$show['quickreply'] AND !$show['threadedmode']">
      						<a id="qr_{vb:raw post.postid}" class='quickreply' href="{vb:raw post.replylink}&amp;noquote=1" rel="nofollow" title="{vb:rawphrase quick_reply_to_this_message}"><img id="replyimg_{vb:raw post.postid}" src="{vb:raw vboptions.cleargifurl}" alt="{vb:rawphrase quick_reply_to_this_message}" /> {vb:rawphrase reply}</a> 
      					<span class="seperator">&nbsp;</span>
      					</vb:if>
      					<vb:if condition="$post['replylink']">
      						<a id="qrwq_{vb:raw post.postid}" class="newreply" href="{vb:raw post.replylink}" rel="nofollow" title="{vb:rawphrase reply_with_quote}"><img id="quoteimg_{vb:raw post.postid}" src="{vb:raw vboptions.cleargifurl}" alt="{vb:rawphrase reply_with_quote}" />  <vb:if condition="$post['forwardlink']">{vb:rawphrase reply_to_private_message}<vb:else />{vb:rawphrase reply_with_quote}</vb:if></a> 
      					<vb:if condition="$show['multiquote_post']"><span class="seperator">&nbsp;</span></vb:if>
      Its weird as admins see it in all users posts but users only see it in there own posts, pretty pointless them PM'ing themselves LOL

      Comment


      • #4
        Need to put it after the second </vb:if>

        Find this code:
        Code:
        <vb:if condition="THIS_SCRIPT != 'usernote' && THIS_SCRIPT != 'announcement'"><span class="seperator">&nbsp;</span></vb:if>
        					</vb:if>
        Add it after there.

        On my test site it shows up fine to regular members.
        In your code you've added it after ONE closing </vb:if>, not two.
        MARK.B | vBULLETIN SUPPORT

        TalkNewsUK - My vBulletin 5.5.2 Demo
        AdminAmmo - My Cloud Demo

        Comment


        • #5
          Originally posted by Mark.B View Post
          Need to put it after the second </vb:if>

          Find this code:
          Code:
          <vb:if condition="THIS_SCRIPT != 'usernote' && THIS_SCRIPT != 'announcement'"><span class="seperator">*</span></vb:if>
          					</vb:if>
          Add it after there.

          On my test site it shows up fine to regular members.
          In your code you've added it after ONE closing </vb:if>, not two.
          Ahhhhhaaa, DOH!!! thanks very much mark

          Comment


          • #6
            You're welcome...glad it's sorted, sometimes those "simple" issues can be really frustrating if you just can't get it working.
            MARK.B | vBULLETIN SUPPORT

            TalkNewsUK - My vBulletin 5.5.2 Demo
            AdminAmmo - My Cloud Demo

            Comment


            • #7
              Originally posted by Mark.B View Post
              You're welcome...glad it's sorted, sometimes those "simple" issues can be really frustrating if you just can't get it working.
              aye mate and I had it working in my mobile style and was getting frustrated as to how it wasnt in the other styles, simply misplaced it lol...

              While im here, is it possible to stop it showing in my or other users own posts?

              Comment


              • #8
                Originally posted by Bounce View Post
                aye mate and I had it working in my mobile style and was getting frustrated as to how it wasnt in the other styles, simply misplaced it lol...

                While im here, is it possible to stop it showing in my or other users own posts?
                Try adding this conditional around it:
                Code:
                <vb:if condition = "$bbuserinfo['userid'] != $post['userid']">
                ...code here....
                </vb:if>
                Not tested but should work.....
                MARK.B | vBULLETIN SUPPORT

                TalkNewsUK - My vBulletin 5.5.2 Demo
                AdminAmmo - My Cloud Demo

                Comment

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