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 !

Postby aric on Sun 31. Aug, 2003 19:14

Actually, I got it to work by simply adding the { and } and commenting these lines to remove them...

Code: Select all
//   $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."')       
   //      )" ;


So now that whole section looks like this:

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


I've tested it for both regular users and admins and the mod works as it should (admins see the link to the mass PM area, regular users do not).

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

Postby Zed Oscuro on Tue 02. Sep, 2003 12:03

Like mine!

Now it works... but.. the code "removed" isn't useful?
Zed Oscuro
Poster
Poster
 
Posts: 12
Joined: Sun 02. Mar, 2003 15:59

Postby glson on Tue 09. Sep, 2003 12:39

I have the same problem, after removed this code it's working, this code isn't useful?
glson
Poster
Poster
 
Posts: 1
Joined: Tue 14. May, 2002 22:14

Postby aric on Tue 09. Sep, 2003 22:01

Sadly, I'm no PHP expert, but yes, it seems to work fine without it.

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

Postby Niels on Sun 14. Sep, 2003 23:33

I will post a updated version, witch fix this prob.
(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 DragonFire*_* on Thu 09. Oct, 2003 04:11

I too had this same problem. I commented out the SQL statement mentioned in the previous post and the problem disappeared. The if statement after the SQL statement looks correct and does not need the { and } around the following statement.
Watch your back, shoot straight, conserve ammo, and never ever cut a deal with a dragon.
DragonFire*_*
Poster
Poster
 
Posts: 9
Joined: Thu 25. Sep, 2003 19:39

Postby Niels on Thu 09. Oct, 2003 20:16

latest version should not have this isue anymore, please follow the upgrade path instead...
(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 DragonFire*_* on Thu 09. Oct, 2003 21:56

I just looked at the changes to the new version. I found that same problem and corrected it manually. I was just going to let everyone know here about it. :lol:

Glad to see you fixed it.
Watch your back, shoot straight, conserve ammo, and never ever cut a deal with a dragon.
DragonFire*_*
Poster
Poster
 
Posts: 9
Joined: Thu 25. Sep, 2003 19:39

Previous

Return to Custom mass PM [2.0.6/EM]

Who is online

Users browsing this forum: No registered users and 1 guest

cron