Announcement

Collapse
No announcement yet.

"Sent to a Friend" button

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

  • "Sent to a Friend" button

    I would like to place a "Send to Friend" email button to the left of the "Post Reply" button on the thread entry window. This button when pushed would send either the URL of the thread entry, or better still the contents of the thread entry.

    I feel the "Email this page" in the "Thread Tools" drop down list is hidden and I would like to make this facility more prominent. I would like the button to look the same as the “Post Reply“ button.

    I’m not a programmer, so any solution would have to be in idiot speak.

    I’m sure this is an easy thing to do, so any help would be greatly appreciated.

  • #2
    Admin CP -> Styles & Templates -> Style Manager -> « » -> Show Thread Templates -> SHOWTHREAD

    Add the red code:

    Code:
    <!-- controls above postbits -->
    <table cellpadding="0" cellspacing="0" border="0" width="100%" style="margin-bottom:3px">
    <tr valign="bottom">
    	[color=red]<td class="smallfont" width="120">
    		<img class="inlineimg" src="$stylevar[imgdir_button]/sendtofriend.gif" alt="$vbphrase[email_this_page]" /> <a href="sendmessage.php?$session[sessionurl]do=sendtofriend&amp;t=$threadid" rel="nofollow">$vbphrase[email_this_page]</a>
    	</td>[/color]
    	<if condition="$show['largereplybutton']">
    		<td class="smallfont"><a href="newreply.php?$session[sessionurl]do=newreply&amp;noquote=1&amp;p=$FIRSTPOSTID" rel="nofollow"><if condition="$show['closethread']"><img src="$stylevar[imgdir_button]/reply.gif" alt="$vbphrase[reply]" border="0" /><else /><img src="$stylevar[imgdir_button]/threadclosed.gif" alt="$vbphrase[closed_thread]" border="0" /></if></a></td>
    	<else />
    		<td class="smallfont">&nbsp;</td>
    	</if>
    	<if condition="$show['pagenav']"><td align="$stylevar[right]">$pagenav</td></if>
    </tr>
    </table>
    <!-- / controls above postbits -->

    Comment


    • #3
      Jake, many many thanks it worked.

      However, I see in my post I said to the left, but I really ment to the right of the "Post Reply" button. Do I just move the code to another part of Showthread?

      Comment


      • #4
        Move it down a bit:

        Code:
        <!-- controls above postbits -->
        <table cellpadding="0" cellspacing="0" border="0" width="100%" style="margin-bottom:3px">
        <tr valign="bottom">
        	<if condition="$show['largereplybutton']">
        		<td class="smallfont"><a href="newreply.php?$session[sessionurl]do=newreply&amp;noquote=1&amp;p=$FIRSTPOSTID" rel="nofollow"><if condition="$show['closethread']"><img src="$stylevar[imgdir_button]/reply.gif" alt="$vbphrase[reply]" border="0" /><else /><img src="$stylevar[imgdir_button]/threadclosed.gif" alt="$vbphrase[closed_thread]" border="0" /></if></a></td>
        	<else />
        		<td class="smallfont">&nbsp;</td>
        	</if>
        	[color=red]<td class="smallfont" width="120">
        		<img class="inlineimg" src="$stylevar[imgdir_button]/sendtofriend.gif" alt="$vbphrase[email_this_page]" /> <a href="sendmessage.php?$session[sessionurl]do=sendtofriend&amp;t=$threadid" rel="nofollow">$vbphrase[email_this_page]</a>
        	</td>[/color]
        	<if condition="$show['pagenav']"><td align="$stylevar[right]">$pagenav</td></if>
        </tr>
        </table>
        <!-- / controls above postbits -->

        Comment


        • #5
          Jake, I moved it down, but it doesn't display. Do you think it's because of the class="inlineimg"? Should I remove this?

          Comment


          • #6
            Jake, my apologies, the image is there, but it is over on the far right of the screen, not next to the "Post Reply" button. Can it be position next to the "Post Reply" button, just to the right of it?

            Comment


            • #7
              You will need to adjust the widths and alignments. For example:

              Code:
              <!-- controls above postbits -->
              <table cellpadding="0" cellspacing="0" border="0" width="100%" style="margin-bottom:3px">
              <tr valign="bottom">
              	<if condition="$show['largereplybutton']">
              		<td class="smallfont" [color=red]width="120"[/color]><a href="newreply.php?$session[sessionurl]do=newreply&amp;noquote=1&amp;p=$FIRSTPOSTID" rel="nofollow"><if condition="$show['closethread']"><img src="$stylevar[imgdir_button]/reply.gif" alt="$vbphrase[reply]" border="0" /><else /><img src="$stylevar[imgdir_button]/threadclosed.gif" alt="$vbphrase[closed_thread]" border="0" /></if></a></td>
              	<else />
              		<td class="smallfont">&nbsp;</td>
              	</if>
              	[color=red]<td class="smallfont" width="120" align="left">
              		<img class="inlineimg" src="$stylevar[imgdir_button]/sendtofriend.gif" alt="$vbphrase[email_this_page]" /> <a href="sendmessage.php?$session[sessionurl]do=sendtofriend&amp;t=$threadid" rel="nofollow">$vbphrase[email_this_page]</a>
              	</td>[/color]
              	<if condition="$show['pagenav']"><td align="$stylevar[right]">$pagenav</td></if>
              </tr>
              </table>
              <!-- / controls above postbits -->

              Comment


              • #8
                Jake,

                Two things:

                (a) I made the changes, and now the "send to a friend" is in the middle of the bar, not adjacent to the "Post Reply" button. I have a wide screen PC so this might be causing it to display this way.

                (b) I think the answer maybe no, but instead of placing the URL of the thread item in the “send to a friend” email”, can the contents of the thread item be extracted and placed in the “send to a friend” email?

                Comment


                • #9
                  Jake,

                  I would like to place the subject of the "send to a friend" email into the body of "sendtofriend". I think it can be done using a vBulletin $bb variable, but I'm nor sure how it's done and which one to use. Can you help?

                  Could you also tell me where I can find a list of the vBulletin variables and their functions?

                  Thanks in advance for your help in this matter.

                  Comment


                  • #10
                    If the positioning is off then you will need to modify the HTML layout code in that template to make it look like what you want.

                    You can edit the email in your:

                    Admin CP -> Languages & Phrases -> Search in Phrases

                    Search for "sendtofriend" in the Phrase Variable Name Only. Edit the matching phrase.

                    I don't know of any variable to include the post text of the thread. There is no standard list of available variables to use in phrases. It depends on the scope when the phrase is called. If no one else here is able to help with a specific variable then I recommend you post on www.vbulletin.org.

                    Comment


                    • #11
                      Jake,

                      Thanks for the reply.

                      Apologies, but I think you misunderstood one of my questions. I didn’t word it very well.

                      When I click the "send to a friend" icon, a Form is presented on the screen. With your help I found the phrase that contains the Form text and have made the changes I wanted. However, what I would like to do is to include the title of the thread entry within the Form text. The Form has a field called "Email subject" and it contains the Title of the thread. So the forum software has picked up this title somehow. Can you tell me how I can get access to the thread title?

                      For example - if the title of the thread entry is "How to bake a cake", I would like to say in the email text ‘I found this item titled "How to Bake a Cake" on the Forum called xxxxxxx’.

                      You have the title in the Email Subject, so I assume it is stored somewhere and should be fairly easy to include it in the email text.

                      Comment


                      • #12
                        I believe that requires modifying the code. We cannot officially support code modifications or forums running modified code, however you can try searching or asking for help with this over at www.vbulletin.org.
                        Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
                        Change CKEditor Colors to Match Style (for 4.1.4 and above)

                        Steve Machol Photography


                        Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


                        Comment


                        • #13
                          Steve,

                          In the sendtofriend phrase you such things as $bbuserinfo[username] and $vboptions[bbtitle]. I'm assumming these are variables which contain user and option information. Are you saying that you don't have any equivalent variables for thread information?

                          You must have something because the thread title is placed in the Email subject on the send to a friend email when it appears on my screen.

                          Here's what I would like to do. In the sendtofriend phrase, I would like to say the following:

                          $sendtoname,

                          Thread Titled: (the title would be inserted here via one of your $bb variable)

                          This is a message from $bbuserinfo[username] ( mailto:$bbuserinfo[email] ) from the $vboptions[bbtitle] ( $vboptions[bburl]/ ).

                          The message is as follows:

                          $emailmessage

                          Comment


                          • #14
                            I still believe this requires modifying the code, however you can try those variable to see if they work.
                            Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
                            Change CKEditor Colors to Match Style (for 4.1.4 and above)

                            Steve Machol Photography


                            Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


                            Comment


                            • #15
                              I need the same kind of button with a slight twist. Is there any easy way to bypass the form and just send the link to a defined email address? I need the email address to always be the same for this button and I don't want people adding commentary. I just want them to push the button and the link is sent.

                              Any help is greatly appreciated!

                              Comment

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