phpp 2.0.18 compatability

Makes it posble for admin to specify witch type of users may mass PM any usergroup
Also PM users can be a list of usernames, so PM can be sendt to any number of users

Moderator: Moderators

Forum rules
The content in this forum is dated Dec. 21 2005 and can be used as Archive only. This Forum is LOCKED and READ ONLY !

phpp 2.0.18 compatability

Postby AnaRQy on Sun 30. Oct, 2005 23:49

Here's some of the mass pm changes to privmsg.php:

#-----[ 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


These are changes for the same file required for upgrade to phpbb 2.0.18:

#-----[ FIND ]---------------------------------------------
#
$to_userdata = $db->sql_fetchrow($result);

#
#-----[ REPLACE WITH ]---------------------------------------------
#
if (!($to_userdata = $db->sql_fetchrow($result)))
{
$error = TRUE;
$error_msg = $lang['No_such_user'];
}


As you can see, they both refer to the same line in privmsg.php. What I'd like to know is what the changes would be so I can upgrade to phpbb 2.0.18 without breaking the Mass PM mod I have installed.

Any thoughts on this?
Her-e-tic...(n. her'i tik) (...) 3. anyone who does not conform with an established attitude, doctrine, or principle.
Image
AnaRQy
Poster
Poster
 
Posts: 24
Joined: Fri 12. Nov, 2004 05:18

Postby MandersOnline on Mon 31. Oct, 2005 11:15

I can't find the code you put on here.

In the Modification version 1.4.7 the folowing changed:

Code: Select all
#
#-----[ 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

#


Maybe someone has an solution for me
MandersOnline
User avatar
MandersOnline
Poster
Poster
 
Posts: 43
Joined: Sun 04. May, 2003 21:29
Location: Amsterdam, Netherlands

Postby AnaRQy on Mon 31. Oct, 2005 14:44

Thanks for the reply MandersO, but I think you missed my point. Since one of the MassPM-changed lines is a required change in the 2.0.18 update, I'm wondering how the Mass-PM mod instructions should change.

There's a couple ways I could go about doing it, I was wondering if Niels could tell me the correct one ;)
Her-e-tic...(n. her'i tik) (...) 3. anyone who does not conform with an established attitude, doctrine, or principle.
Image
AnaRQy
Poster
Poster
 
Posts: 24
Joined: Fri 12. Nov, 2004 05:18

Postby MandersOnline on Tue 01. Nov, 2005 15:21

I've Changed the code like your way.

When Niels has more Information we can change it, for now it wil work :)

Thanks a Lot
MandersOnline
User avatar
MandersOnline
Poster
Poster
 
Posts: 43
Joined: Sun 04. May, 2003 21:29
Location: Amsterdam, Netherlands

Postby AnaRQy on Tue 01. Nov, 2005 15:29

Looking at the changes for both Mass PM mod and the .18 upgrade, I'm not sure the .18 changes even need to be applied there. It looks like the Mass PM mod already took care of that with its changes :)

Confirmation by Niels would be much appreciated however in giving me a comfort level applying this mod.
Her-e-tic...(n. her'i tik) (...) 3. anyone who does not conform with an established attitude, doctrine, or principle.
Image
AnaRQy
Poster
Poster
 
Posts: 24
Joined: Fri 12. Nov, 2004 05:18

Postby ChristianR on Mon 07. Nov, 2005 20:16

so we should skip this out?

Code: Select all
#
#-----[ FIND ]---------------------------------------------
#
         $to_userdata = $db->sql_fetchrow($result);

#
#-----[ REPLACE WITH ]---------------------------------------------
#
         if (!($to_userdata = $db->sql_fetchrow($result)))
         {
            $error = TRUE;
            $error_msg = $lang['No_such_user'];


for now?
ChristianR
Poster
Poster
 
Posts: 47
Joined: Sun 18. Jan, 2004 14:17

Postby AnaRQy on Mon 07. Nov, 2005 20:18

Well, after getting no "official" guidance on this thread, that's exactly what I did and it seems the group pm mod still works. I have tested it sending a PM to a group, haven't tested sending it to a list of people yet.

Unless I hear differently I'll just go with it. Guess Niels doesn't have time for this or whatever.
Her-e-tic...(n. her'i tik) (...) 3. anyone who does not conform with an established attitude, doctrine, or principle.
Image
AnaRQy
Poster
Poster
 
Posts: 24
Joined: Fri 12. Nov, 2004 05:18


Return to Custom mass PM [2.0.6/EM]

Who is online

Users browsing this forum: No registered users and 1 guest

cron