1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-05 06:07:32 +02:00

Bugtracker #3756 - separate 'email from site' address/name

This commit is contained in:
e107steved
2007-08-14 19:37:45 +00:00
parent 7d5e7716bc
commit b1ea52dc1c
3 changed files with 67 additions and 37 deletions

View File

@@ -11,8 +11,8 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_admin/prefs.php,v $
| $Revision: 1.5 $
| $Date: 2007-07-18 20:20:20 $
| $Revision: 1.6 $
| $Date: 2007-08-14 19:37:30 $
| $Author: e107steved $
+----------------------------------------------------------------------------+
*/
@@ -137,36 +137,40 @@ $text = "<script type=\"text/javascript\">
<form method='post' action='".e_SELF."'>
<div id='main' style='text-align:center'>
<table style='width:100%' class='fborder'>
<colgroup>
<col style='width:50%' />
<col style='width:50%' />
</colgroup>
<tr>
<td class='fcaption' title='".PRFLAN_80."' style='text-align:left;' colspan='2'>".PRFLAN_1."</td>
</tr>
<tr>
<td style='width:50%' class='forumheader3'>".PRFLAN_2."</td>
<td style='width:50%; text-align:right' class='forumheader3'>
<td class='forumheader3'>".PRFLAN_2."</td>
<td style='text-align:right' class='forumheader3'>
<input class='tbox' type='text' name='sitename' size='50' value='".$pref['sitename']."' maxlength='100' />
</td>
</tr>
<tr>
<td style='width:50%' class='forumheader3'>".PRFLAN_3."</td>
<td style='width:50%; text-align:right' class='forumheader3'>
<td class='forumheader3'>".PRFLAN_3."</td>
<td style='text-align:right' class='forumheader3'>
<input class='tbox' type='text' name='siteurl' size='50' value='".$pref['siteurl']."' maxlength='150' /><br />
".($pref['siteurl'] == SITEURL ? "" : "<br />( ".PRFLAN_159.": <b>".SITEURL."</b> )")."
</td>
</tr>
<tr>
<td style='width:50%' class='forumheader3'>".PRFLAN_134."<br /><span class='smalltext'>".PRFLAN_135."</span></td>
<td style='width:50%; text-align:right' class='forumheader3'>
<td class='forumheader3'>".PRFLAN_134."<br /><span class='smalltext'>".PRFLAN_135."</span></td>
<td style='text-align:right' class='forumheader3'>
<input type='radio' name='redirectsiteurl' value='1'".($pref['redirectsiteurl'] ? " checked='checked'" : "")." /> ".PRFLAN_112."&nbsp;&nbsp;
<input type='radio' name='redirectsiteurl' value='0'".(!$pref['redirectsiteurl'] ? " checked='checked'" : "")." /> ".PRFLAN_113."
</td>
</tr>
<tr>
<td style='width:50%' class='forumheader3'>".PRFLAN_4."</td>
<td style='width:50%; text-align:right' class='forumheader3'>";
<td class='forumheader3'>".PRFLAN_4."</td>
<td style='text-align:right' class='forumheader3'>";
$param = "sitebutton,".e_IMAGE.",".SITEBUTTON.",81px,30px,";
$text .= $tp->parseTemplate("{IMAGESELECTOR={$param}}");
@@ -176,57 +180,71 @@ $text = "<script type=\"text/javascript\">
</tr>
<tr>
<td style='width:50%' class='forumheader3'>".PRFLAN_5."</td>
<td style='width:50%; text-align:right' class='forumheader3'>
<td class='forumheader3'>".PRFLAN_5."</td>
<td style='text-align:right' class='forumheader3'>
<textarea class='tbox' name='sitetag' cols='59' rows='3'>".$pref['sitetag']."</textarea>
</td>
</tr>
<tr>
<td style='width:50%' class='forumheader3'>".PRFLAN_6."</td>
<td style='width:50%; text-align:right' class='forumheader3'>
<td class='forumheader3'>".PRFLAN_6."</td>
<td style='text-align:right' class='forumheader3'>
<textarea class='tbox' name='sitedescription' cols='59' rows='6'>".$pref['sitedescription']."</textarea>
</td>
</tr>
<tr>
<td style='width:50%' class='forumheader3'>".PRFLAN_7."</td>
<td style='width:50%; text-align:right' class='forumheader3'>
<td class='forumheader3'>".PRFLAN_7."</td>
<td style='text-align:right' class='forumheader3'>
<input class='tbox' type='text' name='siteadmin' size='50' value='".SITEADMIN."' maxlength='100' />
</td>
</tr>
<tr>
<td style='width:50%' class='forumheader3'>".PRFLAN_8."</td>
<td style='width:50%; text-align:right' class='forumheader3'>
<td class='forumheader3'>".PRFLAN_8."</td>
<td style='text-align:right' class='forumheader3'>
<input class='tbox' type='text' name='siteadminemail' size='50' value='".SITEADMINEMAIL."' maxlength='100' />
</td>
</tr>
<tr>
<td style='width:50%' class='forumheader3'>".PRFLAN_162."<br /><span class='smalltext'>".PRFLAN_163."</span></td>
<td style='width:50%; text-align:right' class='forumheader3'>
<td class='forumheader3'>".PRFLAN_174."<br /><span class='smalltext'>".PRFLAN_175."</span></td>
<td style='text-align:right' class='forumheader3'>
<input class='tbox' type='text' name='replyto_name' size='50' value='".$pref['replyto_name']."' maxlength='100' />
</td>
</tr>
<tr>
<td class='forumheader3'>".PRFLAN_176."<br /><span class='smalltext'>".PRFLAN_177."</span></td>
<td style='text-align:right' class='forumheader3'>
<input class='tbox' type='text' name='replyto_email' size='50' value='".$pref['replyto_email']."' maxlength='100' />
</td>
</tr>
<tr>
<td class='forumheader3'>".PRFLAN_162."<br /><span class='smalltext'>".PRFLAN_163."</span></td>
<td style='text-align:right' class='forumheader3'>
<textarea class='tbox' name='sitecontactinfo' cols='59' rows='6'>".$pref['sitecontactinfo']."</textarea>
</td>
</tr>
<tr>
<td style='width:50%' class='forumheader3'>".PRFLAN_168."<br /><span class='smalltext'>".PRFLAN_169."</span></td>
<td style='width:50%; text-align:right' class='forumheader3'>".r_userclass("sitecontacts",$pref['sitecontacts'],"off","nobody,main,admin,userclasses")."
<td class='forumheader3'>".PRFLAN_168."<br /><span class='smalltext'>".PRFLAN_169."</span></td>
<td style='text-align:right' class='forumheader3'>".r_userclass("sitecontacts",$pref['sitecontacts'],"off","nobody,main,admin,userclasses")."
</td>
</tr>
<tr>
<td style='width:50%' class='forumheader3'>".PRFLAN_164."<br /><span class='smalltext'>".PRFLAN_165."</span></td>
<td style='width:50%; text-align:right' class='forumheader3'>
<td class='forumheader3'>".PRFLAN_164."<br /><span class='smalltext'>".PRFLAN_165."</span></td>
<td style='text-align:right' class='forumheader3'>
<input type='radio' name='contact_emailcopy' value='1'".($pref['contact_emailcopy'] ? " checked='checked'" : "")." /> ".PRFLAN_112."&nbsp;&nbsp;
<input type='radio' name='contact_emailcopy' value='0'".(!$pref['contact_emailcopy'] ? " checked='checked'" : "")." /> ".PRFLAN_113."
</td>
</tr>
<tr>
<td style='width:50%' class='forumheader3'>".PRFLAN_9."</td>
<td style='width:50%; text-align:right' class='forumheader3'>
<td class='forumheader3'>".PRFLAN_9."</td>
<td style='text-align:right' class='forumheader3'>
<textarea class='tbox' name='sitedisclaimer' cols='59' rows='6'>".$pref['sitedisclaimer']."</textarea>
</td>
</tr>
@@ -268,7 +286,8 @@ $text .= "</table>
</td>
</tr>
";
if(function_exists("memory_get_usage")){
if(function_exists("memory_get_usage"))
{
$text .= "
<tr>
<td style='width:50%' class='forumheader3'>".PRFLAN_137." </td>

View File

@@ -11,9 +11,9 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_handlers/mail.php,v $
| $Revision: 1.7 $
| $Date: 2007-04-15 22:12:44 $
| $Author: e107coders $
| $Revision: 1.8 $
| $Date: 2007-08-14 19:37:30 $
| $Author: e107steved $
+----------------------------------------------------------------------------+
*/
@@ -36,10 +36,10 @@ if (!defined('e107_INIT')) { exit; }
Please note that mailed attachments have been found to be corrupted using php 4.3.3
php 4.3.6 does NOT have this problem.
*/
// Comment out the line below if you have trouble with some people not receiving emails.
// e107_ini_set(sendmail_path, "/usr/sbin/sendmail -t -f ".$pref['siteadminemail']);
function sendemail($send_to, $subject, $message, $to_name, $send_from, $from_name, $attachments='', $Cc='', $Bcc='', $returnpath='', $returnreceipt='',$inline ="") {
// If $send_from is blank, uses the 'replyto' name and email if set, otherwise site admins details
function sendemail($send_to, $subject, $message, $to_name, $send_from='', $from_name='', $attachments='', $Cc='', $Bcc='', $returnpath='', $returnreceipt='',$inline ="")
{
global $pref,$mailheader_e107id,$tp;
require_once(e_HANDLER."phpmailer/class.phpmailer.php");
@@ -96,9 +96,14 @@ function sendemail($send_to, $subject, $message, $to_name, $send_from, $from_nam
$to_name = ($to_name) ? $to_name: $send_to;
if (!trim($send_from))
{
$from_name = $tp->toEmail(varset($pref['replyto_name'],$pref['siteadmin']),"","parse_sc, no_make_clickable, defs");
$send_from = $tp->toEmail(varset($pref['replyto_email'],$pref['siteadminemail']),"","parse_sc, no_make_clickable, defs");
}
$mail->CharSet = CHARSET;
$mail->From = ($send_from)? $send_from: $tp->toEmail($pref['siteadminemail'],"","parse_sc, no_make_clickable, defs");
$mail->FromName = ($from_name)? $from_name: $tp->toEmail($pref['siteadmin'],"","parse_sc, no_make_clickable, defs");
$mail->From = $send_from;
$mail->FromName = $from_name;
$mail->Subject = $subject;
$mail->SetLanguage("en",e_HANDLER."phpmailer/language/");

View File

@@ -12,8 +12,8 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_languages/English/admin/lan_prefs.php,v $
| $Revision: 1.5 $
| $Date: 2007-07-18 20:20:27 $
| $Revision: 1.6 $
| $Date: 2007-08-14 19:37:37 $
| $Author: e107steved $
+----------------------------------------------------------------------------+
*/
@@ -188,4 +188,10 @@ define("PRFLAN_171", "Turning this option on will allow you to ban users by host
define("PRFLAN_172", "Login Name maximum length (10..100)");
define("PRFLAN_173", "Check at SourceForge for E107 updates once/day");
define("PRFLAN_174", "Name for responses to emails from site");
define("PRFLAN_175", "This will appear in the 'From' field of registration and other emails from this site");
define("PRFLAN_176", "Email address for emails from site");
define("PRFLAN_177", "Address specified for replies to emails from this site.");
?>