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)

Erwin 08-26-2002 04:34 AM

Update: It's all working beautifully at the moment. My members all love it - they like it better than TWT's hack.

In fact, the number of queries has been slashed by 90%. Why? Because now when members use the shoutbox to chat, all they are refreshing is the new shoubox.php file in an iframe, rather than refreshing the previous TWT's shoutbox.php file which included headers etc. as well as 20 queries and a whole lot of other stuff.

Thanks for the nice port. :) You can move this to the "Full Releases" once you update your install text files.

Erwin 08-26-2002 04:37 AM

Do you mind posting in this thread what I should do to upgrade to 1.2.2? Just tell me what to add to the templatesused bits in case I'm missing something. :)

p0s3id0n 08-26-2002 04:41 AM

here is the start of the shoutbox.php file upgraded to 1.2.2 :
PHP Code:

<?
error_reporting(7);

$templatesused = 'shoutbox,shoutbox_bit,shoutbox_bit_me,shoutbox_bit_vide,shoutbox_chat,shoutbox_fermee,shoutbox_frame,shoutbox_popup_smilbox,shoutbox_popup_smilboxbits,shoutbox_saisie,shoutbox_vbcodes';

require("./global.php");
require("./admin/shoutbox_config.php");

and here is the line i added just under the definition of the $templatesused var at the top of the index.php file of the root folder of the forum :
PHP Code:

$templatesused .= ',shoutbox,shoutbox_bit,shoutbox_bit_me,shoutbox_bit_vide,shoutbox_chat,shoutbox_fermee,shoutbox_frame,shoutbox_popup_smilbox,shoutbox_popup_smilboxbits,shoutbox_saisie,shoutbox_vbcodes'

For the chmod, since it's on the install script i supose you no longer need the modification :p.

Erwin 08-26-2002 04:51 AM

Thanks.

Is there a way to use the member's timeoffset so that the time stamp works for the member's timezone?

p0s3id0n 08-26-2002 04:57 AM

errr, what a nice idea... but wouldn't it be a little bit confusing
if a shout under another shout didnt have timestamps
following each other ???

[high]* p0s3id0n notes the idea on a piece of paper for the 1.3 release ;).[/high]

Erwin 08-26-2002 05:00 AM

No, no, all the timestamps will be offset to the user's timezone who is viewing the shoutbox. It would be good to have since I know when a member has posted according to my timezone, instead of the server timezone. TWT's shoutbox had this working fine using the - $timeoffset variable.

Erwin 08-26-2002 05:01 AM

I tried to implement this with your hack, but the way you parse the date and time is different... :)

Erwin 08-26-2002 05:28 AM

I've made it so that there is a limit of smilies a person can post in the shoutbox. This is to prevent smilie spamming. :)

In shoutbox.php, find:

PHP Code:

$sql "SELECT id FROM shoutbox WHERE date LIKE '".substr($date,0,10)."%' AND name='".$bbuserinfo['username']."' AND comment='".addslashes($message)."'"

Underneath, add:

PHP Code:

$parsey  bbcodeparse($message011);
                if (
countchar($parsey,"<img")>5) {
            eval(
"dooutput(\"".gettemplate('shoutbox_error')."\");");
                exit;
                } 

Then, add a new template called:

shoutbox_error

with these contents:

Code:

{htmldoctype}
<html>
<head>
$headinclude
</head>
<body bgcolor="$fondshoutbox">
<center><br><br><b><smallfont>NOTE: You are only allowed a maximum of 5 smilies. Please try again.</smallfont></b></center>
</body>
</html>

Done! :) You can change this line in shoutbox.php to increase or decrease the smilie limit, and edit the shoutbox_error template accordingly:

if (countchar($parsey,"<img")>5) {

Erwin 08-26-2002 05:33 AM

Now if only I can get the timeoffset thing to work... anyone has any clue?

Erwin 08-26-2002 05:59 AM

Another tip for installers - instead of manually having to ban users in the shoutbox, to automatically ban users who you have already banned from the forums, you can do this:

In shoutbox.php, find:

PHP Code:

if ((mysql_num_rows($result)){ 

Replace with:

PHP Code:

if (mysql_num_rows($result) OR $bbuserinfo[usergroupid]==8){ 

8 being the banned usergroupid.


All times are GMT. The time now is 04:41 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.01384 seconds
  • Memory Usage 1,748KB
  • 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_code_printable
  • (6)bbcode_php_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