|
|
| Author |
Message |
JakeTFG
New User
Joined: 11 Mar 2006
Posts: 21
|
Posted: September 20th 2006, 2:35 pm Post subject: Mass Pm Hack Privmsg.php problem |
|
|
The instruction tell me to look for:
| Code:
|
|
$to_username = $HTTP_POST_VARS['username'];
|
Replace with:
| Code:
|
// Start replacement - Custom mass PM MOD
$to_username_array = explode (";", $HTTP_POST_VARS['username']);
usort ($to_username_array);
foreach ($to_username_array as $name) $to_usernames .= "'".htmlspecialchars(trim($name))."',";
$to_usernames[strlen($to_usernames)-1]=" ";
// End replacement - Custom mass PM MOD
|
Last edited by JakeTFG on September 20th 2006, 2:56 pm; edited 2 times in total |
|
| Back to top |
|
 |
Thoul
VIP

Joined: 30 Jul 2002
Posts: 17676
Location: USA
|
|
| Back to top |
|
 |
JakeTFG
New User
Joined: 11 Mar 2006
Posts: 21
|
Posted: September 20th 2006, 2:58 pm Post subject: |
|
|
Ok another thing im unsure about. I probably just replace it all but it has a new line of code in it so im not too sure:
| Code:
|
#
#-----[ FIND ]------------------------------------------------
#
if ( !($result = $db->sql_query($sql)) )
{
$error = TRUE;
$error_msg = $lang['No_such_user'];
}
$to_userdata = $db->sql_fetchrow($result);
}
else
{
#
#-----[ REPLACE WITH ]----------------------------------------
#
// Start replacement - Custom mass PM MOD
if( !($result2 = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain users PM information', '', __LINE__, __FILE__, $sql);
}
$to_users = $db->sql_fetchrowset($result2);
$n=0;
while ($to_username_array[$n] && !$error)
{
if (strcasecmp($to_users[$n]['username'], str_replace("\'", "'",$to_username_array[$n])))
{
$error = TRUE;
$error_msg .= $lang['No_such_user']." '".str_replace("\'", "'", $to_username_array[$n]);
}
$n++;
}
}
else
{
// End replacement - Custom mass PM MOD
|
Current looks:
| Code:
|
if ( !($result = $db->sql_query($sql)) )
{
$error = TRUE;
$error_msg = $lang['No_such_user'];
}
if (!($to_userdata = $db->sql_fetchrow($result)))
{
$error = TRUE;
$error_msg = $lang['No_such_user'];
}
}
else
{
|
|
|
| Back to top |
|
 |
Wapture
Not So New User
Joined: 10 Mar 2004
Posts: 60
|
Posted: October 23rd 2006, 4:20 pm Post subject: |
|
|
Simple mate, just do the following
| Code:
|
#
#-----[ FIND ]------------------------------------------------
#
if ( !($result = $db->sql_query($sql)) )
{
$error = TRUE;
$error_msg = $lang['No_such_user'];
}
if (!($to_userdata = $db->sql_fetchrow($result)))
{
$error = TRUE;
$error_msg = $lang['No_such_user'];
}
}
else
{
#
#-----[ REPLACE WITH ]----------------------------------------
#
// Start replacement - Custom mass PM MOD
if( !($result2 = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain users PM information', '', __LINE__, __FILE__, $sql);
}
$to_users = $db->sql_fetchrowset($result2);
$n=0;
while ($to_username_array[$n] && !$error)
{
if (strcasecmp($to_users[$n]['username'], str_replace("\'", "'",$to_username_array[$n])))
{
$error = TRUE;
$error_msg .= $lang['No_such_user']." '".str_replace("\'", "'", $to_username_array[$n]);
}
$n++;
}
}
else
{
// End replacement - Custom mass PM MOD
|
|
|
| Back to top |
|
 |
121212
Not So New User
Joined: 20 Mar 2006
Posts: 26
|
Posted: October 26th 2006, 6:32 pm Post subject: |
|
|
i installed the same hack but theirs nuthing int he amdin panel for it.
maybe becouse when i try to run the sql file it says
| Quote:
|
This list is a result of the SQL queries needed for this Mod
Custom mass PM Mod
[Already added] line: 1 , ALTER TABLE phpbb_users ADD user_allow_mass_pm TINYINT (1) DEFAULT "2" AFTER user_allow_pm
[Already added] line: 2 , ALTER TABLE phpbb_groups ADD group_allow_pm TINYINT (2) DEFAULT "5" NOT NULL
|
|
|
| Back to top |
|
 |
Avinitlarge
New User
Joined: 08 Feb 2007
Posts: 4
|
Posted: February 8th 2007, 9:56 am Post subject: |
|
|
I installed the mod and got these errors yet the mod seems to work, What do I need to do to get rid of the errors??
| Code:
|
Warning: Wrong parameter count for usort() in /home/wwwmonde/public_html/forum/privmsg.php on line 1148
Warning: Cannot modify header information - headers already sent by (output started at /home/wwwmonde/public_html/forum/privmsg.php:1148) in /home/wwwmonde/public_html/forum/includes/page_header.php on line 503
Warning: Cannot modify header information - headers already sent by (output started at /home/wwwmonde/public_html/forum/privmsg.php:1148) in /home/wwwmonde/public_html/forum/includes/page_header.php on line 505
Warning: Cannot modify header information - headers already sent by (output started at /home/wwwmonde/public_html/forum/privmsg.php:1148) in /home/wwwmonde/public_html/forum/includes/page_header.php on line 506
|
|
|
| Back to top |
|
 |
anafao
New User
Joined: 12 Sep 2006
Posts: 22
|
Posted: February 22nd 2008, 3:39 pm Post subject: |
|
|
i get the same errors too
usort and apache?? probs |
|
| Back to top |
|
 |
|