Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
[AJAX] vBShout v2.0 Details »»
[AJAX] vBShout v2.0
Version: 2.0, by Zero Tolerance Zero Tolerance is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Version: 3.5.0 RC2 Rating:
Released: 07-27-2005 Last Update: 04-22-2006 Installs: 1831
Uses Plugins Template Edits
Additional Files  
No support by the author.

[high]Staff Edit/Update[/high]

I have released an updated version of this hack (version 2.0.1), this version fixes some security issues with this hack. All version prior to this one allow users to insert html in their shouts, this can cause problems with them using html that breaks the site layout or malicious javascript. Download the new zip file (vBshout_fixed.zip) and upload the new vbshout.php file to patch/upgrade. If you want to manual instructions they are in the zip file, in the file bugfixes.txt

Second Staff update

I've uploaded a new version of this hack, dubbed '2.0.2'. This one should fix the html injection issues without breaking special characters. To upgrade, download the new zip file and upload the new vbshout.php file.

Please note that this only fixes the html injection issues. I do not use this hack on my own forum (although I've tested this on a client's board) so I will not be fixing the server load issues. I suggest you do not install this hack if you can't deal with the extra server load, as it's rather intensive.

- Brad

[high]End staff edit[/high]

Well, been a while since I've been to vb.org and released anything, thought i'd break the trend and whip up something quick while I have a little spare time.

A shoutbox as you would assume, a very simple one to start off with, but does include AJAX Technology, which pushes the shoutbox 1 step closer to live, messages from other people will appear with no refreshing, and so will yours that you post

A preview is below, i'd estimate a 50 second installation max

Primary Features:
- AJAX Technology (no refreshing)
- Administration control an display element options
- Fast format editor

Change Log::

- v1.1:
WOL (Who's Online) Correction

- v1.2:
New Posting Featurs (Bold/Italic/Underline/Colour/Font)
Admin Controls

- Change location/position of shoutbox
- Change number of shouts displayed
- Switch vbcode/similes on/off
- v1.3
Firefox javascript issue fixed
New Admin Controls

- Command Activation
- Swtch extra format options on/off
- Change position of editor (above/below messages)
New Commands

- /prune (Clears the shoutbox completely)
- /prune [username] (Clears all shouts posted by specified user)
- v1.4
Usergroup HTML Markup For Usernames
Clear Editor Button
Emoticons Pop Up Menu
Time display configurated to vBulletin settings
Username Links To Profile
New Admin Conrols

New vBShout Position (Directly Above Forums)
Banned Users
Banned Usergroups
Banned Permissions
Smilie Pop-Up Box Height
Smilie Pop-Up Box Width
New Commands

"/me" - Action message (all users are able to use this command)
/pruneshout [shout] - Deletes a single shout
- v1.5
Improved Smilies Display
XHTML 1.0 Transitional Valid (couple of errors fixed)
New Admin Options

Shoutbox Height
Smilies To Show
Shout Messages Order
Banned Permissions (fixed)
- v1.6
Bug Fixes:

- Unable to delete shouts that used /me command fixed
- Shouts being displayed from bottom-upwards only showed first 20 shouts
Automatically parses URL's

- v2.0
New Archive

- Displays shouts and pages
- Stats and top 10 shouters
- AJAX Edit/Delete (staff can edit/delete all shouts)
Enjoy,

- Zero Tolerance

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #1302  
Old 02-15-2006, 06:29 PM
S@NL - BlackBik's Avatar
S@NL - BlackBik S@NL - BlackBik is offline
 
Join Date: Jul 2004
Location: Netherlands
Posts: 307
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

At the moment you can't prune without losing the shout counts.....
The counts are made in the shout databasetable. If you empty that, the shouts are gone and the result will be 0 shouts for everybody.
Reply With Quote
  #1303  
Old 02-15-2006, 07:09 PM
Big_Ern Big_Ern is offline
 
Join Date: Dec 2005
Posts: 31
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How do I change he name of the button to read something differnent the shout
Reply With Quote
  #1304  
Old 02-15-2006, 08:00 PM
tipoboy's Avatar
tipoboy tipoboy is offline
 
Join Date: Dec 2005
Location: scotland
Posts: 693
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by mtha
ZT,

The shoutbox is great, but I want to make it a seperate page rather than using forums for it (Hope you dont mind me posting here)

so, I just take the action part and put it into vbshout.php?do=chat

Standalone chat: (just add before

// ---------------------------------------------------
// Start Page Output
// ---------------------------------------------------


PHP Code:
// ---------------------------------------------------
// AJAX Standalone Chat
// ---------------------------------------------------
 
if ($_GET['do'] == 'chat')
{
$navbits     = array("vbshout.php?" $vbulletin->session->vars['sessionurl'] . "do=chat" => 'Chat');
    
$navbits[""] = 'Shoutbox - Chat Area';
 
$Used    0;
$UsedArr = array();
$smilies $db->query_read("
        SELECT smilieid, smilietext, smiliepath, smilie.title,
        imagecategory.title AS category
        FROM " 
TABLE_PREFIX "smilie AS smilie
        LEFT JOIN " 
TABLE_PREFIX "imagecategory AS imagecategory USING(imagecategoryid)
        ORDER BY imagecategory.displayorder, smilie.displayorder
    "
);
$Smilie_Build '';
$Total_Smilies $db->num_rows($smilies);
 
if (
$Total_Smilies 0)
{
    while (
$emo $db->fetch_array($smilies))
    {
        if (
$vbulletin->options['shout_smilies_show'] > 0)
        {
            
$Smilie_Cache[] = $emo;
        }
        else
        {
         
$Smilie_Build .= '<a href="#" onclick="return sb_Smilie(\''.$emo['smilietext'].'\')">[img]https://vborg.vbsupport.ru/[/img] ';
        }
    }
 
    if (
$vbulletin->options['shout_smilies_show'] > $Total_Smilies)
    {
        
$vbulletin->options['shout_smilies_show'] = $Total_Smilies;
    }
 
    if (
$vbulletin->options['shout_smilies_show'] > 0)
    {
        while (
$Used $vbulletin->options['shout_smilies_show'])
        {
            
$GetEmo $Total_Smilies;
            
$GetEmo rand(0$GetEmo);
 
         if (!
in_array($GetEmo$UsedArr) && $Smilie_Cache[$GetEmo])
            {
                
$Used++;
                
$GetEmo $Smilie_Cache[$GetEmo];
             
$Smilie_Build .= '<a href="#" onclick="return sb_Smilie(\''.$GetEmo['smilietext'].'\')">[img]https://vborg.vbsupport.ru/[/img] ';
            }
        }
    }
}
else
{
    
$Smilie_Build 'No Emoticons Available';
}
 
$Options_DropDown         = array(); // Items included will be parsed to create drop down menus
$DropDowns             = array(); // Completed constructed drop down menus
 
$Options_DropDown['font_selector'] = array('Default''Arial''Arial Black''Arial Narrow''Book Antiqua''Century Gothic''Comic Sans MS''Courier New''Fixedsys''Franklin Gothic Medium''Garamond''Georgia''Impact''Lucida Console''Lucida Sans Unicode''Microsoft Sans Serif''Palatino Linotype''System''Tahoma''Times New Roman''Trebuchet MS''Verdana');
$Options_DropDown['color_selector'] = array();
$Options_DropDown['color_selector'][] = 'Default';
 
$hex = array();
$hex[] = '0';
$hex[] = '3';
$hex[] = '6';
$hex[] = '9';
$hex[] = 'C';
$hex[] = 'F';
 
for (
$a 0$a 6$a++)
{
    for (
$b 0$b 6$b++)
    {
        for (
$c 0$c 6$c++)
        {
         
$Options_DropDown['color_selector'][] = '#' $hex[$a].$hex[$a].$hex[$b].$hex[$b].$hex[$c].$hex[$c];
        }
    }
}
 
if (
is_array($Options_DropDown))
{
    foreach (
$Options_DropDown as $Menu => $Options)
    {
        
$DropDowns[$Menu] = '';
        if (
is_array($Options))
        {
            foreach (
$Options as $Selection)
            {
             if (
preg_match("#^\#([a-z0-9]+)$#i"$Selection))
                {
                 
$Extra ' style="color:'.$Selection.';"';
                }
                else
                {
                    
$Extra '';
                }
 
                if (
$Selection == 'Default')
                {
                 
$Text = (($Menu == 'color_selector') ? 'Color' 'Font Face') . ' [Default]';
                }
                else
                {
                 
$Text $Selection;
                }
 
             
$DropDowns[$Menu] .= '<option value="'.$Selection.'"'.$Extra.'>'.$Text.'' "\n";
            }
        }
    }
}
 
if (
$vbulletin->options['shout_banned_perms'] == && isBanned($vbulletin->userinfo))
{
    
print_no_permission();
}
else
{
    eval(
'$Shoutbox = "' fetch_template('forumhome_vbshout') . '";');
}
 
$pagenav construct_page_nav($page$perpage$TS_D'vbshout.php?' $vbulletin->session->vars['sessionurl'] . 'do=chat'''
        
. (!empty($vbulletin->GPC['perpage']) ? "&pp=$perpage"")
    );
    
$HTML $Shoutbox;
}
// ---------------------------------------------------
// AJAX Standalone Chat
// --------------------------------------------------- 

You may also want to add

'chat' => array('GENERIC_SHELL',
'forumhome_vbshout',
),

to the action templates if you use it
i would like to have the shoutbox in a page of it's own. i have added the code above to my vbshout.php template the thing is, i can get the shoutbox in its own window (http://scottishwheelnut.co.uk/forum/vbshout.php?do=chat? which is great but its still on my forum home(http://http://scottishwheelnut.co.uk). is there a way i can remove or hide it from the forum home without disrupting it from the window.

any help here would be gratefully appreciated
Reply With Quote
  #1305  
Old 02-15-2006, 08:44 PM
S@NL - BlackBik's Avatar
S@NL - BlackBik S@NL - BlackBik is offline
 
Join Date: Jul 2004
Location: Netherlands
Posts: 307
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Big_Ern
How do I change he name of the button to read something differnent the shout
Just change the phrase "vbshout_shout" to a term that's at your liking
Reply With Quote
  #1306  
Old 02-15-2006, 08:47 PM
Crusher77 Crusher77 is offline
 
Join Date: Jul 2005
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is some awesome hack Gr8 work m8!
Reply With Quote
  #1307  
Old 02-15-2006, 08:50 PM
S@NL - BlackBik's Avatar
S@NL - BlackBik S@NL - BlackBik is offline
 
Join Date: Jul 2004
Location: Netherlands
Posts: 307
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by tipoboy
is there a way i can remove or hide it from the forum home without disrupting it from the window.

any help here would be gratefully appreciated
I think there is. It's a bit blunt, but it might work.

Maybe just disableing the plugin "vBShout [Template Alteration]" will do the trick.
If not, try this:

Open the plugin "vBShout [Template Alteration]". At the bottom, you'll find the conditions that place the shoutbox at your forumhome. Just change the condition there.

Example: if you have the shoutbox under your navbar change:
$Position = '$navbar';
to
$Position = 'yadayada';

That way the script cannot find the text after which it has to place the shoutbox and the shoutbox will not be visible.
I didn't test it, but i'm pretty sure that will work
Reply With Quote
  #1308  
Old 02-15-2006, 10:55 PM
tipoboy's Avatar
tipoboy tipoboy is offline
 
Join Date: Dec 2005
Location: scotland
Posts: 693
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by S@NL - BlackBik
I think there is. It's a bit blunt, but it might work.

Maybe just disableing the plugin "vBShout [Template Alteration]" will do the trick.
If not, try this:

Open the plugin "vBShout [Template Alteration]". At the bottom, you'll find the conditions that place the shoutbox at your forumhome. Just change the condition there.

Example: if you have the shoutbox under your navbar change:
$Position = '$navbar';
to
$Position = 'yadayada';

That way the script cannot find the text after which it has to place the shoutbox and the shoutbox will not be visible.
I didn't test it, but i'm pretty sure that will work
cheers mate exactly what i was looking for

thanks again
Reply With Quote
  #1309  
Old 02-16-2006, 12:49 AM
username12 username12 is offline
 
Join Date: Jan 2006
Posts: 109
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by BlackRabbit1971
Ok... here ya go...



Hope this helps
Thanks BlackRabbit. Took me 50 pages to find what I was looking for. Hopefully this will turn this thing into less of a chatroom for me.

Edit: doesn't seem to work for me, though. I'm gonna try the refresh button instead.
Reply With Quote
  #1310  
Old 02-16-2006, 07:53 AM
leeman's Avatar
leeman leeman is offline
 
Join Date: Nov 2004
Location: Sweden
Posts: 159
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry to be repeating my self Zero....
But do you have any plans on trying to make it possible to use the shoutbox as a popup ... So you can have it beside your browser and still be able to chat and post.
Reply With Quote
  #1311  
Old 02-16-2006, 09:43 AM
tipoboy's Avatar
tipoboy tipoboy is offline
 
Join Date: Dec 2005
Location: scotland
Posts: 693
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

[quote=leeman] sorryb to be repeting myself zero.....

i did this only last night with my forum, go to the php template for vbshout and find the following:
Code:
// ---------------------------------------------------
// Start Page Output
// ---------------------------------------------------
after that add this:
Code:
PHP Code:
 // ---------------------------------------------------
// AJAX Standalone Chat
// ---------------------------------------------------
 
if ($_GET['do'] == 'chat')
{
$navbits     = array("vbshout.php?" . $vbulletin->session->vars['sessionurl'] . "do=chat" => 'Chat');
    $navbits[""] = 'Shoutbox - Chat Area';
 
$Used    = 0;
$UsedArr = array();
$smilies = $db->query_read("
        SELECT smilieid, smilietext, smiliepath, smilie.title,
        imagecategory.title AS category
        FROM " . TABLE_PREFIX . "smilie AS smilie
        LEFT JOIN " . TABLE_PREFIX . "imagecategory AS imagecategory USING(imagecategoryid)
        ORDER BY imagecategory.displayorder, smilie.displayorder
    ");
$Smilie_Build = '';
$Total_Smilies = $db->num_rows($smilies);
 
if ($Total_Smilies > 0)
{
    while ($emo = $db->fetch_array($smilies))
    {
        if ($vbulletin->options['shout_smilies_show'] > 0)
        {
            $Smilie_Cache[] = $emo;
        }
        else
        {
         $Smilie_Build .= '<a href="#" onclick="return sb_Smilie(\''.$emo['smilietext'].'\')"> ';
        }
    }
 
    if ($vbulletin->options['shout_smilies_show'] > $Total_Smilies)
    {
        $vbulletin->options['shout_smilies_show'] = $Total_Smilies;
    }
 
    if ($vbulletin->options['shout_smilies_show'] > 0)
    {
        while ($Used < $vbulletin->options['shout_smilies_show'])
        {
            $GetEmo = $Total_Smilies;
            $GetEmo = rand(0, $GetEmo);
 
         if (!in_array($GetEmo, $UsedArr) && $Smilie_Cache[$GetEmo])
            {
                $Used++;
                $GetEmo = $Smilie_Cache[$GetEmo];
             $Smilie_Build .= '<a href="#" onclick="return sb_Smilie(\''.$GetEmo['smilietext'].'\')"> ';
            }
        }
    }
}
else
{
    $Smilie_Build = 'No Emoticons Available';
}
 
$Options_DropDown         = array(); // Items included will be parsed to create drop down menus
$DropDowns             = array(); // Completed constructed drop down menus
 
$Options_DropDown['font_selector'] = array('Default', 'Arial', 'Arial Black', 'Arial Narrow', 'Book Antiqua', 'Century Gothic', 'Comic Sans MS', 'Courier New', 'Fixedsys', 'Franklin Gothic Medium', 'Garamond', 'Georgia', 'Impact', 'Lucida Console', 'Lucida Sans Unicode', 'Microsoft Sans Serif', 'Palatino Linotype', 'System', 'Tahoma', 'Times New Roman', 'Trebuchet MS', 'Verdana');
$Options_DropDown['color_selector'] = array();
$Options_DropDown['color_selector'][] = 'Default';
 
$hex = array();
$hex[] = '0';
$hex[] = '3';
$hex[] = '6';
$hex[] = '9';
$hex[] = 'C';
$hex[] = 'F';
 
for ($a = 0; $a < 6; $a++)
{
    for ($b = 0; $b < 6; $b++)
    {
        for ($c = 0; $c < 6; $c++)
        {
         $Options_DropDown['color_selector'][] = '#' . $hex[$a].$hex[$a].$hex[$b].$hex[$b].$hex[$c].$hex[$c];
        }
    }
}
 
if (is_array($Options_DropDown))
{
    foreach ($Options_DropDown as $Menu => $Options)
    {
        $DropDowns[$Menu] = '';
        if (is_array($Options))
        {
            foreach ($Options as $Selection)
            {
             if (preg_match("#^\#([a-z0-9]+)$#i", $Selection))
                {
                 $Extra = ' style="color:'.$Selection.';"';
                }
                else
                {
                    $Extra = '';
                }
 
                if ($Selection == 'Default')
                {
                 $Text = (($Menu == 'color_selector') ? 'Color' : 'Font Face') . ' [Default]';
                }
                else
                {
                 $Text = $Selection;
                }
 
             $DropDowns[$Menu] .= '<option value="'.$Selection.'"'.$Extra.'>'.$Text.'' . "\n";
            }
        }
    }
}
 
if ($vbulletin->options['shout_banned_perms'] == 2 && isBanned($vbulletin->userinfo))
{
    print_no_permission();
}
else
{
    eval('$Shoutbox = "' . fetch_template('forumhome_vbshout') . '";');
}
 
$pagenav = construct_page_nav($page, $perpage, $TS_D, 'vbshout.php?' . $vbulletin->session->vars['sessionurl'] . 'do=chat', ''
        . (!empty($vbulletin->GPC['perpage']) ? "&pp=$perpage" : "")
    );
    $HTML = $Shoutbox;
}
// ---------------------------------------------------
// AJAX Standalone Chat
// ---------------------------------------------------
then disable your plugin using your admincp=>plugin system=>manage products

then add this link to your nav bar "http://yoursitename.com/forum/vbshout.php?do=chat" target="new"

this will make the shoutbox pop up on a seperate page

hope this works and thanks again to mtha + S@NL - BlackBik for helping me do this

sorry if this post is a bit vague i'm quite new here myself and havent really helped a lot of people
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 12:50 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.06786 seconds
  • Memory Usage 2,396KB
  • Queries Executed 25 (?)
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
  • (2)bbcode_code
  • (1)bbcode_php
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (6)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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_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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete