Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
1.8.20 Empty folders - message count of unread instead of inbox
#1

  1. Go to private messages
  2. Click empty folders
  3. There are message count field that show count of unread messages instead of messages from inbox, despite the all messages are read. Inbox shows 0.
Reply
#2
Please include the screenshot because I think you use a special plugin for that, am I right?
[MyBB 1.8 Czech translation] [MyBB 1.8 plugins]: Prune old PMs + optimize DB plugin --- Thank you/like system
Reply
#3
... and the plugin is now incompatible because of new structure of folders.
@Eldenroot has a fixed version of that plugin I believe... Toungue
[Image: logo.svg.svg]
Reply
#4
private.php - inbox
   
private.php?action=empty - empty folders
   
I have all messages read, not unread how suggests empty folders page.
   

It's clean version of the newest mybb. There are no plugins.
Reply
#5
It's because the new folder structure isn't regarded at this point.
You could do something like this:

In private.php search for:
$foldersexploded = explode("$%%$", $mybb->user['pmfolders']);
$folderlist = '';
foreach($foldersexploded as $key => $folders)
{
    $folderinfo = explode("**", $folders, 2);
    $fid = $folderinfo[0];
    $foldername = get_pm_folder_name($fid, $folderinfo[1]);
    $query = $db->simple_select("privatemessages", "COUNT(*) AS pmsinfolder", " folder='$fid' AND uid='".$mybb->user['uid']."'");
    $thing = $db->fetch_array($query);
    $foldercount = my_number_format($thing['pmsinfolder']);
    eval("\$folderlist .= \"".$templates->get("private_empty_folder")."\";");
}

and change it to:
$foldersexploded = explode("$%%$", $mybb->user['pmfolders']);
$folderlist = $unread = '';
foreach($foldersexploded as $key => $folders)
{
    $folderinfo = explode("**", $folders, 2);
    $fid = $folderinfo[0];
    if($folderinfo[0] == "1")
    {
        $fid = "1";
        $unread = " AND status='0'";
    }
    if($folderinfo[0] == "0")
    {
        $fid = "1";
    }
    $foldername = get_pm_folder_name($folderinfo[0], $folderinfo[1]);
    $query = $db->simple_select("privatemessages", "COUNT(*) AS pmsinfolder", " folder='$fid'$unread AND uid='".$mybb->user['uid']."'");
    $thing = $db->fetch_array($query);
    $foldercount = my_number_format($thing['pmsinfolder']);
    eval("\$folderlist .= \"".$templates->get("private_empty_folder")."\";");
}
Reply
#6
(03-24-2019, 09:05 PM)effone Wrote: ... and the plugin is now incompatible because of new structure of folders.
@Eldenroot has a fixed version of that plugin I believe... Toungue
Unfortunately not, waiting for your reply Smile you wrote that it is simple and you look soon Smile
(03-25-2019, 06:19 PM)Poftorek Wrote: private.php - inbox

private.php?action=empty - empty folders

I have all messages read, not unread how suggests empty folders page.


It's clean version of the newest mybb. There are no plugins.
OK, this is not related to plugin, you are right, this is a bug in an implementation
[MyBB 1.8 Czech translation] [MyBB 1.8 plugins]: Prune old PMs + optimize DB plugin --- Thank you/like system
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)