剛剛好不容易才找到這個古董~tee a friend 1.0版
安裝說明:
代碼: 選擇全部
tellafriend by TRUT
Release 1.0
I take no responsibility for any damage this may cause to you or your forums.
By using this script you agree to that.
I use it with phpBB 1.4 but it might work with others.
To install this plugin to phpBB:
upload tellafriend.php to your main forums directory (the same one as viewtopic.php).
place the following HTML code into viewtopic.php:
You can place it anywhere within viewtopic (well, almost anywhere) but here is a good place as any:
####
#### open file: viewtopic.php
#### before the text:
####
<?php
make_jumpbox();
?>
####
#### insert the text:
####
<?php
$linkhref = "http://" . $HTTP_HOST . $url_phpbb. "/viewtopic." . $phpEx . "?topic=$topic&forum=$forum&" . ($total - 1);
$linkhref = rawurlencode($linkhref);
$linksubject = rawurlencode($topic_subject);
$linkto = "tellafriend.php?linksubject=$linksubject&linkhref=$linkhref";
?>
<FONT FACE="<?php echo $FontFace?>" SIZE="<?php echo $FontSize2?>" COLOR="<?php echo $textcolor?>">
<img src="<?php echo $email_image?>" width="33" height="17" border="0" alt="Invite one of your friends to join this discussion by sending them a friendly email message." align="middle"></a>
<a href="<?php echo $linkto?>">Email this topic to a friend</a>
</FONT><br>
####
#### end.
####
唯一的檔案
[php]<?php
<?php
/*
TRUT tell-a-friend script - designed for phpBB
intended for phpBB 1.4 - may work with other versions
this script is free
use it for whatever you want
don't charge money for it
give it away to whoever you want
I am not responsible for any harm it causes you. By using this software,
you hereby agree to the term above.
*/
include('extention.inc');
include('functions.'.$phpEx);
include('config.'.$phpEx);
require('auth.'.$phpEx);
$pagetitle = "Tell a Friend";
include('page_header.'.$phpEx);
if($submit) {
if($message == '') {
error_die($l_emptymsg);
}
if ($tousername == '') {
error_die("You must enter the name of the friend you want to send the message to!");
}
if ($toemailaddress == '') {
error_die("You must enter the email address of the friend you want to send the message to!");
}
$isvalidemailaddress = ereg(" *^[^;,:@
]+@[^;,:@
]+\.[^;,:@
. ]+[^;,:@
. ]+ *$", $toemailaddress);
if (!$isvalidemailaddress)
{
error_die("The destination email address does not appear to be valid. Please note that you cannot send to more than one address at a time.");
}
if (!$user_logged_in) { // don't check this stuff if we have a valid session..
$fromuserdata = array ();
if ($fromusername == '') {
error_die("The from name has been left blank. You must enter your own name.");
}
if ($fromemailaddress == '') {
error_die("The from email address has been left blank. You must enter your own email address.");
}
$isvalidemailaddress = ereg(" *^[^;,:@
]+@[^;,:@
]+\.[^;,:@
. ]+[^;,:@
. ]+ *$", $fromemailaddress);
if (!$isvalidemailaddress)
\n {
error_die("The from email address does not appear to be valid. You must enter your correct email address.");
}
} else {
// we have a valid session..
$fromusername = $userdata[username]; // fromuser = current user.
$fromemailaddress = $userdata[user_email];
}
/* correct password or logged-in user, continuing with message send. */
$message .= "
____________________________________________________________________________
$sitename
-------------------
You have been sent this email because a user of $sitename
used our \"Tell a friend\" feature to send this message to you. Your address
has not been recorded, and has not been placed on a mailing list. To report
abuse of this feature, please contact the webmaster at
$email_from immediately. Include the full headers of
this email, which contain tracking information.
-------------------
$email_sig
";
// send the message here.
// emailable message
$message = str_replace("
", "
", $message);
// for security, check for invalid characters in the to email address
// TRUT yet to be implemented
$tempfrom = "$fromusername <$fromemailaddress>";
$tempto = "$tousername <$toemailaddress>";
mail($tempto, "Join this discussion at $sitename!", strip_tags($message), "From: $tempfrom
X-Form-Sender-IP-Address: $REMOTE_ADDR");
echo "<br><TABLE BORDER=\"0\" CELLPADDING=\"1\" CELLSPACING=\"0\" ALIGN=\"CENTER\" VALIGN=\"TOP\" WIDTH=\"$tablewidth\">";
echo "<TR><TD BGCOLOR=\"$table_bgcolor\"><TABLE BORDER=\"0\" CALLPADDING=\"1\" CELLSPACING=\"1\" WIDTH=\"100%\">";
echo "<TR BGCOLOR=\"$color1\" ALIGN=\"LEFT\"><TD><font face=\"Verdana\" size=\"2\"><P>";
echo "<P><BR><center>";
echo "Your email has been sent!<br><br>
";
$linksubject = rawurlencode($linksubject);
$linkhref = rawurlencode($linkhref);
echo "<a href=\"$PHP_SELF?linksubject=$linksubject&linkhref=$linkhref\">Click here to send one to another friend!</a><br>
";
echo "<p></center></font>";
echo "</TD></TR></TABLE></TD></TR></TABLE><br>";
} else {
/* displaying the form */
?>
<form action="<?php echo $PHP_SELF?>" method="post">
<table border="0" cellpadding="0" cellspacing="0" align="center" valign="top" width="95%"><tr><td bgcolor="<?php echo $table_bgcolor?>">
<table border="0" cellpadding="3" cellspacing="1" width="100%">
<tr bgcolor="<?php echo $color1?>" align="left">
<TD colspan="2" align="center">
<font face="<?php echo $FontFace?>" size="<?php echo $FontSize2?>" COLOR="<?php echo $textcolor?>">
<b>Tell a friend about <?php echo $sitename?>!</b>
</FONT>
</TD>
</TR>
<TR ALIGN="LEFT">
<TD BGCOLOR="<?php echo $color1?>" width=25%>
<FONT FACE="<?php echo $FontFace?>" SIZE="<?php echo $FontSize2?>" COLOR="<?php echo $textcolor?>">
<b>Your name:<b>
</FONT>
</TD>
<TD BGCOLOR="<?php echo $color2?>">
<FONT FACE="<?php echo $FontFace?>" SIZE="<?php echo $FontSize2?>" COLOR="<?php echo $textcolor?>">
<?PHP
if ($user_logged_in) {
echo "<INPUT TYPE=\"hidden\" NAME=\"fromusername\" VALUE=\"$userdata[username]\">" . $userdata[username] . "
";
} else {
echo "<INPUT TYPE=\"TEXT\" NAME=\"fromusername\" SIZE=\"25\" MAXLENGTH=\"40\" VALUE=\"$userdata[username]\">
";
}
?>
</FONT>
</TD>
</TR>
<?PHP
if (!$user_logged_in) {
// no session, need a password.
echo " <TR ALIGN=\"LEFT\"><TD BGCOLOR=\"$color1\" width=25%>
";
echo " <FONT FACE=\"$FontFace\" SIZE=\"$FontSize2\" COLOR=\"$textcolor\">";
echo " <b>Your email address:</b></FONT></TD>
";
echo " <TD BGCOLOR=\"$color2\"><INPUT TYPE=\"TEXT\" NAME=\"fromemailaddress\" SIZE=\"25\" MAXLENGTH=\"63\"></TD>
";
echo " </TR>
";
}
else
{
echo "<INPUT TYPE=\"hidden\" NAME=\"fromemailaddress\" VALUE=\"$userdata[user_email]\">
";
}
?>
<TR ALIGN="LEFT">
<TD BGCOLOR="<?php echo $color1?>" width=25%>
<FONT FACE="<?php echo $FontFace?>" SIZE="<?php echo $FontSize2?>" COLOR="<?php echo $textcolor?>">
<b>Your friend's name:<b>
</FONT>
</TD>
<TD BGCOLOR="<?php echo $color2?>"><INPUT TYPE="TEXT" NAME="tousername" SIZE="25" MAXLENGTH="40" VALUE="<?php echo $tousername?>"></TD>
</TR>
<TR ALIGN="LEFT">
<TD BGCOLOR="<?php echo $color1?>" width=25%>
<FONT FACE="<?php echo $FontFace?>" SIZE="<?php echo $FontSize2?>" COLOR="<?php echo $textcolor?>">
<b>Your friend's email address:<b>
</FONT>
</TD>
<TD BGCOLOR="<?php echo $color2?>"><INPUT TYPE="TEXT" NAME="toemailaddress" SIZE="25" MAXLENGTH="63" VALUE="<?php echo $toemailaddress?>"></TD>
</TR>
<TR ALIGN="LEFT">
<TD BGCOLOR="<?php echo $color1?>" width=25%>
<FONT FACE="<?php echo $FontFace?>" SIZE="<?php echo $FontSize2?>" COLOR="<?php echo $textcolor?>">
<b>Your email message:</b></FONT>
</TD>
<TD BGCOLOR="<?php echo $color2?>"><TEXTAREA NAME="message" ROWS=10 COLS=45 WRAP="VIRTUAL">
Hi,
I'd like to invite you to participate in a discussion at <?php echo $sitename?> forums called "<?php echo $linksubject?>".
I am enjoying the discussion and I thought you might be particularly interested in it. Here is the link:
<?php echo $linkhref?>
You can go and read the topic now, and if you want to reply, you can register for free and customise your account.
Check out <?php echo $sitename?> site too.
Let me know what you think,
see you later,
<?php echo $userdata[username]?>
</TEXTAREA></TD>
</TR>
<TR ALIGN="LEFT">
<TD BGCOLOR="<?php echo $color1?>" colspan="2" align="center">
<FONT FACE="<?php echo $FontFace?>" SIZE="<?php echo $FontSize2?>" COLOR="<?php echo $textcolor?>">
Please use this "tell a friend" feature responsibly. <?php echo $sitename?> will follow up any
reports of abuse of this feature.
</TR>\r
<TR>
<TD BGCOLOR="<?php echo $color1?>" colspan=2 ALIGN="CENTER">
<input type="hidden" name="linkhref" value="<?php echo $linkhref?>">
<input type="hidden" name="linksubject" value="<?php echo $linksubject?>">
<INPUT TYPE="SUBMIT" NAME="submit" VALUE="<?php echo $l_submit?>">
</TR>
</TABLE></TD></TR></TABLE>
</FORM>
<?php
}
require('page_tail.'.$phpEx);
?>
?>[/php]
可是這個實在是太舊了~而且又沒有中文語系~
拜託!!誰有tell a friend1.12+中文語系~~找到的話真的是一被子都感激不盡!!