Add A Private Message Button?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Bounce
    Senior Member
    • Feb 2005
    • 640
    • 4.2.x

    [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
  • Mark.B
    vBulletin Support
    • Feb 2004
    • 24286
    • 6.0.X

    #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
    ------------
    My Unofficial vBulletin 6.0.0 Demo: https://www.talknewsuk.com
    My Unofficial vBulletin Cloud Demo: https://www.adminammo.com

    Comment

    • Bounce
      Senior Member
      • Feb 2005
      • 640
      • 4.2.x

      #3
      Originally posted by Mark.B
      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>
      
      
      [B]<!-- ////////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////// -->[/B]
      
      					</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

      • Mark.B
        vBulletin Support
        • Feb 2004
        • 24286
        • 6.0.X

        #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
        ------------
        My Unofficial vBulletin 6.0.0 Demo: https://www.talknewsuk.com
        My Unofficial vBulletin Cloud Demo: https://www.adminammo.com

        Comment

        • Bounce
          Senior Member
          • Feb 2005
          • 640
          • 4.2.x

          #5
          Originally posted by Mark.B
          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

          • Mark.B
            vBulletin Support
            • Feb 2004
            • 24286
            • 6.0.X

            #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
            ------------
            My Unofficial vBulletin 6.0.0 Demo: https://www.talknewsuk.com
            My Unofficial vBulletin Cloud Demo: https://www.adminammo.com

            Comment

            • Bounce
              Senior Member
              • Feb 2005
              • 640
              • 4.2.x

              #7
              Originally posted by Mark.B
              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

              • Mark.B
                vBulletin Support
                • Feb 2004
                • 24286
                • 6.0.X

                #8
                Originally posted by Bounce
                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
                ------------
                My Unofficial vBulletin 6.0.0 Demo: https://www.talknewsuk.com
                My Unofficial vBulletin Cloud Demo: https://www.adminammo.com

                Comment

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