Login  |  Register
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome, Guest. Please login or register.
Did you miss your activation email?

August 10, 2022, 07:38:43 PM

Login with username, password and session length
Members
  • Total Members: 3842
  • Latest: Kokoro
Stats
  • Total Posts: 193479
  • Total Topics: 21088
  • Online today: 53
  • Online ever: 1035
  • (November 26, 2020, 04:45:12 AM)
Users Online
Users: 0
Guests: 38
Total: 38

Author Topic: Invite A Friend Block [side block]  (Read 28977 times)

0 Members and 1 Guest are viewing this topic.

akulion

  • Guest
Invite A Friend Block [side block]
« on: April 11, 2007, 10:49:51 PM »
Demo: http://path-to-peace.com/forum2/

How To:

1 - Download image and php file attached

2 - Open php file and alter these lines:
Code: [Select]
<META HTTP-EQUIV=REFRESH CONTENT="6;URL=http://path-to-peace.com/community">
Replace the address with your homepage (this is where the redirect takes place after sending the email) - Also the 6 is the time in seconds it takes to redirect, you can change it if you want.

Also in the same file find:
Code: [Select]
if you are not diverted in 10 seconds please <a href='http://path-to-peace.com/community/'>
Replace the address for your own

3- Place the following code in a SCRIPT SIDE BLOCK
Code: [Select]
<form method=post action=tellck.php>
      <table  border="0" cellpadding="0" cellspacing="0" align=center>
<tr bgcolor='#96C33C'><td colspan=2 align=center><font face='Verdana' size='2' ><b>TELL A FRIEND</b></font></td></tr>

<tr><td width=120><font face='Verdana' size='2' >Your Name</font></td></tr><tr><td width=120><input type=text name=y_name></td></tr>
<tr><td><font face='Verdana' size='2' >Your Email</font></td></tr><tr><td><input type=text name=y_email></td></tr>
<tr ><td><font face='Verdana' size='2' >Your Friend's Name</font></td></tr><tr><td><input type=text name=f_name></td></tr>
<tr><td><font face='Verdana' size='2' >Friend's Email</font></td></tr><tr><td><input type=text name=f_email></td></tr>
<tr ><td><font face='Verdana' size='2' >Your Message</font></td></tr><tr><td><textarea name=y_msg rows=5 cols=20></textarea></td></tr>

<tr bgcolor='#96C33C'><td colspan=2 align=center><font face='Verdana' size='2' ><input type=submit value='Send'></font></td></tr>
</table>
</form>

4 - Recommended settings for block: Use frame but not title.

5 - Upload both files (1 image and 1 php file) attached to this post to your forum root (directory where your forum is installed)

6 - Activate the block and enjoy.

« Last Edit: April 11, 2007, 10:54:56 PM by Gobo »

akulion

  • Guest
Re: Invite A Friend Block [side block]
« Reply #1 on: April 11, 2007, 10:54:01 PM »
oh i nearly forgot...

in the PHP file this line defines what message to send
Code: [Select]
$header_message = "Peace $f_name \n Your friend $y_name has sent you the following message and requested you to visit the page at \n $ref \n";
Dont touch the variables starting with the $ sign, the rest u can change

Offline rebelrose

  • Friends
  • *
  • Posts: 945
Re: Invite A Friend Block [side block]
« Reply #2 on: April 17, 2007, 05:29:53 PM »
This is nice thank you  :)

madagascar

  • Guest
Re: Invite A Friend Block [side block]
« Reply #3 on: June 22, 2007, 12:49:25 AM »
I already implemented this feature but why i've got this error on my page before it will show my homepage?

Thanks.

ERROR:
"; $status= "NOTOK";} if (strlen($y_name) <2 ) { // checking your name $msg .="Please enter your name
"; $status= "NOTOK";} if (!stristr($f_email,"@") OR !stristr($f_email,".")) { // checking friends email $msg .="Your Friends address is not correct
"; $status= "NOTOK";} if (strlen($f_name) <2 ) { // checking freinds name $msg .="Please enter your friend's name
"; $status= "NOTOK";} if (strlen($y_msg) <2 ) { // checking Message details $msg .="Please enter your message details
"; $status= "NOTOK";} if($status=="OK"){ // all validation passed /////////// Sending the message starts here ////////////// $ref=@$HTTP_REFERER; /////Message at the top of the page showing the url//// $header_message = "Peace $f_name \n Your friend $y_name has sent you the following message and requested you to visit the page at \n $ref \n"; /// Body message prepared with the message entered by the user //// $body_message =$header_message."\n".$y_msg."\n"; $body_message .="\n "; //// Mail posting part starts here ///////// $headers=""; //$headers = "Content-Type: text/html; charset=iso-8859-1\n".$headers; // Un comment the above line to send mail in html format $headers4=$y_email; // Change this to change from address $headers.="Reply-to: $headers4\n"; $headers .= "From: $headers4\n"; $headers .= "Errors-to: $headers4\n"; $subject="Request to visit URL"; mail($f_email,$subject,$body_message,$headers); ////// Mail posting ends here /////////// echo "

Thank You, Your message has been emailed to $f_name
"; echo "
You are being redirected back to the main page, if you are not diverted in 10 seconds please click here

Or Click the back button on your browser to return to the previous page
"; //////////// Sending the message ends here ///////////// }else{// display the error message echo "
$msg
"; } ?>
« Last Edit: June 24, 2007, 01:55:22 AM by madagascar »

GP

  • Guest
Re: Invite A Friend Block [side block]
« Reply #4 on: July 03, 2007, 09:05:54 PM »
The script is not recognizing the form inputs when I try it.  Each time I get.....


Your email address is not correct
Please enter your name
Your Friends address is not correct
Please enter your friend's name


It works like a charm on Gobo's site.  What am I overlooking?  :-\

Offline rebelrose

  • Friends
  • *
  • Posts: 945
Re: Invite A Friend Block [side block]
« Reply #5 on: July 03, 2007, 11:02:25 PM »
I am not sure on this script but I use this one on my site.

http://www.tinyportal.net/index.php?topic=7888.msg64830#msg64830

GP

  • Guest
Re: Invite A Friend Block [side block]
« Reply #6 on: July 04, 2007, 03:00:21 PM »
Thanks RebelRose!!!  

Offline rebelrose

  • Friends
  • *
  • Posts: 945
Re: Invite A Friend Block [side block]
« Reply #7 on: July 04, 2007, 03:01:29 PM »
Thanks RebelRose!!!  

Your welcome, hope it does what you want.

jiminoregon

  • Guest
Re: Invite A Friend Block [side block]
« Reply #8 on: July 10, 2007, 07:00:49 PM »
The script is not recognizing the form inputs when I try it.  Each time I get.....


Your email address is not correct
Please enter your name
Your Friends address is not correct
Please enter your friend's name


It works like a charm on Gobo's site.  What am I overlooking?  :-\


I'm getting the same result...have you come up with an answer Gobo?

Thanks,

Jim

arrisje

  • Guest
Re: Invite A Friend Block [side block]
« Reply #9 on: July 11, 2007, 04:53:44 PM »
I tried this one to and did not work for me neither. My forum is using gmail. Is there a possibility to use that somewhere in this code?
Thanks for all the great help I have been getting on this board. :)
B.T.W. Here is my forum http://arrisje.110mb.com/Forum/index.php