MyBB Community Forums

Full Version: How to translate PM Folders (1.1.x)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,
I searched a solution for PM folders titles on registering member.
Solution for 1.1.x ONLY


REMEMBER!! FIRST BACKUP FILES !!
OK let's go Smile

Open private.php

Find and delete:
if(!$mybb->user['pmfolders'])
{
        $mybb->user['pmfolders'] = "1**Inbox$%%$2**Sent Items$%%$3**Drafts$%%$4**Trash Can";
           $db->query("UPDATE ".TABLE_PREFIX."users SET pmfolders='".$mybb->user[pmfolders]."' WHERE uid='".$mybb->user[uid]."'");
}

Find:
                                     
if($key > $highestid)
{
           $highestid = $key;
}
if($key == "1" && $val == "")
{
           $val = "Inbox";
}
if($key == "2" && $val == "")
{
           $val = "Sent Items";
}
if($key == "3" && $val == "")
{
           $val = "Drafts";
}
if($key == "4" && $val == "")
{
           $val = "Trash Can";
}
And translate (Inbox,Sent Items,Drafts,Trash Can)

Save and upload

Open member.php

Find:
"timezone" => addslashes($mybb->input['timezoneoffset']),

Add Below:
"pmfolders" => "1**Inbox$%%$2**Sent Items$%%$3**Drafts$%%$4**Trash Can",

Translate it,save and upload.

Registration READY!

If you have a members run this query on phpMyAdmin(Tutorial here)

(translate and change prefix if you not using a default [mybb_])
UPDATE mybb_users SET pmfolders="1**Inbox$%%$2**Sent Items$%%$3**Drafts$%%$4**Trash Can";

Good Luck
,Xniver
that in members.php isn't necessary
I didnt understand what Xniver tried to do here,
someone can explain please?
dvb Wrote:I didnt understand what Xniver tried to do here,
someone can explain please?

There are no file changes needed anymore ... you can edit the folder names in your UCP ... Menu - Messenger - Edit Folders