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?
That should be fine. But, once you call mysql_fetch_assoc() you can free immediately.
-[Unknown]
I'll wager it matters where this code is inserted in post.php. Suggestions?
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?