News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Added the author name to the notification

Started by The One, August 10, 2005, 05:45:17 AM

Previous topic - Next topic

The One

I have added these lines to the Post.php
        $posting_member= db_query("SELECT realName FROM {$db_prefix}members WHERE ID_MEMBER= $ID_MEMBER",__FILE__,__LINE__); // Added
        $memberName= mysql_fetch_assoc($posting_member); // Added
       
        $_POST['subject'] = un_htmlspecialchars($_POST['subject']." - by ".$memberName['realName']); // Modified
$message = trim(un_htmlspecialchars(strip_tags(strtr(parse_bbc($message, false), array('<br />' => "\n", '</div>' => "\n", '</li>' => "\n")))));
mysql_free_result($posting_member); // Added


Will this cause any other problems or is there a better way to do this?
The problem is choice

[Unknown]

That should be fine.  But, once you call mysql_fetch_assoc() you can free immediately.

-[Unknown]

damacguy

I'll wager it matters where this code is inserted in post.php. Suggestions?

mastersmurfie

Quote from: damacguy on January 21, 2006, 12:32:12 AM
I'll wager it matters where this code is inserted in post.php. Suggestions?

Wondering this as well.  I would like to add the username to the "New Topic" notification emails (SMF 1.0.6)  Where would I add the above code?
just a thought

mastersmurfie

www.chrishell.net/forums

Advertisement: