vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   vB Chatbox 1.2.4 (https://vborg.vbsupport.ru/showthread.php?t=42725)

NuclioN 08-28-2002 12:23 PM

wow, awesome! Question though. How can i make it function in a way that the input is by the footer and the output (plain text and time) is at the top in for example a welcome panel?

NuclioN 08-28-2002 01:22 PM

members are asking if it is possible to read passed messages. I know from a shoutbox that was working with Postnuke portal as a module that a javascript popup could display all messages. Is that possible with this to?

jbear6 08-28-2002 02:36 PM

First of all, Congratulations, this is a fantastic hack :)
I would really like to run both the TWTCommish shoutbox, and this chatbox at the same time (in two different areas of our forums).
If I changed all the names of the tables, and files in this hack from "shoutbox" to "chatbox", would this work? Is this realistic, or way too many changes?

Thanks
Jbear

p0s3id0n 08-28-2002 03:05 PM

@ NuclioN : You can change the maximum posts in the box, on the admin CP.

@ jbear6 : it seems that i will have to make this hack work with the other box... and it seems it is this one that must be changed since the other one was here before :p:p.
So maybe i'll give a try soon to changing all the files, tables and calls names :(:(.

scottct1 08-28-2002 04:37 PM

Is there anyway to keep unregistered from from posting in the chat?

I want them to be able to see the chat but I don't want them posting.

Thanks!

jbear6 08-28-2002 05:45 PM

Quote:

Originally posted by p0s3id0n
[B@ jbear6 : it seems that i will have to make this hack work with the other box... and it seems it is this one that must be changed since the other one was here before :p:p.
So maybe i'll give a try soon to changing all the files, tables and calls names :(:(. [/B]
Thank you very much, you are a scholar and a gentleman :) I'll check this thread later for further developments.

Thanks Again,
Jbear

scottct1 08-28-2002 06:41 PM

Also is there anyways when a user minimizes the window to show more then one shout? I would like them to see the last 5.

I figured out how to block non members from posting I banned the user (space) (Just pressed the Space bar and pressed save.)

Neat huh?

p0s3id0n 08-28-2002 07:02 PM

@ scottct1 : Err... normaly the unregistered can't post, but i've already heard about unregistered being able to post with a username apearing as blank... Your idea to ban the ' ' user seems good to me :):).

As for having 5 'shouts/chats' :p visible when the chatbox is reduced, you will have to look at your root index.php and find :
PHP Code:

    $chat_result $DB_site->query("SELECT * FROM chatbox ORDER BY id DESC LIMIT 1");
    if(!
mysql_num_rows($chat_result)){
        eval(
"\$chatbit = \"".gettemplate('chatbox_bit_vide')."\";");
        eval(
"\$chatbox = \"".gettemplate('chatbox_fermee')."\";");
    }else{
        
$chat_row mysql_fetch_assoc($chat_result);
        
$name $chat_row["name"];
        
$comment $chat_row["comment"];
        
$date $chat_row["date"];
        
$date date("Y") . "-" substr($date42) . "-" substr($date12) . " " substr($date72) . ":" substr($date102);
        
$date date("[d/m|H:i]"strtotime($date) + ($bbuserinfo['timezoneoffset'] * 3600));
        
$comment parseurl($comment);
        
$comment ereg_replace("sessionhash=[a-z0-9]{32}"""$comment);
        
$comment ereg_replace("s=[a-z0-9]{32}"""$comment);
        
$comment bbcodeparse($comment);
        
$comment str_replace("<br />"," ",$comment);
        
$comment str_replace("<br>"," ",$comment);
        
$comment swear($comment);
        if(
substr($comment,0,3) == "/me"){
            
$comment stripslashes(substr($comment,3));
            eval(
"\$chatbit = \"".gettemplate('chatbox_bit_me')."\";");
        }else{
            
$colorirc $un_color_chat;
            
$comment stripslashes($comment);
            eval(
"\$chatbit = \"".gettemplate('chatbox_bit')."\";");
        } 

and replace it by that :
PHP Code:

    $chat_result $DB_site->query("SELECT * FROM chatbox ORDER BY id DESC LIMIT 5");
    if(!
mysql_num_rows($chat_result)){
        eval(
"\$chatbit = \"".gettemplate('chatbox_bit_vide')."\";");
        eval(
"\$chatbox = \"".gettemplate('chatbox_fermee')."\";");
    }else{
        while(
$chat_row mysql_fetch_assoc($chat_result)){
            
$name $chat_row["name"];
            
$comment $chat_row["comment"];
            
$date $chat_row["date"];
            
$date date("Y") . "-" substr($date42) . "-" substr($date12) . " " substr($date72) . ":" substr($date102);
            
$date date("[d/m|H:i]"strtotime($date) + ($bbuserinfo['timezoneoffset'] * 3600));
            
$comment parseurl($comment);
            
$comment ereg_replace("sessionhash=[a-z0-9]{32}"""$comment);
            
$comment ereg_replace("s=[a-z0-9]{32}"""$comment);
            
$comment bbcodeparse($comment);
            
$comment str_replace("<br />"," ",$comment);
            
$comment str_replace("<br>"," ",$comment);
            
$comment swear($comment);
            if(
substr($comment,0,3) == "/me"){
                
$comment stripslashes(substr($comment,3));
                eval(
"\$chatbit .= \"".gettemplate('chatbox_bit_me')."\";");
            }else{
                
$colorirc $un_color_chat;
                
$comment stripslashes($comment);
                eval(
"\$chatbit .= \"".gettemplate('chatbox_bit')."\";");
            }
        } 

I think it will work... tell me how it goes as it's just theory, I haven't tryed on an active forum :p.

scottct1 08-28-2002 07:47 PM

Nope didnt work, still just one.

Only reason I want 5 is because guests are shown the box minimized. I want to to be able to watch the chat, and hopefully will consider registering as a member. :)

p0s3id0n 08-28-2002 07:53 PM

i edited the post on top of this one, everything is now ok


All times are GMT. The time now is 07:47 AM.

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.01474 seconds
  • Memory Usage 1,784KB
  • 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
  • (2)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)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