Disappeared PM

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 !

Disappeared PM

Postby Zed Oscuro on Sun 24. Aug, 2003 20:51

I installed the mod, but my users (i -admin- don't have this prob) when they access to their in-box folder can't view any message, and it's like ALL folders (in-box, out-box etc) are empty... but it's not true!

the graph of the folder's size is correct..... and the in the db there're the pm.....

where's the prob?
Zed Oscuro
Poster
Poster
 
Posts: 12
Joined: Sun 02. Mar, 2003 15:59

Postby Niels on Sun 24. Aug, 2003 21:07

I would verify the changes done into privmsg.php and privmsgs_body.tpl
you might have done some thing wrong - so a good starting would be to restore these to files, and do the mod into these once more
(if a how-to is EM ready, it will mostly be bullet prof, since a machine is more picky than a human. :D)
User avatar
Niels
Poster
Poster
 
Posts: 4390
Joined: Sat 27. Jul, 2002 15:46

Postby Zed Oscuro on Sun 24. Aug, 2003 22:26

Niels wrote:I would verify the changes done into privmsg.php and privmsgs_body.tpl
you might have done some thing wrong - so a good starting would be to restore these to files, and do the mod into these once more


I try it, but it doesn't work... where it can be the mistake?
Zed Oscuro
Poster
Poster
 
Posts: 12
Joined: Sun 02. Mar, 2003 15:59

Postby -=ET=- on Mon 25. Aug, 2003 00:44

Strange, I've never seen that :(
Eternal newbie
User avatar
-=ET=-
brilliant supporter
 
Posts: 240
Joined: Sun 25. May, 2003 20:02
Location: France

Postby Zed Oscuro on Tue 26. Aug, 2003 10:59

i think that the prob is here:

Code: Select all
// Start add - Custom mass PM MOD
include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_mass_pm.' . $phpEx);

if ( $userdata['user_id'] != ANONYMOUS )
{
   if ( $userdata['user_level'] == ADMIN )
   {
      $mass_pm_img = '<a href="' . append_sid("groupmsg.$phpEx") . '"><img src="' . $images['mass_pm'] . '" border="0" alt="' . $lang['Mass_pm'] . '" /></a>';
   } else
   {
      $sql = "SELECT DISTINCT g.group_id, g.group_name
      FROM ".GROUPS_TABLE . " g, ".USER_GROUP_TABLE . " ug
      WHERE g.group_single_user <> 1
         AND (
            (g.group_allow_pm='".AUTH_MOD."' AND g.group_moderator = '" . $userdata['user_id']."') OR 
            (g.group_allow_pm='".AUTH_ACL."' AND ug.user_id = " . $userdata['user_id'] . " AND ug.group_id = g.group_id ) OR
            (g.group_allow_pm='".AUTH_REG."')       
         )" ;
      if( !$g_result = $db->sql_query($sql) ) message_die(GENERAL_ERROR, "Could not select group names!", __LINE__, __FILE__, $sql);
      $group_list = $db->sql_fetchrowset($g_result);

      if( !empty($group_list) )
      {
         $mass_pm_img = '<a href="' . append_sid("groupmsg.$phpEx") . '"><img src="' . $images['mass_pm'] . '" border="0" alt="' . $lang['Mass_pm'] . '" /></a>';
      }
   }
}
// End add - Custom mass PM MOD


somewhere :wink:
Zed Oscuro
Poster
Poster
 
Posts: 12
Joined: Sun 02. Mar, 2003 15:59

Postby Zed Oscuro on Thu 28. Aug, 2003 23:33

I do this mod:

Code: Select all
   //else
   //{
      //$sql = "SELECT DISTINCT g.group_id, g.group_name
      //FROM ".GROUPS_TABLE . " g, ".USER_GROUP_TABLE . " ug
      //WHERE g.group_single_user <> 1
         //AND (
            //(g.group_allow_pm='".AUTH_MOD."' AND g.group_moderator = '" . $userdata['user_id']."') OR 
            //(g.group_allow_pm='".AUTH_ACL."' AND ug.user_id = " . $userdata['user_id'] . " AND ug.group_id = g.group_id ) OR
            //(g.group_allow_pm='".AUTH_REG."')       
         //)" ;
      //if( !$g_result = $db->sql_query($sql) ) message_die(GENERAL_ERROR, "Could not select group names!", __LINE__, __FILE__, $sql);
      //$group_list = $db->sql_fetchrowset($g_result);

//      if( !empty($group_list) )
   //   {
      //   $mass_pm_img = '<a href="' . append_sid("groupmsg.$phpEx") . '"><img src="' . $images['mass_pm'] . '" border="0" alt="' . $lang['Mass_pm'] . '" /></a>';
      //}
   //}


to the code in privmsg.php and now it works....
Zed Oscuro
Poster
Poster
 
Posts: 12
Joined: Sun 02. Mar, 2003 15:59

Postby aric on Sun 31. Aug, 2003 05:29

I had a similar problem when somone pointed out that the second to last IF block is missing the { and }

so it should look like this:
Code: Select all
      if( !$g_result = $db->sql_query($sql) ) message_die(GENERAL_ERROR, "Could not select group names!", __LINE__, __FILE__, $sql);
     {
      $group_list = $db->sql_fetchrowset($g_result);
     }


Then that block of code should work OK.

Regards,

Aric
aric
Poster
Poster
 
Posts: 3
Joined: Sun 24. Aug, 2003 00:39

Postby Zed Oscuro on Sun 31. Aug, 2003 10:27

aric wrote:
Then that block of code should work OK.

Regards,

Aric


Thanx for help, but it doesn't work anyway.... the prob is in:

Code: Select all
   else
   {
      $sql = "SELECT DISTINCT g.group_id, g.group_name
      FROM ".GROUPS_TABLE . " g, ".USER_GROUP_TABLE . " ug
      WHERE g.group_single_user <> 1
         AND (
            (g.group_allow_pm='".AUTH_MOD."' AND g.group_moderator = '" . $userdata['user_id']."') OR 
            (g.group_allow_pm='".AUTH_ACL."' AND ug.user_id = " . $userdata['user_id'] . " AND ug.group_id = g.group_id ) OR
            (g.group_allow_pm='".AUTH_REG."')       
         )" ;
Zed Oscuro
Poster
Poster
 
Posts: 12
Joined: Sun 02. Mar, 2003 15:59

Next

Return to Custom mass PM [2.0.6/EM]

Who is online

Users browsing this forum: No registered users and 1 guest

cron