| Author |
Message |
Kenny
Newbie


Joined: Sep 04, 2007
Posts: 16
|
Posted:
Fri Jul 18, 2008 8:38 pm |
|
Anyone that have modded NukeStyles Contact Plus to work with Tegomailer,I dont get it to work at all  |
| |
|
|
 |
montego
Site Admin/Owner


Joined: Feb 12, 2005
Posts: 926
|
Posted:
Sat Jul 19, 2008 10:59 am |
|
Are you getting some sort of error message? Have you tried setting $display_errors = true; within config.php?
Do NOT post the whole code here, but copy out about 20 or so lines ahead and after each mail() statement and post it here and let us take a look at what you have done. |
_________________ “To err is human, but when the eraser wears out ahead of the pencil, you’re overdoing it.”
-- Josh Jenkins |
|
|
 |
Kenny
Newbie


Joined: Sep 04, 2007
Posts: 16
|
Posted:
Sun Jul 20, 2008 12:29 pm |
|
I dont know if this is to any help
| Code: |
$result = $db->sql_query("select dept_name, dept_email from ".$prefix."_ns_contact_dept where did='$dpid'");
list($department, $dept_email)=$db->sql_fetchrow($result);
$department = stripslashes(trim($department));
$subject = $department;
$from = strip_tags(trim($from));
$message = stripslashes(trim($message));
$header = ""._FROM.": "._CONTACTFORM." - $cname <$from>\r\n";
$header .= "\n";
$header .= ""._VISITOR.": $cname <$from>\r\n\n";
$header .= ""._TODEPARTMENT.": $department\r\n\n";
$header .= ""._MESSAGE.":\r\n";
$header .= "\n==============================================================";
@$send=mail($dept_email,$subject,$message,$header);
|
|
| |
|
|
 |
montego
Site Admin/Owner


Joined: Feb 12, 2005
Posts: 926
|
Posted:
Sun Jul 20, 2008 12:46 pm |
|
It does, but I also need the 20 lines after too.... I just need to see if $send is used anywhere below for presenting either a success or failure notice back to the user. |
_________________ “To err is human, but when the eraser wears out ahead of the pencil, you’re overdoing it.”
-- Josh Jenkins |
|
|
 |
Kenny
Newbie


Joined: Sep 04, 2007
Posts: 16
|
Posted:
Sun Jul 20, 2008 1:51 pm |
|
Here are the following lines
| Code: |
if ($send == 1) {
OpenTable();
echo "<center><font class=\"title\">"._CONTACTUS."</font></center>";
CloseTable();
OpenTable();
echo "<br>";
echo "<br><div align=\"center\"><font class=\"title\">"._THANKYOUFOR." $sitename</font>";
echo "<br><br>"._EMAILSENT."<br>"._GETBACK."</div><br><br>";
echo "<center>[ <a href=\"index.php\">"._HOME."</a> ] - ";
echo "[ <a href=\"modules.php?name=$module_name\">"._CONTACTFORM."</a> ]</center><br>";
echo "<br>";
CloseTable();
include ("footer.php");
} else {
OpenTable();
echo "<center><font class=\"title\">"._CONTACTUS."</font></center>";
CloseTable();
OpenTable();
echo"<center><font class=\"title\">"._ERROR2."</font>";
echo"<br>"._TRYAGAIN."<br>";
echo"[ <a href=\"modules.php?name=Contact\">"._BACK."</a> ]</center>";
CloseTable();
include ("footer.php");
}
exit();
include("footer.php");
}
switch ($op) {
case "ns_send":
ns_send($dpid, $cname, $from, $email, $message);
break;
default:
ns_form();
break;
|
|
| |
|
|
 |
Guardian
Site Admin


Joined: Jul 18, 2005
Posts: 297
|
Posted:
Mon Jul 21, 2008 3:20 am |
|
For testing purposes you might want to remove the ampersand from this line in the first section of code you posted
| Code: |
@$send=mail($dept_email,$subject,$message,$header); |
as the ampersand will tell PHP to ignore errors.
I see you are detecting if $send has a value of exactly '1' and if it is, to execute the 'thank you' or 'try again' routines. You might want to add something like
| Code: |
echo "Value of send is '.$send.'<br />"; |
under each of your lines that has the constant _CONTACTUS so you can see what the real value of $send is at that point in the scripts execution.
Edited by G to correct typo |
_________________ Spam Stopper - Comments Modules - Security News - Script Installer
Last edited by Guardian on Mon Jul 21, 2008 11:14 pm; edited 1 time in total |
|
|
 |
Kenny
Newbie


Joined: Sep 04, 2007
Posts: 16
|
Posted:
Mon Jul 21, 2008 5:20 pm |
|
I dont understand exactly what you are trying to explain to me  |
| |
|
|
 |
montego
Site Admin/Owner


Joined: Feb 12, 2005
Posts: 926
|
Posted:
Tue Jul 22, 2008 7:21 am |
|
Ok, I think I have what you need. Here are the instructions:
=== FIND CODE ===
| Code: |
@$send=mail($dept_email,$subject,$message,$header);
|
=== REPLACE WITH ===
| Code: |
//@$send=mail($dept_email,$subject,$message,$header);
if (defined('TNML_IS_ACTIVE')) {
$to = array(array($dept_email, $department));
$send = tnml_fMailer($to, $subject, $message, $from, $cname);
} else {
$send = mail($dept_email,$subject,$message,$header);
}
|
|
_________________ “To err is human, but when the eraser wears out ahead of the pencil, you’re overdoing it.”
-- Josh Jenkins |
|
|
 |
Kenny
Newbie


Joined: Sep 04, 2007
Posts: 16
|
Posted:
Tue Jul 22, 2008 9:19 am |
|
Thanks it worked,youre the best Montego,I'm rebuilding my whole site and have used all yout mods/hacks and this was the last part that I did not get to work so thank you |
| |
|
|
 |
montego
Site Admin/Owner


Joined: Feb 12, 2005
Posts: 926
|
Posted:
Wed Jul 23, 2008 8:04 pm |
|
You are most welcome Kenny. Glad to help. Of course, donations are always welcome...  |
_________________ “To err is human, but when the eraser wears out ahead of the pencil, you’re overdoing it.”
-- Josh Jenkins |
|
|
 |
|
|