I have this problem

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 !

I have this problem

Postby jobbesat on Sun 17. Nov, 2002 12:31

before installing Mass PM, if you go to a user's profile and click on PM, automatically it places the username in the appropriate field, but now it does not do this function; clicking on PM you have the filed empty and you have to "find a username" or of course type the one you want. Is it normal or did I miss something?

Thanks a lot in advance.
jobbesat
Special supporter
 
Posts: 191
Joined: Tue 07. May, 2002 16:21

Postby Niels on Sun 17. Nov, 2002 13:20

I do not have this problem, s I guess this should not hapen after this mod (lates version)
User avatar
Niels
Poster
Poster
 
Posts: 4390
Joined: Sat 27. Jul, 2002 15:46

Can you

Postby jobbesat on Sun 17. Nov, 2002 16:31

give me a hint about the file which can cause that error? Privmsg.php?
jobbesat
Special supporter
 
Posts: 191
Joined: Tue 07. May, 2002 16:21

Postby Niels on Tue 19. Nov, 2002 00:28

yes privmsg.php are the file to check
User avatar
Niels
Poster
Poster
 
Posts: 4390
Joined: Sat 27. Jul, 2002 15:46

Postby Niels on Wed 20. Nov, 2002 19:11

I have recived your file, and it look like you have miss placed this piece of code

Code: Select all
if( !($result2 = $db->sql_query($sql)) )
{
.
.
.


the reason why this did happen was mine, since a find tag was 2 places in the file, I have corrected this, in the how-to

thnaks
User avatar
Niels
Poster
Poster
 
Posts: 4390
Joined: Sat 27. Jul, 2002 15:46

Sorry Niels

Postby jobbesat on Thu 21. Nov, 2002 08:27

but now I don't know how to roll back the instructions and apply the new one :oops:
I don't have a this part of code and there is not even in a "virgin" privmsg.php
Code: Select all
if ( !($result = $db->sql_query($sql)) )
{
   $error = TRUE;
   $error_msg = $lang['No_such_user'];
}
}
else
{


while there's
Code: Select all
         if ( !($result = $db->sql_query($sql)) )
         {
            $error = TRUE;
            $error_msg = $lang['No_such_user'];
         }

         $to_userdata = $db->sql_fetchrow($result);
      }
      else
      {


and in my privmsg.php there's
Code: Select all
         if ( !($result2 = $db->sql_query($sql)) )
{
   $error = TRUE;
   $error_msg = $lang['No_such_user'];
}

         // $to_userdata = $db->sql_fetchrow($result);
      }
      else
      {

That line is decommented after one of the changes in the previous version of mass_pm.

Thanks a lot in advance.
jobbesat
Special supporter
 
Posts: 191
Joined: Tue 07. May, 2002 16:21

Niels

Postby jobbesat on Fri 22. Nov, 2002 17:44

Can you please help me in rolling back and then apply changes for part 2 :?:
I just want to know how to roll back this part
Code: Select all
         $sql = "SELECT username,user_id, user_notify_pm, user_email, user_lang, user_active
            FROM " . USERS_TABLE . "
            WHERE username IN (" . str_replace("\'", "''", $to_usernames) . ")
               AND user_id <> " . ANONYMOUS." ORDER BY username ASC";
         if ( !($result2 = $db->sql_query($sql)) )
{
   $error = TRUE;
   $error_msg = $lang['No_such_user'];
}

         // $to_userdata = $db->sql_fetchrow($result);
      }
      else
      {

And then where to apply this part
Code: Select all
#
#-----[ FIND ]------------------------------------------
#
if ( !($result = $db->sql_query($sql)) )
{
   $error = TRUE;
   $error_msg = $lang['No_such_user'];
}
}
else
{

#
#-----[ REPLACE WITH ]------------------------------------------
#
if( !($result2 = $db->sql_query($sql)) )
{
   message_die(GENERAL_ERROR, 'Could not obtain users PM information', '', __LINE__, __FILE__, $sql);
}
// verify all names are found
$to_users = $db->sql_fetchrowset($result2);
$db->sql_rowseek(0,$result2);
$n=0;
while ( $to_username_array[$n] && !$error)
{
   if (strcasecmp($to_users[$n]['username'],$to_username_array[$n]))
   {
      $error = TRUE;
      $error_msg .= $lang['No_such_user']." '".$to_username_array[$n]."'";
   }
   $n++;
}
}
else
{
jobbesat
Special supporter
 
Posts: 191
Joined: Tue 07. May, 2002 16:21

Hy Niels

Postby jobbesat on Fri 22. Nov, 2002 18:05

I solved some way, don't ask me how, but it seems to work; just a notification, after rolling back and reapplying the code, I don't have no more now the line:
// $to_userdata = $db->sql_fetchrow($result);

and since it's uncommented I thought it was not a great loss, just tell me if I missed something, thanks a lot.
jobbesat
Special supporter
 
Posts: 191
Joined: Tue 07. May, 2002 16:21

Next

Return to Custom mass PM [2.0.6/EM]

Who is online

Users browsing this forum: No registered users and 1 guest

cron