
10-24-2006, 09:05 AM
|
|
|
Join Date: Jun 2005
Location: Australia
Posts: 2,469
Благодарил(а): 0 раз(а)
Поблагодарили:
0 раз(а) в 0 сообщениях
|
|
Quote:
Originally Posted by SirAdrian
Replace the 'Support Forum - Seperate Open from Closed' plugin with this:
PHP Code:
global $vbulletin, $threadCounter, $openThreads, $closedThreads;
$show['thread_seperator'] = false;
if (!$thread['sticky'] and $vbulletin->options['openAtTop'])
{
if ($vbulletin->options['openAtTop'])
{
$threadHeadings = array(
'issues' => array(
'Open Issues',
'Closed Issues'
),
'threads' => array(
'Open Threads',
'Closed Threads'
),
'customers' => array(
'Angry Customers',
'Happy Customers'
)
);
switch ($thread['forumid'])
{
case 1:
case 2:
$headings =& $threadHeadings['issues'];
break;
case 3:
case 4:
$headings =& $threadHeadings['customers'];
break;
default:
$headings =& $threadHeadings['threads'];
}
if (!$openThreads and $thread['open'])
{
$show['thread_seperator'] = true;
$thread['heading'] = $headings[0];
}
if (!$closedThreads and !$thread['open'])
{
$show['thread_seperator'] = true;
$thread['heading'] = $headings[1];
}
$lastOpenStatus = $thread['open'];
}
if ($thread['open']) $openThreads++;
if (!$thread['open']) $closedThreads++;
}
Basically it has 3 different sets of phrases, and then a switch to figure out which set to use. Customize the values inside the switch to change which forums use what heading, and then default will handle the rest. I'll end up phrasing it next week when I get some time, but this isn't a bad solution.
|
Thanks for your fast response, hopefully I'll get time to implement this asap as it will be a good feature for my forums.
Thanks
|