Tell A Friend Script

Collapse
This topic is closed.
X
This is a sticky topic.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • navaldesign
    General & Forum Moderator

    • Oct 2005
    • 12080

    Tell A Friend Script

    I’ve seen in many posts that members of the forum are asking for a “Tell a Friend” script, so I thought I could prepare one, using Bluevoda.
    The script itself consists of two parts: the visual part, which is a simple form built directly in Bluevoda, and the processing script which is built in php. The script is called “TAF.php” .

    To see, test and download all necessary material please click here.

    These are the instructions for installing our TAF script. Please follow to the letter, to avoid errors. The procedure is quite simple, and it only involves publishing the relevant pages on your site, and uploading through FTP or File Manager, the TAF.php file that is required to send the mail.
    By following these steps, the TAF form will appear in a popup, leaving the original page as it is. However, you can also implement the form directly in your pages, as explained in step 4.

    Step 1.

    You will find 5 .bvp files in this zip. They are:

    1. TAFemailerror.bvp
    2. TAFspamerror.bvp
    3. TAFreturn.bvp
    4. TAFform.bvp
    5. TAFbuttons.bvp

    Open pages 1 – 3 in BV. Customize colours if you wish. Save the pages and publish them on your site.

    Open page 4 in BV. Customize colours if you wish. Now, double click on the form. The form includes two hidden fields: Subject and Mailbody.

    Double click on the first hidden field (Subject) and change it to whatever you want your mail subject to be, i.e. “ Found an interesting site!
    Double click on the second hidden field (Mailbody), and change it to whatever you want your mailbody to be, i.e. “ I have found this site to be very interesting. Click on www.dbtechnosystems.com to visit! “.

    As you see, in the mailbody, you must include the link to your site.

    The rest of the form settings is already setup by us:

    Action: TAF.php
    Encoding: multipart / formdata
    Method = POST





    Ok, now you SAVE your form (as TAFform) and publish it.

    Step 2.

    Upload on the server, using either FTP or File Manager, the “ TAF.php “ file that you have found in the zip. No editing is required.

    Step 3.

    Now you need to place in your pages, a TAF button. Open the “ TAFbuttons “ page that came with the zip, and open your own page as well.

    Copy whichever TAF button you like, and simply paste it in your own page. Save your page and publish it. Test it ! Please note that it will only work when published, not in preview.

    If you wish to use a button of your own or one you have found in the VodaHost TAF Buttons Library , you will need to link it to the script. To do so, in BV, click on the TAF button, and when the Image Properties dialog box appears, click on Link, then in the URL field, paste the following code:


    #" onClick="window.open('TAFform.html', '','width=310,height=170'); return false;"







    That’s all. Save your page and publish it. Test it !

    Step 4. Only read if you don’t want the TAF form in a popup

    You can implement the TAF form directly in your pages. To do so, just copy the form in your page. Customize it as explained in step 1. You will also need to modify the TAFemailerror.bvp, TAFspamerror.bvp, and TAFreturn.bvp to become full size pages. Save and publish them.

    That’s all !


    Please note that I have put a “Hi $friendname” as a salute before the mailbody.

    If you need further information or clarifications, please contact me here

    Thankyou!
    Navaldesign
    Logger Lite: Low Cost, Customizable, multifeatured Login script
    Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
    DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
    Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

  • Girlonthehill
    General

    • Oct 2005
    • 4193

    #2
    Re: Tell A Friend Script

    Nice one, Naval! You are Mr Helpful. Even with all this stress flying about! Lol.

    VodaHost

    Your Website People!
    1-302-283-3777 North America / International
    02036089024 / United Kingdom
    291916438 / Australia

    ------------------------

    Top 3 Best Sellers

    Web Hosting - Unlimited disk space & bandwidth.

    Reseller Hosting - Start your own web hosting business.

    Search Engine & Directory Submission - 300 directories + (Google,Yahoo,Bing)


    Comment

    • cjfoster
      Corporal

      • Mar 2006
      • 19

      #3
      Re: Tell A Friend Script

      Hi again Naval,

      I followed your instructions BUT I've done something wrong it seems. I get the following error message when clicking on my "tell a friend' button

      Parse error: parse error, unexpected '@' in /home/bziipuvf/public_html/tellafriend/tellafriend.php on line 21


      Any ideas please?

      Thanks much!
      Claudette

      Comment

      • Nyoman
        Major

        • Sep 2005
        • 426

        #4
        Re: Tell A Friend Script

        check your tellafriend.php using php editor and see on line 21. there you will see @ which is unexpected for your script
        .
        .
        Nyoman

        Comment

        • navaldesign
          General & Forum Moderator

          • Oct 2005
          • 12080

          #5
          Re: Tell A Friend Script

          Line 21 should look like this if you have not changed anything:

          $mail->From = $youremail;

          Most probably you have indeed put in some @ not needed there , f.e. typing in your real email address. (in this line, your email address is already included automatically, you MUST NOT change the line by typingg your real email address)
          Navaldesign
          Logger Lite: Low Cost, Customizable, multifeatured Login script
          Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
          DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
          Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

          Comment

          • cjfoster
            Corporal

            • Mar 2006
            • 19

            #6
            Re: Tell A Friend Script

            Naval,

            Yes, You are right! I did indeed insert our email address where I shouldn't have. The form works 100% now.

            Well that's it! I have finished our web page ... with the help of this forum and you.

            What fun!

            My eternal gratitude to all.

            Comment

            • Carl II
              Sergeant

              • Jun 2006
              • 23

              #7
              Re: Tell A Friend Script

              Hi Naval,

              I was determent on getting this T-A-F script to work. But I surrender L I tried several nights, but I keep ending up with the same message: [cannt find page] and http://www.snelensimpeleengratiswebsitebouwen.com/tellafriend.php in the adresbox. So I guess I didn’t upload tellafriend.php in the right folder or something like that. Could you please explain in what folder I should upload that and the other 2 files?

              I DID check both password and username in the PHP script a zillion times. That is by the way the only change I made in that script. The other two I didn’t even op.

              Your help would be extremely appreciated.

              Carl

              Comment

              • navaldesign
                General & Forum Moderator

                • Oct 2005
                • 12080

                #8
                Re: Tell A Friend Script

                ALL files should be uploaded in the same folder where your page (the one with the TAF form) is. If snelensimpeleengratiswebsitebouwen.com is your main domain, then the correct folder is your public_html folder, if it is an addon domain, then the correct folder is the default folder of this domain.
                It seemes as though none of the three php files are uploaded in the correct folder.
                You also have one more problem: you have draged the reset button outside the form area, so it doesn't work.
                Navaldesign
                Logger Lite: Low Cost, Customizable, multifeatured Login script
                Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
                DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
                Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

                Comment

                • blnda84
                  Sergeant First Class

                  • Jul 2006
                  • 53

                  #9
                  Re: Tell A Friend Script

                  Hi Naval,

                  Just sent you an email. Since I've emailed you I have been doing some tweaking and hoping to get it right. The reset is fine and I've got the submit to go to my thank you page, but I've been testing and not getting the email. Also even when I click submit without putting anything in the fields it goes to my thank you page instead of message not sent. :(
                  Belinda B.
                  BB Destination Express

                  Comment

                  • navaldesign
                    General & Forum Moderator

                    • Oct 2005
                    • 12080

                    #10
                    Re: Tell A Friend Script

                    There is no "Message not sent" page, this is a very essential script. Validation can be added however if you wish, with just three addiational lines of code. I tried it too and got no mail, so i suppose there is something wrong that you have done with the script. Please post the php script here, excactly as you have modified and uploaded it.
                    Navaldesign
                    Logger Lite: Low Cost, Customizable, multifeatured Login script
                    Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
                    DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
                    Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

                    Comment

                    • blnda84
                      Sergeant First Class

                      • Jul 2006
                      • 53

                      #11
                      Re: Tell A Friend Script

                      Hi Naval,

                      Here is my script:

                      <?php
                      require("class.phpmailer.php");
                      @$name = addslashes($_POST['name']);
                      @$friendname = addslashes($_POST['friendname']);
                      @$email = addslashes($_POST['email']);
                      @$subject = addslashes($_POST['subject']);
                      @$message = addslashes($_POST['message']);
                      @$youremail = addslashes($_POST['youremail']);

                      $mail = new PHPMailer();
                      $mail->IsSMTP(); // send via SMTP
                      $mail->Host = "localhost"; // SMTP servers
                      $mail->SMTPAuth = true; // turn on SMTP authentication
                      $mail->Username = "xxxxxxxx"; // SMTP username
                      $mail->Password = "jjjjjjjj"; // SMTP password
                      $mail->From = $youremail; // Your emailin your account
                      $mail->FromName = "Your Title";// The From name you want to appear in the email
                      $mail->AddAddress($email); //the receiver's email'
                      $mail->WordWrap = 50; // set word wrap
                      $mail->Subject = "$subject $name\n";
                      $mail->Body = "Hi $friendname\n"
                      . "$message\n "
                      . " \n"
                      . " Bye $name\n";
                      if(!$mail->Send())
                      {
                      echo "Message was not sent <p>";
                      echo "Mailer Error: " . $mail->ErrorInfo;
                      exit;
                      }
                      header("Location: tell_a_friend.html"); // returnpage is the same page of the form or another of your choice.

                      ?>


                      How do I add the script "Message not sent" ?
                      Belinda B.
                      BB Destination Express

                      Comment

                      • navaldesign
                        General & Forum Moderator

                        • Oct 2005
                        • 12080

                        #12
                        Re: Tell A Friend Script

                        You do not have a script problem, you have a form problem. You have modified the "Tell a friend" button. It is no longer a submitbutton, but it has become a "On click" button, linked directly to the "thanku_tell.html" Page. The info is not evan submitted to the script, when you click on "Tell a friend" you go straight to the Thanktou page.

                        The same goes for the Reset button: it doesn't reset, you have also made it a "On click" button, with it's action set to refresh the page. It does reset, but because it reloads the page.

                        Also, both buttons are OUTSIDE the form area, this is why initially they didn't work, then you started touching here and there.


                        Also change the metatags; Page description, keywords, Author etc: they result to be still mine (as you have downloaded my original script and didn't edit these elements)
                        Plese follow these steps:

                        1. open the page in Bv.
                        2. stretch the form area towards the bottom of the page, enough to have the buttons inside the form.
                        3. Copy the two buttons.
                        4. Delete them
                        5. Paste them using the Paste icon in the top toolbar (this way they will be pasted excactly in the same position).
                        6. Double click on the Reset button, and edit it: make it "reset" instead of "On click"
                        7. Do the same with the submit button, make it "Submit" instead of "On click"
                        Save, Publish and try your form
                        Navaldesign
                        Logger Lite: Low Cost, Customizable, multifeatured Login script
                        Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
                        DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
                        Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

                        Comment

                        • blnda84
                          Sergeant First Class

                          • Jul 2006
                          • 53

                          #13
                          Re: Tell A Friend Script

                          Hey Naval,

                          I went back and corrected everything you told me to. The reset button works fine now and also it goes where it needs to go if you just click the submit button...goes to an error page. But when I put in a test info with my email address it still gives this error after I click submit:

                          Warning: fsockopen() [function.fsockopen]: unable to connect to localhost:25 in /home2/ooiroorl/public_html/class.smtp.php on line 105
                          Message was not sent
                          Mailer Error: Language string failed to load: connect_host
                          Belinda B.
                          BB Destination Express

                          Comment

                          • blnda84
                            Sergeant First Class

                            • Jul 2006
                            • 53

                            #14
                            Re: Tell A Friend Script

                            Can anyone help me correct this problem?
                            Belinda B.
                            BB Destination Express

                            Comment

                            • navaldesign
                              General & Forum Moderator

                              • Oct 2005
                              • 12080

                              #15
                              Re: Tell A Friend Script

                              Please use myform to send me the entire php script, and also send me the .bvp file of the page with the tell a friend script. Or, send me your loggin info (IP, username and password) as well as your email password (the password used for your email account, the one used for sending the mail) and i will fix it for you.
                              Navaldesign
                              Logger Lite: Low Cost, Customizable, multifeatured Login script
                              Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
                              DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
                              Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

                              Comment

                              Working...
                              X