vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=228)
-   -   Chat Modifications - Cyb - ChatBox (https://vborg.vbsupport.ru/showthread.php?t=177552)

XiZa 07-18-2008 10:42 AM

I will make a new update of the changed template sometime soon as there is a new version there is no point in giving the old template.

It would be nice if you could integrate both styles of the chatbox and let users choose which to use.

Forgott3n 07-18-2008 06:26 PM

Great! I'm writing custom rewrite rules for it now (vbSEO!)

Shazz 07-18-2008 06:59 PM

If all suggestions got put in place, the mod would be so big the forum take 20 secs to load

PoetJA-1975 07-19-2008 04:25 AM

Quote:

Originally Posted by Cybernetec (Post 1577984)
Kitmitsu, option will be available in next version.

PoetJA, I don't have modified version you are searching for.

Thanx for responding - I do like the idea of implementing both styles so Admins can choose.
Thanx,

Jacquii.

Quote:

Originally Posted by XiZa (Post 1578340)
I will make a new update of the changed template sometime soon as there is a new version there is no point in giving the old template.

It would be nice if you could integrate both styles of the chatbox and let users choose which to use.

Yay! Will look forward to your post - Hopefully CYBERNETEC will implement both styles in the next update though so we can choose.

Thanx,

Jacquii.

kotlt99 07-19-2008 01:35 PM

I have set the minimum post requirement to see the chat box to 60.
But some of members with post lower than 60 just go to chatbox via the link:
http://link/misc.php?do=cchatbox

Could I do something to prevent that? :-?
It really annoy me

vip-q.com 07-19-2008 03:15 PM

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:
https://vborg.vbsupport.ru/attachmen...1&d=1216482956
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_exc1iif($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->userinfosplit(','$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->userinfosplit(','$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_smilies0);
                    
$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.'">&nbsp;</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.'">&nbsp;</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 ;)

Valter 07-19-2008 09:54 PM

Will be fixed in next version.

WildSoftCat 07-20-2008 09:51 PM

To use Favorite Smilies : https://vborg.vbsupport.ru/showthread.php?t=123116

Replace this

PHP Code:

                    $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); 

with this

PHP Code:

############### FAVORITE SMILIES #################
                  
global $permissions;
                  if ((
$vbulletin->userinfo['favsmilies']) AND ($vbulletin->options['favsmiliesactive']) AND ($permissions['favsmiliepermissions'] & $vbulletin->bf_ugp_favsmiliepermissions['canusefavsmilies'])) {
                
$show['favsmilies'] = true;
                
$favsmilies str_replace(" "", "$vbulletin->userinfo['favsmilies']);
                
$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)
                    WHERE smilieid IN (
$favsmilies)
                    ORDER BY imagecategory.displayorder, imagecategory.title, smilie.displayorder
                "
);
                
$favsmtotal $vbulletin->db->num_rows($cybcb_get_smilies);
                
$smilietotal $vbulletin->db->query_first("SELECT COUNT(*) as total FROM " TABLE_PREFIX "smilie");
                
$cybcb_smilies_total $smilietotal['total'];
            }
            else {
                
$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
                "
);
                
$cybcb_smilies_total $vbulletin->db->num_rows($cybcb_get_smilies);
            }
############### /FAVORITE SMILIES ################ 


SA_TGAZ 07-21-2008 06:14 PM

we have been running vbshout for a couple years now and just started using this chat box today; so far so good!

Subah 07-21-2008 08:12 PM

Is there any way to let the chat box shows only in one forum and not on the forumhome ?


All times are GMT. The time now is 10:04 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02202 seconds
  • Memory Usage 1,917KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_html_printable
  • (3)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete