Montego Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic
Author Message
Kenny
Newbie
Newbie



Joined: Sep 04, 2007
Posts: 24

PostPosted: Fri Jul 18, 2008 8:38 pm Reply with quote

Anyone that have modded NukeStyles Contact Plus to work with Tegomailer,I dont get it to work at all Crying or Very sad
 
View user's profile Send private message
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 1399

PostPosted: Sat Jul 19, 2008 10:59 am Reply with quote

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 
View user's profile Send private message Visit poster's website
Kenny
Newbie
Newbie



Joined: Sep 04, 2007
Posts: 24

PostPosted: Sun Jul 20, 2008 12:29 pm Reply with quote

I dont know if this is to any help Embarassed

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);
 
View user's profile Send private message
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 1399

PostPosted: Sun Jul 20, 2008 12:46 pm Reply with quote

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 
View user's profile Send private message Visit poster's website
Kenny
Newbie
Newbie



Joined: Sep 04, 2007
Posts: 24

PostPosted: Sun Jul 20, 2008 1:51 pm Reply with quote

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;
 
View user's profile Send private message
Guardian
Site Admin
Site Admin



Joined: Jul 18, 2005
Posts: 397

PostPosted: Mon Jul 21, 2008 3:20 am Reply with quote

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


Last edited by Guardian on Mon Jul 21, 2008 11:14 pm; edited 1 time in total 
View user's profile Send private message
Kenny
Newbie
Newbie



Joined: Sep 04, 2007
Posts: 24

PostPosted: Mon Jul 21, 2008 5:20 pm Reply with quote

I dont understand exactly what you are trying to explain to me Embarassed
 
View user's profile Send private message
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 1399

PostPosted: Tue Jul 22, 2008 7:21 am Reply with quote

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 
View user's profile Send private message Visit poster's website
Kenny
Newbie
Newbie



Joined: Sep 04, 2007
Posts: 24

PostPosted: Tue Jul 22, 2008 9:19 am Reply with quote

Very Happy 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
 
View user's profile Send private message
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 1399

PostPosted: Wed Jul 23, 2008 8:04 pm Reply with quote

You are most welcome Kenny. Glad to help. Of course, donations are always welcome... Wink Smile

_________________
“To err is human, but when the eraser wears out ahead of the pencil, you’re overdoing it.”
-- Josh Jenkins 
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 4 Hours
 
Forums ©
linear-bunch
linear-bunch