Quote:[url="http://www.torrenttrader.pw/topic/9655-addonshoutbox-message-edit%5B/url"][url="http://www.torrenttrader.pw/topic/9655-addonshoutbox-message-edit%5B/url"]Posted 23 October 2008 - 02:57 PM[/url]
[url="http://www.torrenttrader.pw/topic/9655-addonshoutbox-message-edit%5B/url"]
Ok I did not really have time to search and give credit for some of the stuff. what i did was take some code form the forums and used somebody's autolink code. when i can i will search and give credit to the person. now this is nothing fancy but it does work. hopefully one of the staff will change this a bit and put it in the next release. it would be better if all of the code was to sit in the shoutbox.php could one of the staff check the shoutedit.php to make sure it is secure from injection. ok here we go[/url]
[url="http://www.torrenttrader.pw/topic/9655-addonshoutbox-message-edit%5B/url"]echo "<div align='right' style='float: right'><a href='".$site_config['SITEURL']."/shoutbox.php?del=".$row['msgid']."' style='font-size: 8px'>[D]</a><div>";[/url][url="http://www.torrenttrader.pw/topic/9655-addonshoutbox-message-edit%5B/url"]echo "<div align='right' style='float: right'><a href='".$site_config['SITEURL']."/shoutedit.php?action=edit&msgid=".$row['msgid']."' style='font-size: 8px'>[E]</a> <a href='".$site_config['SITEURL']."/shoutbox.php?del=".$row['msgid']."' style='font-size: 8px'>[D]</a><div>";[/url]ALTER TABLE `motm` ADD `credit` enum('yes','no') NOT NULL default 'no',
//== Start member of the month
$motmdateget = SQL_Query_exec("SELECT win_month,year from motm WHERE last_winner ='1'");
$motmdategot = mysql_fetch_array($motmdateget);
$motmdate = $motmdategot[0];
$motmyear = $motmdategot[1];
$mdate = date("m");
$myear = date("y");
if ($motmdate < $mdate) {
$sql32 = "SELECT id, points FROM motm WHERE points > '0' && year =" . $myear . " ORDER BY points DESC LIMIT 1";
$mysql_result_motm = SQL_Query_exec($sql32);
while ($row_motm = mysql_fetch_array($mysql_result_motm)) {
$nextmonth = (date(m) + 1);
$id_motm = $row_motm['id'];
$pos = $row_motm["points"];
$motmdateget = SQL_Query_exec("SELECT win_month from motm WHERE last_winner ='1'");
$motmdategot = mysql_fetch_array($motmdateget);
$motmdate = $motmdategot[0];
SQL_Query_exec("UPDATE motm SET last_winner = '0' WHERE last_winner = '1'");
SQL_Query_exec("UPDATE motm SET last_winner = '1' WHERE id = '$id_motm'");
//to give seeder bonus
SQL_Query_exec("UPDATE users SET seedbonus = seedbonus+300 WHERE id = '$id_motm'");
SQL_Query_exec("UPDATE motm SET win_month = '$mdate', last_winner_points = '$pos' WHERE id = '$id_motm'");
SQL_Query_exec("UPDATE motm SET points = '0'");
SQL_Query_exec("UPDATE motm SET last_winner_points = '0' WHERE last_winner = '0'");
} //$row_motm = mysql_fetch_array($mysql_result_motm)
} //$motmdate < $mdate && $motmyear == $myear
//== End member of the month
with
//== Start member of the month
$motmdateget = SQL_Query_exec("SELECT win_month,year,credit from motm WHERE last_winner ='1'");
$motmdategot = mysql_fetch_array($motmdateget);
$motmdate = $motmdategot[0];
$motmyear = $motmdategot[1];
$mdate = date("m");
$myear = date("y");
if ($motmdate < $mdate) {
$motmdateget1 = SQL_Query_exec("SELECT win_month,year,credit from motm WHERE win_month = '$mdate'");
$motmdategot1 = mysql_fetch_array($motmdateget1);
$motcredit = $motmdategot1[2];
$sql32 = "SELECT id, points FROM motm WHERE points > '0' && year =" . $myear . " ORDER BY points DESC LIMIT 1";
$mysql_result_motm = SQL_Query_exec($sql32);
while ($row_motm = mysql_fetch_array($mysql_result_motm)) {
$nextmonth = (date(m) + 1);
$id_motm = $row_motm['id'];
$pos = $row_motm["points"];
$motmdateget = SQL_Query_exec("SELECT win_month from motm WHERE last_winner ='1'");
$motmdategot = mysql_fetch_array($motmdateget);
$motmdate = $motmdategot[0];
if ($motcredit != 'yes') {
SQL_Query_exec("UPDATE motm SET last_winner = '0' WHERE last_winner = '1'");
SQL_Query_exec("UPDATE motm SET win_month = '$mdate', last_winner_points = '$pos', last_winner = '1', credit='yes' WHERE id = '$id_motm'");
SQL_Query_exec("UPDATE users SET seedbonus = seedbonus+300 WHERE id = '$id_motm'");
SQL_Query_exec("UPDATE motm SET points = '0'");
SQL_Query_exec("UPDATE motm SET last_winner_points = '0' WHERE last_winner != '1'");
} //$motcredit != 'yes'
} //$row_motm = mysql_fetch_array($mysql_result_motm)
} //$motmdate < $mdate
//== End member of the month
$privacylevel = T_($CURUSER["privacy"]);add
$lang_q = SQL_query_exec("SELECT `name` from `languages` WHERE `id` = " . $CURUSER['language']);
$lang_r = mysql_fetch_assoc($lang_q);
$lang_name = htmlspecialchars( $lang_r['name'] );
then farther down
in this
print ("<center><img width='80' height='80' src='$avatar' alt='' /></center><br />" . T_("DOWNLOADED") . ": $userdownloaded<br />" . T_("UPLOADED") . ": $useruploaded<br />".T_("CLASS").": ".T_($CURUSER["level"])."<br />" . T_("ACCOUNT_PRIVACY_LVL") . ": $privacylevel<br />". T_("RATIO") .": $userratio");
change to
print ("<center><img width='80' height='80' src='$avatar' alt='' /></center>
<br />" . T_("DOWNLOADED") . ": $userdownloaded
<br />" . T_("UPLOADED") . ": $useruploaded
<br />".T_("CLASS").": ".T_($CURUSER["level"])."
<br />" . T_("ACCOUNT_PRIVACY_LVL") . ": $privacylevel
<br />" . T_("LANGUES") . ": $lang_name
<br />". T_("RATIO") .": $userratio");
$lang_q = SQL_query_exec("SELECT `name` from `languages` WHERE `id` = " . $CURUSER['language']);to$lang_q = SQL_query_exec("SELECT `name` from `languages` WHERE `id` = " . $user['language']);

Quote:noreply@die_gmail.gov
3:38 PM (0 minutes ago)
to noreply
<div style='padding-top:3px'><font size=2>You received a message from your site <b>Blow ME</b></font></div>
<div style='padding-top:3px'><font size=2>Reason: <b>Help!</b></font></div>
<div style='padding-top:3px'><font size=2>Email: blowme@blowme.gov</font></div><div style='padding-top:3px'><font size=2>Sender: <b>ArcticWolf</b></font></div>
<div style='padding-top:7px'><font size=2>Message:</font></div>
-------------------------------------------------------------------------<br />lol