2005-09-19, 09:59 PM
2005-09-20, 11:43 AM
i made a hack anyway
I love the private message table on bottom of forums in mybb rc4
I was not very happy with how chris did with new mybbpr2
I had to work more harder to get my board to whatever I want.
so here is the private message table mod
ELY M.
/////////////////////////////////////////////////////////////////
open index.php
Find this:
// Load global language phrases
$lang->load("index");
if($mybb->user['uid'] != 0)
{
ADD AFTER THIS:
/////private messages table /////
if($mybbuser['receivepms'] != "no" && $mybbgroup['canusepms'] != "no")
{
$query = $db->query("SELECT COUNT(*) AS pms_total, SUM(IF(dateline>'".$mybb->user['lastvisit']."' AND folder='1','1','0')) AS pms_new, SUM(IF(status='0' AND folder='1','1','0')) AS pms_unread FROM ".TABLE_PREFIX."privatemessages WHERE uid='".$mybb->user['uid']."'");
////$query = $db->query("SELECT COUNT(*) AS pms_total, SUM(IF(dateline>'$mybb[lastvisit]' AND folder='1','1','0')) AS pms_new, SUM(IF(status='0' AND folder='1','1','0')) AS pms_unread FROM ".TABLE_PREFIX."privatemessages WHERE uid='$mybb[uid]'");
$messages = $db->fetch_array($query);
if($messages['pms_new'] > 0)
{
$pmfolder = "on.gif";
}
else
{
$pmfolder = "off.gif";
$messages['pms_new'] = 0;
}
// the SUM() thing returns "" instead of 0
if($messages['pms_unread'] == "")
{
$pmfolder = "off.gif";
$messages['pms_unread'] = 0;
}
$lang->pms_new = sprintf($lang->pms_new, $messages['pms_new']);
$lang->pms_unread_total = sprintf($lang->pms_unread_total, $messages['pms_unread'], $messages['pms_total']);
eval("\$pms = \"".$templates->get("index_pms")."\";");
}
/////////////////////////////
go to your templates in your admin control.
Index Page Templates >>>> index
add $pms after $birthday
########
Done :D
2012-02-22, 01:46 AM
7 years since I posted about PM block thing. I wonder if anyone ever made plugin for this?
if not, I will try to make plugin for mybb 1.6
if not, I will try to make plugin for mybb 1.6