Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Looking for script: 'Recommend this Site'

  1. #1
    Join Date
    Jan 2007
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Looking for script: 'Recommend this Site'

    I am looking for a script that allows my visitors to recommend my website. The scripts I have come across are fairly involved and I just want a really simple click and send procedure...nothing fancy.

    Thanks for the help!

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    I'm afraid that this sort of script is invariably going to involve server-side scripting, though it needn't be too involved. What server-side languages do you have enabled on your server?
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    What are you asking? A comment? A recommend to a friend thing? A way to copy a link to your site? What?
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  4. #4
    Join Date
    Jan 2007
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    A recommend to a friend thing?

  5. #5
    Join Date
    Jan 2007
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I am trying to understand PFP to make this work...

  6. #6
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    Quote Originally Posted by gogogadget View Post
    I am trying to understand PFP to make this work...
    Do you mean PHP? Well, if you do, PHP is pretty simple to learn, especially if you want to make your own "Recommend This Site" script. I made a couple a while back and I believe I posted them on here, but I can't seem to find them. Basically, all you need to accomplish this is use a HTML form with a few fields. After that, you need the PHP script to process the data submitted and send a message to either just the one person, or mulitple persons at one time by email. Let me know if you need any further help on it.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  7. #7
    Join Date
    Jan 2007
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Yes, PHP (oops).

    Here is the code I am using as a reference:

    <head>

    <script>

    var ns6=document.getElementById&&!document.all

    function restrictinput(which, maxlength, e){
    if (document.all&&which.value.length>=maxlength){
    return false
    }
    else if (!document.all&&which.value.length>=maxlength){
    var pressedkey=/[a-zA-Z0-9\.\,\/]/ //detect alphanumeric keys
    if (pressedkey.test(String.fromCharCode(e.which)))
    return false
    }
    }

    function checklength(what){
    if (what.message.value.length>200){
    alert ("Please restrict personal message to <200 characters")
    what.message.focus()
    return false
    }
    }

    function alertdefault(){
    alert('This is an email from your friend recommending to you our site http://www.dynamicdrive.com Dynamic Drive is the #1 DHTML site online, featuring 100s of free, original DHTML scripts to enhance your site. Visit us at http://www.dynamicdrive.com')
    }

    </script>

    </head>


    <body>

    <body topMargin=3 marginheight=3>

    <form action="sitesuggest.php" method="post" onsubmit="return checklength(this)">
    <table border="0" width="100&#37;" cellspacing="0" cellpadding="2" bgcolor="#000080" height="28">
    <tr>
    <td width="100%"><b><font size="2" face="Verdana" color="#FFFFFF">&nbsp;Recommend
    DynamicDrive.com to a friend</font></b></td>
    </tr>
    </table>
    <p><font face="Verdana" size="2">Please use the below form to recommend Dynamic
    Drive to your peers and co-workers! You can recommend
    up to 5 friends at once:</font>
    <b><br><font color="#FFFFFF"><small>.</small></font></b></p>

    <div align="center">
    <center>
    <div align="center">
    <table border="0" width="450" cellspacing="0" cellpadding="0">
    <tr>
    <td width="100%">
    <table border="0" width="450" cellspacing="0" cellpadding="3">
    <tr>
    <td width="50%">
    <p align="center"><b>Your name</b></td>
    <td width="50%">
    <p align="center"><b>Your E-mail address</b></td>
    </tr>
    <tr>
    <td width="50%">
    <p align="center"><input type="text" name="userName" size="20"></td>
    <td width="50%">
    <p align="center"><input type="text" name="userEmail" size="25"></td>
    </tr>
    <tr>
    <td width="50%"><font color="#FFFFFF" size="1">.</font></td>
    <td width="50%"></td>
    </tr>
    <tr>
    <td width="50%">

    <p align="center"><b>Friend's name</b></td>
    <td width="50%">
    <p align="center"><b>Friend's E-mail address</b></td>
    </tr>
    <tr>
    <td width="50%">
    <p align="center"><input type="text" name="friendName[]" size="20"></td>
    <td width="50%">
    <p align="center"><input type="text" name="friendEmail[]" size="25"></td>
    </tr>
    <tr>
    <td width="50%">
    <p align="center"><input type="text" name="friendName[]" size="20"></td>
    <td width="50%">
    <p align="center"><input type="text" name="friendEmail[]" size="25"></td>
    </tr>
    <tr>
    <td width="50%">
    <p align="center"><input type="text" name="friendName[]" size="20"></td>
    <td width="50%">
    <p align="center"><input type="text" name="friendEmail[]" size="25"></td>
    </tr>
    <tr>
    <td width="50%">
    <p align="center"><input type="text" name="friendName[]" size="20"></td>
    <td width="50%">
    <p align="center"><input type="text" name="friendEmail[]" size="25"></td>
    </tr>
    <tr>
    <td width="50%">
    <p align="center"><input type="text" name="friendName[]" size="20"></td>
    <td width="50%">
    <p align="center"><input type="text" name="friendEmail[]" size="25"></td>
    </tr>
    </table>
    </td>
    </tr>
    <tr>
    <td width="100%" align="center">
    <p align="center"><br>
    <b><a href="#" onClick="alertdefault();return false">View Default message added</a></b><br>
    <br>
    <b>Add your personal message (optional):</b><br>
    <textarea rows="4" name="message" cols="32" wrap="virtual" onkeypress="return restrictinput(this, 200, event)"></textarea></p>
    <p align="center"><input type="submit" value="Recommend Dynamic Drive" name="B1">
    </td>
    </tr>
    </table>
    </div>
    </center>
    </div>
    </form>

    <p align="center"><font size="1" face="Arial">CopyRight &#169; 1998-2002 <a href="http://www.dynamicdrive.com">Dynamic
    Drive</a>.</font>

    </p>

    </body>

    What I don't understand is the sitesuggest.php part and how to write that to process the data. I understand it is needed, but I just don't know how to proceed.

    Thanks again!!!

  8. #8
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    Give me a little while, see if I can set something up, then I'll post it here (if no one else has done so before.)
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  9. #9
    Join Date
    Jan 2007
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks again...I REALLY appreciate the guidance!!!

  10. #10
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    Do you mean for the current user to click a button that sends an email to this person they want to suggest your site to?
    - Mike

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •