Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 12-03-2007, 04:39 PM
Termi Termi is offline
 
Join Date: Nov 2002
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default chat with shoutbox into vbadvanced

Hi,

i have a chat from https://blueimp.net/. This is a chat with a shoutbox for vbulletin.

Now my problem is, how can i bring the shoutbox code into vbadvanced. I've tried something but don't work for me. ;(

Can anyone help pls ?

Best regards

Termi

The readme.txt

PHP Code:
AJAX Chat
=========

Version 0.6.2.1 vBulletin 2007/11/28




Requirements
============

Server-Side:

- PHP >= 4
- MySQL >= 4


Client-Side:

- Enabled JavaScript
- Enabled Cookies




Installation
============

1.    Creation of database tables
    ---------------------------

    Execute the provided SQL script chat.sql by using phpMyAdmin:
    http://www.phpmyadmin.net/
    
    On phpMyAdmin, select your vBulletin database and click on "Import".
    Select the file chat.sql from your local harddisk and click on "OK".
    This should execute the included commands to create the tables needed by this chat.


2.    Upload to the server
    --------------------

    Upload the chat folder to your server into your vBulletin forum directory:
    e.g. http://example.org/vBulletin/chat/


Ready! Just place a link to the chat directory on your forum. :)




Configuration files:
====================

AJAX Chat is fully customizable and contains two configuration files:

1.    lib/config.php
    --------------
    This file contains the server side (PHP) settings.

2.    js/config.js
    ------------
    This file contains the client side (JavaScript) settings.

Each configuration option is explained with a comment prior to the setting assignment.




Customizing the layout:
=======================

The layout of AJAX Chat is fully customizable by using CSS (Cascaded Style Sheets).
AJAX Chat comes with a predefined set of styles. To add your own style, do the following:

1.    Add a new CSS file (e.g. mystyle.css) by copying one of the existing files from the CSS directory.

2.    Edit your file (css/mystyle.css) and adjust the CSS settings to your liking.

3.    Add the name of your style without file extension to the available styles in lib/config.php:

    // Available styles:
    $config['styleAvailable'] = array('mystyle','beige','black','grey');
    // Default style:
    $config['styleDefault'] = 'mystyle';

If customizing the layout by using CSS is not enough, adjust the template files in lib/template/.




Logs:
=====
    
    By default, AJAX Chat stores all chat messages in the database.
    To access the logs you have to add the GET parameter view=logs to your chat url:
    
    e.g. http://example.org/path/to/chat/?view=logs
    
    If you are not already logged in, you have to login as administrator to access the logs.
    
    The log view enables you to monitor the latest chat messages on all channels.
    It is also possible to view the logs of private rooms and private messages.
    You have the option to filter the logs by date, time and search strings.
    
    The search filter accepts MySQL style regular expressions:
    http://dev.mysql.com/doc/refman/5.1/en/regexp.html
    
    To search for IPs, use the following syntax:
    ip=127.0.0.1




Shoutbox:
=========
    
    AJAX Chat is also usable as shoutbox - this is a short guide on how to set it up:


    1. Shoutbox stylesheet
    ----------------------
    
    Add the following line to the stylesheet (CSS) of all pages displaying the shoutbox:
    
    @import url("http://example.org/path/to/chat/css/shoutbox.css");
    
    Replace http://example.org/path/to/chat/ with the URL to the chat.
    Modify css/shoutbox.css to your liking.
    
    
    2. Shoutbox function
    --------------------
    
    Add the following function to your PHP code:
    
    <?php
    
function getShoutBoxContent() {
        
// URL to the chat directory:
        
if(!defined('AJAX_CHAT_URL')) {
            
define('AJAX_CHAT_URL''./chat/');
        }
        
        
// Path to the chat directory:
        
if(!defined('AJAX_CHAT_PATH')) {
            
define('AJAX_CHAT_PATH'realpath(dirname($_SERVER['SCRIPT_FILENAME']).'/chat').'/');
        }
        
        
// Validate the path to the chat:
        
if(is_file(AJAX_CHAT_PATH.'lib/classes.php')) {
            
            
// Include Class libraries:
            
require_once(AJAX_CHAT_PATH.'lib/classes.php');
            
            
// Initialize the shoutbox:
            
$ajaxChat = new CustomAJAXChatShoutBox();
            
            
// Parse and return the shoutbox template content:
            
return $ajaxChat->getShoutBoxContent();
        }
        
        return 
null;
    }
    
?>
    
    Make sure AJAX_CHAT_URL and AJAX_CHAT_PATH point to the chat directory.


    2. Shoutbox output
    ------------------
    
    Display the shoutbox content using the shoutbox function:
    
    <div style="width:200px;"><?php echo getShoutBoxContent(); ?></div>
Reply With Quote
  #2  
Old 12-04-2007, 12:11 AM
ssslippy ssslippy is offline
 
Join Date: Jan 2006
Posts: 877
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What shoutbox and what version are u using?
Reply With Quote
  #3  
Old 12-05-2007, 11:09 PM
ssslippy ssslippy is offline
 
Join Date: Jan 2006
Posts: 877
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Do not send people pm's I posted in here. You will need to visit their website for any help on how to intergrate their shoutbox into vbadvanced or you can try the vbadvanced site.
Reply With Quote
  #4  
Old 12-06-2007, 02:55 PM
Termi Termi is offline
 
Join Date: Nov 2002
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi,

okay the shoutbox is from the chat

i have only this code

PHP Code:
 2. Shoutbox function 
    -------------------- 
     
    Add the following function to your PHP code: 
     
    <?php 
    
function getShoutBoxContent() { 
        
// URL to the chat directory: 
        
if(!defined('AJAX_CHAT_URL')) { 
            
define('AJAX_CHAT_URL''./chat/'); 
        } 
         
        
// Path to the chat directory: 
        
if(!defined('AJAX_CHAT_PATH')) { 
            
define('AJAX_CHAT_PATH'realpath(dirname($_SERVER['SCRIPT_FILENAME']).'/chat').'/'); 
        } 
         
        
// Validate the path to the chat: 
        
if(is_file(AJAX_CHAT_PATH.'lib/classes.php')) { 
             
            
// Include Class libraries: 
            
require_once(AJAX_CHAT_PATH.'lib/classes.php'); 
             
            
// Initialize the shoutbox: 
            
$ajaxChat = new CustomAJAXChatShoutBox(); 
             
            
// Parse and return the shoutbox template content: 
            
return $ajaxChat->getShoutBoxContent(); 
        } 
         
        return 
null
    } 
    
?> 
     
    Make sure AJAX_CHAT_URL and AJAX_CHAT_PATH point to the chat directory. 


    2. Shoutbox output 
    ------------------ 
     
    Display the shoutbox content using the shoutbox function: 
     
    <div style="width:200px;"><?php echo getShoutBoxContent(); ?></div>
regards Termi
Reply With Quote
  #5  
Old 12-11-2007, 04:33 PM
Termi Termi is offline
 
Join Date: Nov 2002
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nobody can help me with this code ?

thanks

regards Termi
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:48 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06669 seconds
  • Memory Usage 2,242KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (5)postbit
  • (5)postbit_onlinestatus
  • (5)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete