vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   vBChat v2.3 (https://vborg.vbsupport.ru/showthread.php?t=71049)

akiy 11-28-2004 01:38 AM

Quote:

Originally Posted by kevin_r1
:up: Thanks! For boards that are not pruned daily, could you provide the code to include the date as well?

You can just change the "g:ia" format to whatever you want according to the PHP "date" documentation. For example, "M j Y g:ia" will show something like "Nov 27 2004 8:30pm".

Hope that helps!

John Lester 11-28-2004 07:19 PM

I figured out how to make the chat window larger on my own.

editing "chat_main" template:


Changed:
<td class='alt2' align='center' width='80%' height='300' rowspan='2'>
To:
<td align='center' width='85%' height='600' rowspan='2'>


Changed:
<td class='alt2' align='center' width='20%' height='300'>
To
<td align='center' width='15%' height='500'>


Works like a charm. :)

John Lester 11-28-2004 10:17 PM

Here's something I haven't been able to figure out.

I have 100 different chatrooms set up using vBChat. People like to jump between them. However, once people are chatting they have no indication of which room they are currently in.

Is there a way to display the NAME of the chatroom while people are chatting?

Also, once people "join" a different chatroom, they are brought back to the same "choose a chatroom" screen. Is there a way for them to be automatically jumped INTO the chatroom they have selected from the "join a chatroom" screen? It's a bit confusing the way it works right now.

Thanks for any help or ideas.

djjeffa 11-29-2004 03:02 AM

is there a way i could ad a module for my vbadvance page to tell whos in chat?

sstrayer 11-29-2004 05:46 AM

Installed, thanks Zero

akiy 11-29-2004 03:33 PM

Quote:

Originally Posted by akiy
Since I didn't see any code to insert the time when each message was sent, I went ahead and coded it myself.

After:
Code:

                                if($thisIgnore == 0){
I inserted:
Code:

                                        $time = date("g:ia",
                                                    mktime(date("H",
                                                                $ThisMSG['s_postime'])-$timediff+$ThisMSG['timezoneoffset'],
                                                            date("i, s, m, d, Y", $ThisMSG['s_postime'])));

I can now use $time in the chat_row and chat_row_special_recieved (sic) templates. $time takes into consideration the current chatter's timezoneoffset setting and the server's timezone setting so that each person should see their own local time when the messages were posted.

Oops -- bug. It looks like the code I used above didn't do the timezone offset very well.

Instead of the code that I inserted above, try using:
Code:

                                        $time = date("g:ia",
                                                    mktime(date("H",
                                                                $ThisMSG['s_postime'])-$vboptions['timeoffset']+$bbuserinfo['timezoneoffset'],
                                                            date("i, s, m, d, Y", $ThisMSG['s_postime'])));

This should then have $time set to the user's local timezone (provided they set it in their own profile options, of course).

kevin_r1 11-29-2004 07:33 PM

Quote:

Originally Posted by akiy
You can just change the "g:ia" format to whatever you want according to the PHP "date" documentation. For example, "M j Y g:ia" will show something like "Nov 27 2004 8:30pm".

Hope that helps!

That helped a lot. Thanks for the resource!

akiy 11-29-2004 07:38 PM

Quote:

Originally Posted by kevin_r1
That helped a lot. Thanks for the resource!

You're welcome! Make sure you use the latest code that I just posted that corrects some timezone issues...

blitzkrg 11-29-2004 09:25 PM

Quote:

Originally Posted by Harley D
I had the same problem, this is what I did. Please make a backup the original just incase this doesn't work for you, but it should :o)

Code:

       
        // Get the users in vBChat
        $vbchat_users = array();

        while ($loggedin = $DB_site->fetch_array($forumusers))
        {
                $userid = $loggedin['userid'];
                if (!$userid)
                {        // Guest
                        $numberguest++;
                        $inforum["$loggedin[inforum]"]++;
                }
                else if (empty($userinfos["$userid"]) OR ($userinfos["$userid"]['lastactivity'] < $loggedin['lastactivity']))
                {
                        $userinfos["$userid"] = $loggedin;
                }

                if(preg_match("/vBChat.php/",$loggedin['location']) && $loggedin['userid']){
                $vbchat_users[$loggedin['userid']] = $loggedin;
                }

        }

        // Configure Peeps In vBChat
        $invBChat = "";

        if(is_array($vbchat_users)){
                foreach($vbchat_users as $invbc){
                        if($invBChat == ""){
                        $extra = "";
                        } else {
                        $extra = ", ";
                        }

                // Get Username Style
                $invbc['musername'] = fetch_musername($invbc);

                $invBChat .= "{$extra}<a href='member.php?{$session['sessionurl']}&u={$invbc['userid']}'>{$invbc['musername']}</a>";
                }
        }

        if($invBChat == ""){
        $invBChat = "<i>No one is currently inside vBChat</i>";
        }



I had the same problem as others, with the extra code.
the fix that was provided, solves the "who's logged on" problem, but now it wont show who's in chat..
any ideas?

GunsNetwork 11-29-2004 10:23 PM

Quote:

Originally Posted by akiy
I can now use $time in the chat_row and chat_row_special_recieved (sic) templates. $time takes into consideration the current chatter's timezoneoffset setting and the server's timezone setting so that each person should see their own local time when the messages were posted.

Hope that helps!

Give us an example of how you would put $time in those two templates!


All times are GMT. The time now is 10:49 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.01695 seconds
  • Memory Usage 1,755KB
  • 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
  • (4)bbcode_code_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (4)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