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)

Digital Jedi 11-12-2008 03:53 AM

You'd probably have to go with MCG ChatBox Evo for that functionality. It's somewhat harder to install, and doesn't always jibe with everyone's forum, such as mine, but it's the only one I know of that does that. However, you can set this one to only show to certain user groups if your not intending it to be a system that the whole forum uses.

bratok-rose.com 11-12-2008 04:34 AM

thanks

AdmiralGeek 11-12-2008 12:47 PM

For people who want permissions for who is allowed to view and not view the chatbox full and the chat box archives can use the following code that I created. It will also stop them from searching the chatbox(as searching the chat box requires access to the archives. A Detailed explanation is giving at the end.

The code is generic and adding user groups can be used if you wish to add them.

1 File edit is required and 1 template edit is required(with 3 sub edits).

1 File = misc.php

Find
PHP Code:

require_once('./global.php');

// redirect in case anyone has linked to it
if ($_REQUEST['do'] == 'attachments')
{
    
exec_header_redirect('profile.php?' $vbulletin->session->vars['sessionurl_js'] . 'do=editattachments');


Below it add the following and save(upload)


Add After:
PHP Code:

// testing chatbox

$urlname1  "ccarc";
$urlname2 "misc.php?do=cchatbox";
$vbuser $vbulletin->userinfo['userid'];
$names = array("2","178","25");
if(
in_array("$vbuser",$names));
$inarray "yes";
$pos strpos($_SERVER['REQUEST_URI'],"misc.php?do=cchatbox");
$self substr($_SERVER['REQUEST_URI'],$pos);
if (
$self == $urlname2 || $urlname1 && $inarray == "yes"){
echo 
"<script language=\"JavaScript\" type=\"text/javascript\">
history.go(-1) </script>"
;


1 Template Edit = cyb_chatbox

Please take note that you need to enter the user ID's that you do not want viewing the archive or full chat box mode. Simply enter the ID's into the below arrays for all three accounts, and remember these ID's have to be the same as the ID's that you entered into the misc.php file.
if condition="!in_array($bbuserinfo[userid],array(25,178,2))"

Find:
PHP Code:

                    <td class="vbmenu_option"><a href="misc.php?do=cchatbox">$vbphrase[cybcb_go_separate]</a></td>
                </
tr

Replace With:
PHP Code:

<!-- test -->
<if 
condition="!in_array($bbuserinfo[userid],array(25,178,2))">

                    <
td class="vbmenu_option"><a href="misc.php?do=cchatbox">$vbphrase[cybcb_go_separate]</a></td>
                </
tr>
<else />
                    <
td class="vbmenu_option"><a href="javascript:alert('You are not allowed to view the full chat box');"><span id="joejoe" style="color: red;">Denied</spanClick here</a></td>
                </
tr>
<!-- 
test --> </if> 

-------------------------------------

Find:
PHP Code:

                    <td class="vbmenu_option"><a href="misc.php?do=ccarc">$vbphrase[cybcb_go_archive]</a></td>
                </
tr

Replace with:
PHP Code:

<!-- test -->
<if 
condition="!in_array($bbuserinfo[userid],array(25,178,2))">
                    <
td class="vbmenu_option"><a href="misc.php?do=ccarc">$vbphrase[cybcb_go_archive]</a></td>
                </
tr>
<else />
                    <
td class="vbmenu_option"><a href="javascript:alert('Your not allowed to view the archive');"><span id="joejoe" style="color: red;">Denied</spanClick here</a></td>
                </
tr>
</if> <!-- 
test --> 

Find:
PHP Code:

<tr>
                <
td class="thead">$vbphrase[cybcb_search_chatbox]</td>
            </
tr>

            <
tr>
                <
td class="vbmenu_option"><a href="misc.php?ccbfind=unread">$vbphrase[cybcb_find_first_unread]</a></td>
            </
tr>
            <if 
condition="($bbuserinfo[userid])">
            <
tr>
                <
td class="vbmenu_option"><a href="misc.php?ccbfind=$bbuserinfo[userid]">$vbphrase[cybcb_find_your_last]</a></td>
            </
tr>
            </if>
            <if 
condition="($_REQUEST['do']!='ccarc')">
                <
tr>
                    <
td class="vbmenu_option" title="nohilite">
                        <
form id="cybcb_search" name="cybcb_search" action="misc.php?do=ccarc" method="post">
                            <
input type="hidden" name="securitytoken" value="$cybcb_sectok/>
                            <
input type="text" class="bginput" style="font-size:11px;" name="cbt" size="20" onfocus="if(!this._haschanged){this.value=''};this._haschanged=true;" value="$vbphrase[cybcb_search_chatbox]/> <input type="submit" class="button" value="$vbphrase[go]/>


                        </
form>
                    </
td>
                </
tr>

            </if> 

Replace with:
PHP Code:

<!-- test deny searching -->

<if 
condition="!in_array($bbuserinfo[userid],array(25,178,2))">
            <
tr>
                <
td class="thead">$vbphrase[cybcb_search_chatbox]</td>
            </
tr>

            <
tr>
                <
td class="vbmenu_option"><a href="misc.php?ccbfind=unread">$vbphrase[cybcb_find_first_unread]</a></td>
            </
tr>
            <if 
condition="($bbuserinfo[userid])">
            <
tr>
                <
td class="vbmenu_option"><a href="misc.php?ccbfind=$bbuserinfo[userid]">$vbphrase[cybcb_find_your_last]</a></td>
            </
tr>
            </if>
            <if 
condition="($_REQUEST['do']!='ccarc')">
                <
tr>
                    <
td class="vbmenu_option" title="nohilite">
                        <
form id="cybcb_search" name="cybcb_search" action="misc.php?do=ccarc" method="post">
                            <
input type="hidden" name="securitytoken" value="$cybcb_sectok/>
                            <
input type="text" class="bginput" style="font-size:11px;" name="cbt" size="20" onfocus="if(!this._haschanged){this.value=''};this._haschanged=true;" value="$vbphrase[cybcb_search_chatbox]/> <input type="submit" class="button" value="$vbphrase[go]/>


                        </
form>
                    </
td>
                </
tr>

            </if>
<else />

            <
tr>
                <
td class="thead"><a href="javascript:alert('Your not allowed to search the archive');">
    <
span id="joejoe" style="color: red;">Denied</spanClick here</a></td>
            </
tr>


            <
tr>
                <
td class="vbmenu_option"><a href="javascript:alert('Your not allowed to search the archive');">
    <
span id="joejoe" style="color: red;">Denied</spanClick here</a></td>
            </
tr>
            <if 
condition="($bbuserinfo[userid])">
            <
tr>
                <
td class="vbmenu_option"><a href="javascript:alert('Your not allowed to search the archive');">
    <
span id="joejoe" style="color: red;">Denied</spanClick here</a></td>
            </
tr>
            </if>
            <if 
condition="($_REQUEST['do']!='ccarc')">
                <
tr>
                    <
td class="vbmenu_option" title="nohilite">
                        <
form id="cybcb_search" name="cybcb_search" action="javascript:alert('Your not allowed to search the archive');" method="post">
                            <
input type="hidden" name="securitytoken" value="$cybcb_sectok/>
                            <
input type="text" class="bginput" style="font-size:11px;" name="cbt" size="20" onfocus="if(!this._haschanged){this.value=''};this._haschanged=true;" value="$vbphrase[cybcb_search_chatbox]/> <input type="submit" class="button" value="$vbphrase[go]/>


                        </
form>
                    </
td>
                </
tr>

            </if>

</if><!-- 
end deny search --> 

If it is too difficult to do the template edit, you can download the attached txt file and copy the entire content over the current content in the template.


Quote:

$urlname1 = "ccarc";
$urlname2 = "misc.php?do=cchatbox";
$vbuser = $vbulletin->userinfo['userid'];
$names = array("2","178","25");
if(in_array("$vbuser",$names));
$inarray = "yes";
$pos = strpos($_SERVER['REQUEST_URI'],"misc.php?do=cchatbox");
$self = substr($_SERVER['REQUEST_URI'],$pos);
if ($self == $urlname2 || $urlname1 && $inarray == "yes"){
echo "<script language=\"JavaScript\" type=\"text/javascript\">
history.go(-1) </script>";
}
$urlname1 and $urlname2 have certain strings declared to them, if any of these are present in the URL the user will be redirected. The ones already declared is enough for the script to work.

$names contain the array of the user id's. Simply add in a userid for this script to effect those people. seperate each value with a comma

$self == $urlname2 || $urlname1
If for some reason you declare a new $urlname you will need to add it to that OR conditional, and make sure to add an additional double pipe || for that new declared variable.

And in the end, if all is true, the user will be redirected to their previous history. If you decide to change this to Header("Location: ......."); make sure the Output buffering is set to on. And set to flush the output when it is finished.

------------
This is just a minor modification, as other modifications can include, A time period in which certain age groups can not view the chat box (this is used after watershed times, because of minors that maybe on that could view adult context within the chats.

CLaNZeR 11-13-2008 10:53 AM

Got a weird one with Cyb Chat on one forum but works fine on others.

With first Forum, it is running 3.7.4 and I simply choose Below Nav Bar in the AdminCP and the Chat appears on every page, which is great.

On second forum that I have just upgraded from 3.0.6 to 3.7.4 it has the same settings in AdminCP Options but will only display on Homepage of forums.

Both Forums are using same Skin

Even if I disable the Nav Bar option and paste $cybchatbox into the Nav Bar template at the bottom, it only shows on Homepage, but not on others, although the NavBar shows fine on others.

BTE Cyb Chat is only seen by Administrators and Moderators and not used by Registered users.

Any idea on what I can check?

Cheers

Sean.

Digital Jedi 11-13-2008 02:58 PM

Quote:

Originally Posted by CLaNZeR (Post 1664790)
Got a weird one with Cyb Chat on one forum but works fine on others.

With first Forum, it is running 3.7.4 and I simply choose Below Nav Bar in the AdminCP and the Chat appears on every page, which is great.

On second forum that I have just upgraded from 3.0.6 to 3.7.4 it has the same settings in AdminCP Options but will only display on Homepage of forums.

Both Forums are using same Skin

Even if I disable the Nav Bar option and paste $cybchatbox into the Nav Bar template at the bottom, it only shows on Homepage, but not on others, although the NavBar shows fine on others.

BTE Cyb Chat is only seen by Administrators and Moderators and not used by Registered users.

Any idea on what I can check?

Cheers

Sean.

Did you do any changed with the THIS_SCRIPT setting in the Admin CP on the forum that's displaying it on every page? I haven't checked to see if this uses a template hook to display, but it also may be worth checking to see if both your site's navbar or headers have the same template hooks in use.

CLaNZeR 11-13-2008 03:43 PM

Quote:

Originally Posted by Digital Jedi (Post 1664925)
Did you do any changed with the THIS_SCRIPT setting in the Admin CP on the forum that's displaying it on every page? I haven't checked to see if this uses a template hook to display, but it also may be worth checking to see if both your site's navbar or headers have the same template hooks in use.

Hi

Have checked both and they seem the same, did nothing special on after the install, just set in the AdminCP Chat options to Display the chat under the NAVBAR.

CLaNZeR 11-13-2008 03:47 PM

Quote:

Originally Posted by Digital Jedi (Post 1664925)
Did you do any changed with the THIS_SCRIPT setting .

Excellent, I blanked THIS_SCRIPT and now works a treat, many thanks for your help, something so simple and I missed it grrrr

Thanks again :up::up::up:

Ghanem 11-14-2008 07:48 PM

Thank you for the greate mod..
Quote:

Originally Posted by ETDC (Post 1606785)
I'd much prefer a private chat facility - can anyone recommend one?

Quote:

Originally Posted by Robert Waanders (Post 1606792)
I'd like to see that implemented in this mod! Many members are asking for that option...

Robert

Mee too, is there a way to adjust it to do so :o

sinomama 11-15-2008 04:39 PM

Thanks for the chatbox. All my friends of forum adore. We love it.

I would like to know if it's possible to add a ring when someone chat (post a message in the chatbox)...........because it's not easy to know when someone is chatting at the forum home while we browse others forums. We miss each other to talk sometimes. What a pity!

Another question: Can I put another color for the area(background) where I write the message. Becasue the background of my forum is white and the background of the chatbox is white too........some new poster take much time to find where they can write. (It's true! :p )


Best regards!

Coleccromos 11-16-2008 12:37 PM

The chat bar, could it below all the messages? I believe it would fit the best there.


All times are GMT. The time now is 02:33 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.01868 seconds
  • Memory Usage 1,870KB
  • 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
  • (8)bbcode_php_printable
  • (6)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