PHP Web Host - Quality Web Hosting For All PHP Applications $35/month $250/year (Unlimited) - $25/month - 200,000 impressions - Your Ad Could be Here - Click For Details
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
Donovan
Client


Joined: Oct 07, 2003
Posts: 685
Location: Ohio

PostPosted: Fri Sep 21, 2007 10:15 am Reply with quote Back to top

Anybody ever did something like this? I see that Nuke uses the phpbb template for emailing stuff like registration and private messages.

What I have in my submitComment function is the following:

$cid = $db->sql_nextid(); // capture last cid autoincrement value.
notify($cid);

The notify funtion will send the email that they have a waiting comment to reply to.

Code:
function notify($cid) {
global $db;   
$sql = $db->sql_query("SELECT * FROM comment_queue cq JOIN director d
ON d.course_id = cq.course_id
WHERE cid = '$cid'");
if (!$sql) {
      echo("<p>Error performing query: " . mysql_error() . "</p>");
      exit();   
      }      
while ($row = $db->sql_fetchrow($sql)) {
$to = $row['email'];
$subject = $row['title'];
$message = $row['comment_text'];
}

$headers = 'From: Questions' . "\r\n" .
    'Reply-To:
Only registered users can see links on this board!
Get registered or login to the forums!
' . "\r\n" .
    'X-Mailer: PHP/' . phpversion();
mail($to, $subject, $message, $headers);         
}


What I would like to do is use a template to format the email and make it more professional looking.

After looking at the privmsg_notify.tpl, I am trying to do something like:


Code:
Subject: New Question has arrived
Charset: iso-8859-1

Hello Professor {USERNAME},

You have received a new question on the School of Medicine Question System. You can view your new question by clicking on the following link:

{Q_LINK}


I have searched the Forum module for code that I could duplicate to use this, but have come up empty.

Some sort of

Code:
$template->set_filenames('body.tpl');
View user's profile Send private message Visit poster's website ICQ Number
Donovan
Client


Joined: Oct 07, 2003
Posts: 685
Location: Ohio

PostPosted: Fri Sep 21, 2007 2:24 pm Reply with quote Back to top

Took me all day but I think I got it.

I would post the code but again NukeSentinal blocks me and I don't have the time to create a txt and upload.
View user's profile Send private message Visit poster's website ICQ Number
montego
Site Admin


Joined: Aug 29, 2004
Posts: 7330
Location: Arizona

PostPosted: Sat Sep 22, 2007 7:23 am Reply with quote Back to top

As long as you have got it, no worries m8.
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
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2008 by Raven
Proud to be listed at Lobo Links Web Directory

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::

:: fisubice Theme Recoded To 100% W3C CSS & HTML 4.01 Transitional Compliance by Raven and 64bitguy ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum