As you know, the current version(Ver3.XX) of this PM-hack still has something inefficient and inconvenient.
For example,
While you can easily designate the box_limit and GroupPM-policy[PM-policy] of your system to your old members,
you have to designate the PM-policy of your system to your newcomer individually or all at once whenever you have a new member.
I mean the PM-policy of your system won't be applied to your newcomer automatically.
ex> You set the PM-policy of your system like this. ==> pbox_max = 300 rbox_max =200 and your own GroupPM-policy.
You have a new member ==> his/her PM-config gets the default value like this. ==> pbox_max = 5000 rbox_max = 5000 and default GroupPM-policy.
^^;;
The reason is simple.....
because I didn't make such an automatic function yet.
Umm....
but...I still think it's not the right time for that function....^^
So you have to solve this stupid problem...by/for yourself.
Umm..
I recommend this temporary solution that you modify the forcemake function of privmessageconfig.php.
I mean you can apply the PM-policy of your system by changing default values of forcemake function manually.
^^;; I know it's inefficient and even ridiculous...but..in this stage...you have to^^;; Sorry^^
function forcemake(&$pmconfig,$uid)
{
if (get_class($pmconfig) != 'xoopsprivmessageconfig') {
return false;
}
$conf_id = $this->db->genId('priv_msgs_config_conf_id_seq');
$uid = intval($uid);
$filter_word = "";
$reject_reason = "";
$blacklist = "";
$pmgroup_list = "";
$sql = sprintf("INSERT INTO %s (conf_id, uid, filter_ok, filter_word, reject_ok, reject_reason, blacklist, pmsort, pmorder, pmlimit, trashbox_ok, popup_ok, newpopup, mail_ok, rbox_max, pbox_max, grouppm_adminok, grouppm_mygroupok, grouppm_rusergroupok, pmgroup_list, grouppm_limit, grouppm_limit_now, grouppm_limit_start ) VALUES (%u, %u, %u, %s, %u, %s, %s, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %s, %u, %u, %u)", $this->db->prefix('priv_msgs_config'), $conf_id, $uid, 0, $this->db->quoteString($filter_word), 0, $this->db->quoteString($reject_reason), $this->db->quoteString($blacklist), 0, 0, 10, 0, 0, 0, 0, 5000, 5000, 0, 0, 0, $this->db->quoteString($pmgroup_list), 5, 0, time());
if (!$this->db->queryF($sql)) {
return false;
}
return true;
}
box_max:5000, 5000,
GroupPM policy: 0, 0, 0, $this->db->quoteString($pmgroup_list), 5
Change these^^
...
btw
I have mentioned this functon....like this.
Quote:
If you make pmconfig-record of each user at the same time when you create his account(I mean user-info),
this process...is not needed!!!
but...
most of you already...have your members(without their pmconfig-record)...
so..the process that makes his/her pmconfig-record forcibly.....is needed...(Yeah..mysql is still cool^^)
Umm....
I inserted this process...into every file of this hack^^...So...I can...say..it's redundant...in common.php
if(!$pmconfig_handlerpopup->forcemake($pmconfigpopup,$xoopsUser->getVar("uid"))) {
echo $pmconfigpopup->getHtmlErrors();
}
else {
$pmconfigpopup = & $pmconfig_handlerpopup->getbyuid($xoopsUser->getVar("uid"));
}