News:

Join the Facebook Fan Page.

Main Menu

SMF Shoutbox

Started by mbirth, September 22, 2006, 10:27:23 PM

Previous topic - Next topic

mbirth

Link to Mod
Rate this Mod

This is an improved version of Deep's SMF Shoutbox. Deep wasn't able to continue development so I took this into my hands.

UNTIL THIS MOD IS APPROVED, YOU CAN GRAB THE CURRENT VERSION FROM MY WEBSPACE HERE!

Code ("Changes in 1.14") Select
+ added UPGRADE feature - Package Manager shows an error for some file - ignore that!
! It's because PM checks mods against current file. Upgrade works by removing old changes from current file and applying new changes - which can't be applied as long as the old changes are still there - that's why PM shows that error.
+ more configuration variables in sboxDB.php
+ made background and text color of sbox theme-dependent. Alternating colors can be specified in settings for bright and dark themes - should work for all themes where there's a properly set windowbg2-class
* rewrote uninstall-code to SMF-package-sdk-example
x fixed horizontal scrollbar in blackTed (and maybe similar) theme
x quick-fixed bug with UTF8 characters
+ added censoring of words
+ added automatic shoutbox-insertion into blackTed if installed
+ added "Type your shout"-message to input field
* simplified package-info.xml a bit
* integrated German language pack into main package (XML-style rocks!)
* raised version to 1.14
+ added modifications for the other 2 default themes (classic and babylon)
! ATTENTION: If you manually added the sbox to those themes, remove your code before installing this package!
* use people with 'moderate_board' permission instead of only Global Moderators
* transformed from boardmod to new funky XML style


Code ("Changes in 1.13") Select
* string cleanup - sorted strings by appearance
* added separator lines to settings dialog
x added missing 2nd and 3rd parameter do db_query() in sbox_setup.php
+ DROP TABLE before insert, so that updates to 1.1rc3 will be more easier
+ $sbox_NickPrefix and $sbox_NickSuffix in sboxDB.php
+ Guests are now shown as Guest-abcdef with abcdef being their IP in base36, this way you can differentiate guests easily
+ option to allow Global Moderators to delete shouts
+ option to disallow BBC for guests only
+ option to disable the "WhatsNew"-line


Code ("Changes in 1.12") Select
* made compatible with SMF 1.1rc3
* moved basic strings from Modifications.<lang>.php to sbox.<lang>.php so that there now is language fallback to English (and 1 file less to change)
+ check for lock before removing History file
x JavaScript clear() was reserved, renamed to clearHist()
x active refresh on new shout
+ included language pack into main setup package so that distribution should be easier


Code ("Changes in 1.11") Select
+ added German language-pack
+ added switch to disable linking to profile pages
+ added switch to disable Refresh after there have been no posts in lastActive time
* shortened some CSS classnames


Code ("Changes in 1.10 since Deep's version 1.04") Select
+ sequential messages from one user have the same color
* character limit for one shout has been raised to 320 chars (like one long SMS ;-)
* displayed weekdays are now in the language the user has chosen in SMF and from SMF's language files
* sBox-time is kept in sync with SMF's time (including all timezone-stuff)
+ there's a bar displayed showing what's new since the last refresh
+ poster's name can be clicked to show his profile
+ your own nick is made bold and a sound is played on first occurence
+ sbox now uses SMF's smileys and BBCode, option in settings shows the smiley-row known from posting messages in SMF
+ HTML is now blocked
* now user's "Display Name"s are shown instead of usernames
* database now only stores User-ID, Unix-timestamp and message
x changed setup code to automagically find Settings.php (hopefully)
* rearranged stuff in template to use less room (set <form>-block margin to 0)
+ calculate /Sources/ directory dynamically from SMF setup
* rewrote setup like in SMF's package SDK and also made it use db_query()
+ added CHMOD of sboxDB.php to 644 as some servers set it to 755 which leads to Internal Server Errors
* added frameborder="0" and a style-definition to show an own border
x JavaScript tried to set timestamp even if there was no input field in parent window ~~> lead to error message in MSIE
* moved collapsing-JavaScript to sbox.template.php (one file less to be changed by package manager)
x fixed selectable font-sizes (were "xp" instead of "px", changed them to point(pt) though)
+ added BBCode-option in settings
+ added option to switch off sbox completely for Guests
* centered input area so that the Refresh-button is also centered for Guests
+ added History-option in settings, but no code to handle it for now
+ added basic history feature with locked filewrite into .html-file
! Only Admins can see the link to history file for now - but it's readable for everyone
x check for empty $_REQUEST['action'] before switch()
+ added option to disable sound notification


It now looks like this:


To make the shoutbox work with other themes, you have to do the following:

Add the code

  
// display shoutbox
  
if (function_exists('sbox')) sbox();


at the position you want the shoutbox to appear. (Mostly you will put this into BoardIndex.template.php.)


If you have questions, ask in the forums: English / Deutsch

I also set up a bugtracker.




NEVER contact me via ICQ/MSN/whatever for support inquiries unless I told you to do so! Use the forum threads instead.
Only send PMs if you need to tell me sensitive data.

tapirul

#1
thsi is a great mod, and it's getting better and better.

i have a question only, what should I do to get rid of the "type your message here and press ENTER"? - the problem is, if I want to shout only a smilie, the text goes there too, even if I delete it first.
thanks

Ps (later) Nevermind, i found the solution in the other topic.
Somebody better moves the posts relatetd to this mod here...

GB!

I just posted in mbirth's other thread  :D

I was wondering how to use SMF's parser for text and smileys instead of what's built into the shoutbox. specifically, I want to use my smileys in the shoutbox!  ;)

ProtoMan.EXE

I have a small question , how can I make it visible for all pages ? I mean not only the board index ? If I have to change the code or something , please tell me  :)

denislici


i have char problem with my lang(turkish), how can we choose it?
Love the Creature for Creator's sake. (English)
Duje Krijesen per hire te Krijuesit. (Albanian)
Yaradılan'ı sev Yaradan'dan ötürü. (Turkish)
Ami la Creatura per ce la creato il Creatore. (Italian)

xcrazyxfrogx

Those who use Helios multi theme 1.1RC2 or RC3 add this to ur BoardIndex.template.php
look for
Quote// Show the news fader?  (assuming there are things to show...)
        if ($settings['show_newsfader'] && !empty($context['fader_news_lines']))
        {
                echo $topbox;
                echo '

replace with
Quote
// display shoutbox
  if (function_exists('sbox')) sbox();
// Show the news fader?  (assuming there are things to show...)
        if ($settings['show_newsfader'] && !empty($context['fader_news_lines']))
        {
                echo $topbox;
                echo '
and u will get it above News Fader Box :) Enjoy buds :D
Finally ShoutBox on my SMF site :) thanx bro


Money... my obsession... Wealth... my addiction... Fear... my weapon... Crazy people... don't you understand... from the smokes of fear... who I am?

fiver

Hi mbirth,

I'd like to reverse the display order similar to msn and yahoo like this:
Message display
Emoticon
Input box

I had a look at sbox.template.php and it's beyond my ability to shuffle the codes. Would you mind posting the changed code here? I'll be fine in repacking the package myself.

Also, how do I put the refresh gif next to SMF Shoutbox instead?

Thanks.
:)


tulie

Hi,

I get this error when trying to use type a msg, this error comes up and disappers in like 5 secs.

Im using it on  RC3

Notice: Undefined variable: divclass in /var/www/vhosts/XXXX.com/httpdocs/forum/Sources/sboxDB.php on line 206

xcrazyxfrogx

Quote from: tulie on October 10, 2006, 03:58:25 PM
Hi,

I get this error when trying to use type a msg, this error comes up and disappers in like 5 secs.

Im using it on  RC3

Notice: Undefined variable: divclass in /var/www/vhosts/XXXX.com/httpdocs/forum/Sources/sboxDB.php on line 206

Try uploading and replace sboxDB.php again to your Sources Folder :)


Money... my obsession... Wealth... my addiction... Fear... my weapon... Crazy people... don't you understand... from the smokes of fear... who I am?

tulie

#9
The error still exists  :-[
BTW i got a error while installing on the headers saying "CHMOD failed on sboxDB.php"
I checked CHMOD data and its set to 777 on chmod
This is how it looks like:


souljugler

I am a Totally New at this thing,  :P

I even dont know that how to install this..

Can any1 tell me that what to do after downloading this in PC, what should i do..

means in which DIR of FTP should i upload & then the next proces ???

& is there any better Shoutbox than this one ???

Poreman

Quote from: ProtoMan.EXE on September 26, 2006, 06:11:47 AM
I have a small question , how can I make it visible for all pages ? I mean not only the board index ? If I have to change the code or something , please tell me  :)

I call the shoutbox from the index.template.php above the copyright at the bottom
Works for me.
I, even I, am the LORD; and beside me there is no saviour.
Isaiah 43:11

TrustingJesus

Poreman

The new message sound doesn't seem to be working, I have the sound turned on in configuration in admin cp.  The wav file is in the root of forum but when a new shout comes in no sound anybody know where to look or why this feature may not be working for me?

All help appreciated

Poreman
I, even I, am the LORD; and beside me there is no saviour.
Isaiah 43:11

TrustingJesus

xcrazyxfrogx

Quote from: tulie on October 10, 2006, 07:27:30 PM
The error still exists  :-[
BTW i got a error while installing on the headers saying "CHMOD failed on sboxDB.php"
I checked CHMOD data and its set to 777 on chmod
This is how it looks like:



whats the filename undefined var class happening???


Money... my obsession... Wealth... my addiction... Fear... my weapon... Crazy people... don't you understand... from the smokes of fear... who I am?

DVD_GR

I have also a question how to change the iso encoding at Overclocking Technology the greek characters dont appear....

souljugler

Quote from: souljugler on October 11, 2006, 07:10:05 AM
I am a Totally New at this thing,  :P

I even dont know that how to install this..

Can any1 tell me that what to do after downloading this in PC, what should i do..

means in which DIR of FTP should i upload & then the next proces ???

& is there any better Shoutbox than this one ???


PLZ help ......  :'(

Chad

Sometimes when I shout I get a mini-copy of my website inside the shoutbox with this error:

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 're short videos, hoping you buy the full length stuff, and so am I because it me' at line 2
File: /directoryedittedout/Sources/SplitTopics.php
Line: 1234



mforum

Shoutbox use a different character encoding than forum ?  Greek characters look like symbols  :(

agridoc

After a quick glance, I believe that the problem for non UTF-8 encoding is this part of code in sboxDB.php

function missinghtmlentities($text) {
  global $context;
  // entitify missing characters, ignore entities already there (Unicode / UTF8) (hopefully in {-notation)
  $split = preg_split('/(&#[\d]+;)/', $text, -1, PREG_SPLIT_DELIM_CAPTURE);
  $result = '';
  foreach ($split as $s) {
    if (substr($s, 0, 2) != '&#' || substr($s, -1, 1) != ';') {
      // filter out "ANSI_X3.4-1968" charset, which just means plain old ASCII ... replace by UTF-8
      if (strpos($context['character_set'], 'ANSI_') !== false) $charset = 'UTF-8'; else $charset = $context['character_set'];
      $result .= @htmlentities($s, ENT_NOQUOTES, $charset);
    } else {
      $result .= $s;
    }
  }
  return $result;
}


However some more points might need examining.

I see in the topic interest from another Greek and a Turkish about codepage conflict problem of SMF Shoutbox.
  For Greek aeromodellers and our friends around the world  - Greek Button sets for SMF - Greeklish to Greek mod
Δeν αφιερώνω χρόνο για μηνύματα σε greeklish.

sawz

i am getting pages upon pages of errors in the forum error log.
Undefined index: sbox_TypeShout
Ficheiro: /home/xxxx/public_html/public/Themes/default/sbox.template.php (main_above sub template - eval?)
Linha: 77

i have other errors but they are in portuguese.
is there a language pack for this mod?
keep smiling, they'll always wonder what your up too.....

Advertisement: