Hi Cybernetec
i have the same prob. that kotlt99 have it ..
Quote:
have set the minimum post requirement to see the chat box to 60.
But some of members with post lower than 60
|
plz look for that .
For up and down like:

i replace this template cyb_chatbox with the following
HTML Code:
capy the source of http://qtify.com/vb/misc/cyb_chatbox.txt
and i set :
Message listing area height (ChatBox) : 150
Message listing area height (ChatBox Full) : 450
and i replace this plugin Cyb - ChatBox - IL with the following
PHP Code:
if ($vbulletin->options['cybchatbox_enable_product'])
{
if ($vbulletin->options['cybchatbox_script_locs']!='')
{
eval('$cybcb_locs = in_array(THIS_SCRIPT, array(misc,' . $vbulletin->options['cybchatbox_script_locs'] . '));');
}
else
{
eval('$cybcb_locs = !in_array(THIS_SCRIPT, array(cybchatbox));');
}
function Ccb_userExcluded($cybcb_user)
{
return (Ccb_checkExcluded($cybcb_user['userid'], 'cybchatbox_excluded_users') || Ccb_checkExcluded($cybcb_user['usergroupid'], 'cybchatbox_excluded_groups'));
}
function Ccb_checkExcluded($cybcb_exc1, $cybcb_exc2)
{
global $vbulletin;
return in_array($cybcb_exc1, iif($vbulletin->options[$cybcb_exc2], explode(',', $vbulletin->options[$cybcb_exc2]), array()));
}
$cybcb_hasenoughposts = true;
if (($vbulletin->userinfo['posts'] < $vbulletin->options['cybchatbox_excluded_pc']) AND !can_moderate())
{
$cybcb_hasenoughposts = false;
}
if (in_array(THIS_SCRIPT, array($cybcb_locs)) AND !Ccb_userExcluded($vbulletin->userinfo) AND empty($vbulletin->userinfo['infractiongroupids']) AND $cybcb_hasenoughposts)
{
$cybcb_canmod = false;
if (is_member_of($vbulletin->userinfo, split(',', $vbulletin->options['cybchatbox_can_mod'])))
{
$cybcb_canmod = true;
}
if ($vbulletin->options['cybchatbox_canviewonly']!='')
{
$cybchatbox_cantpost = '1,'.$vbulletin->options['cybchatbox_canviewonly'];
}
else
{
$cybchatbox_cantpost = '1';
}
$cybcb_cantpost = false;
if (is_member_of($vbulletin->userinfo, split(',', $cybchatbox_cantpost)))
{
$cybcb_cantpost = true;
}
if ($vbulletin->options['cybchatbox_smiliestotal']!=0)
{
$db->hide_errors();
$cybcb_get_smilies = $vbulletin->db->query_read_slave("
SELECT smilieid, smilietext, smiliepath, smilie.title, imagecategory.title AS category
FROM " . TABLE_PREFIX . "smilie AS smilie
LEFT JOIN " . TABLE_PREFIX . "imagecategory AS imagecategory USING(imagecategoryid)
ORDER BY imagecategory.displayorder, imagecategory.title, smilie.displayorder
LIMIT 0, ".$vbulletin->options['cybchatbox_smiliesinit']."
");
$cybcb_smilies_total = $vbulletin->db->num_rows($cybcb_get_smilies);
$vbulletin->db->data_seek($cybcb_get_smilies, 0);
$cybcb_i = 0;
$cybcb_smilie_bit = array();
while ($cybcb_smilie = $vbulletin->db->fetch_array($cybcb_get_smilies) AND ($cybcb_i++ < $cybcb_smilies_total))
{
$cybcb_smilie_id += 1;
exec_switch_bg();
if ($cybcb_smilie_id==1)
{
$cybcb_smilie_first = $cybcb_smilie['smiliepath'];
}
$cybcb_smilie_html = '<a style="display:block;margin:2px;overflow:hidden;width:'.$vbulletin->options['cybchatbox_smiliesclip'].'px;height:'.$vbulletin->options['cybchatbox_smiliesclip'].'px;" href="javascript:void(0);" onclick="return Ccb_insertSmilie(\''.str_replace("'", "\'", $cybcb_smilie['smilietext']).'\')"><img onmouseover="return Ccb_updateSmiliePreview(this.src);" src="'.$cybcb_smilie['smiliepath'].'" alt="'.$cybcb_smilie['title'].'" border="0" /></a>';
$cybcb_smilie_bit[] = '<td class="'.$bgclass.'">'.$cybcb_smilie_html.'</td>';
if (sizeof($cybcb_smilie_bit) == $vbulletin->options['cybchatbox_smiliesperrow'])
{
$cybcb_smilie_cell = implode('', $cybcb_smilie_bit);
$cybcb_smilie_bits .= '<tr align="center">'.$cybcb_smilie_cell.'</tr>';
$cybcb_smilie_bit = array();
}
}
$cybcb_smilies_remaining = sizeof($cybcb_smilie_bit);
if ($cybcb_smilies_remaining > 0)
{
$cybcb_smilies_colrem = $vbulletin->options['cybchatbox_smiliesperrow'] - $cybcb_smilies_remaining;
$cybcb_smilie_bit[] = '<td colspan="'.$cybcb_smilies_colrem.'"> </td>';
$cybcb_smilie_cell = implode('', $cybcb_smilie_bit);
$cybcb_smilie_bits .= '<tr align="center" valign="bottom">'.$cybcb_smilie_cell.'</tr>';
}
$db->show_errors();
unset($cybcb_get_smilies, $cybcb_smilie);
$cybcb_smilies_init = '<table cellpadding="2" cellspacing="0" border="0" align="center">'.$cybcb_smilie_bits.'</table>';
}
if ($_REQUEST['do']!='cchatbox')
{
$cybcb_height_messarea = $vbulletin->options['cybchatbox_height'].'px';
$cybcb_height_input = ($vbulletin->options['cybchatbox_height']-100).'px';
$cybcb_height_smblock = ($cybcb_height_input-12).'px';
}
else
{
$cybcb_height_messarea = $vbulletin->options['cybchatbox_height_full'].'px';
$cybcb_height_input = ($vbulletin->options['cybchatbox_height_full']-400).'px';
$cybcb_height_smblock = ($cybcb_height_input-12).'px';
}
$cybcb_height_input_wstatus = ($cybcb_height_input - 20).'px';
$db->hide_errors();
$cybcb_get_newstat = $vbulletin->db->query_read("
SELECT id
FROM " . TABLE_PREFIX . "cyb_chatbox AS cyb_chatbox
WHERE dateline > '".$vbulletin->userinfo['lastvisit']."'
");
$db->show_errors();
if ($db->num_rows($cybcb_get_newstat)>0)
{
$cybcb_newstat = construct_phrase($vbphrase['cybcb_x_new_messages'], $db->num_rows($cybcb_get_newstat));
}
else
{
$cybcb_newstat = $vbphrase['cybcb_no_new_messages'];
}
$cybcb_colorlist = explode(',',str_replace(' ', '', $vbulletin->options['cybchatbox_textcolors']));
foreach ($cybcb_colorlist AS $cybcb_color)
{
$cybcb_colors .= '<option style="background-color:'.$cybcb_color.';color:'.$cybcb_color.';" value="'.$cybcb_color.'"> </option>'."\n";
}
$vbulletin->input->clean_gpc('c', 'ccb_m_size', TYPE_UINT);
$cybcb_textsize = $vbulletin->GPC['ccb_m_size'];
if (!$cybcb_textsize)
{
$cybcb_textsize = 11;
}
$cybcb_sizelist = explode(',',str_replace(' ', '', $vbulletin->options['cybchatbox_textsizes']));
foreach ($cybcb_sizelist AS $cybcb_size)
{
eval('$cybcb_sizes .= " <option value=\"'.$cybcb_size.'\" " . iif($cybcb_textsize==$cybcb_size," selected=\"selected\"","").">'.$cybcb_size.'px</option> "."\n";');
}
$cybcb_textsize .= 'px';
$cybcb_sectok = $vbulletin->userinfo['securitytoken'];
if (!$cybcb_sectok)
{
$cybcb_sectok = 'none';
}
eval('$cybchatbox = "' . $vbulletin->templatecache['cyb_chatbox'] . '";');
if ($vbulletin->options['cybchatbox_page_loc']>0)
{
if ((THIS_SCRIPT!='misc') AND ($vbulletin->options['cybchatbox_page_loc']==1))
{
$vbulletin->templatecache['navbar'] = $vbulletin->templatecache['navbar'].'$cybchatbox <br />';
}
if ((THIS_SCRIPT!='misc') AND ($vbulletin->options['cybchatbox_page_loc']==2))
{
$vbulletin->templatecache['footer'] = '<br /> $cybchatbox'.$vbulletin->templatecache['footer'];
}
if ((THIS_SCRIPT!='misc') AND ($vbulletin->options['cybchatbox_page_loc']==3))
{
$vbulletin->templatecache['FORUMHOME'] = str_replace('$ad_location[ad_forumhome_afterforums]', '$ad_location[ad_forumhome_afterforums] $cybchatbox', $vbulletin->templatecache['FORUMHOME']);
}
}
if (($vbulletin->options['cybchatbox_auto_prune']>0) AND $vbulletin->userinfo['userid'])
{
$cybcb_prunetime = TIMENOW - ($vbulletin->options['cybchatbox_auto_prune'] * 3600);
$db->hide_errors();
$vbulletin->db->query_write(" DELETE FROM " . TABLE_PREFIX . "cyb_chatbox WHERE dateline < '".$cybcb_prunetime."' ");
$db->show_errors();
}
}
if (!Ccb_userExcluded($vbulletin->userinfo) AND empty($vbulletin->userinfo['infractiongroupids']) AND !$cybcb_cantpost)
{
$cybcb_navbarlink = "<a href=\"misc.php?do=cchatbox\">".$vbphrase['cybcb_chatbox_full']."</a>";
if ($vbulletin->options['cybchatbox_autoinsertlink'])
{
$vbulletin->templatecache['navbar'] = str_replace('vbphrase[faq]</a></td>','vbphrase[faq]</a></td><td class=\"vbmenu_control\">$cybcb_navbarlink</td>',$vbulletin->templatecache['navbar']);
}
}
}
this is what i do , not professional but it is done ..
Cybernetec ,
may you add this features in next version ,
Users with post count less than X can not post messages