News:

Want to get involved in developing SMF? Why not lend a hand on our GitHub!

Main Menu

SMF Shoutbox

Started by Deep, March 15, 2006, 08:09:52 AM

Previous topic - Next topic

noaneo

Good evening,
How to install for shoutbox with SMF v.1.1.1?
Thank you
Noaneo

belaferon

Quote from: noaneo on January 08, 2007, 01:18:33 PM
Good evening,
How to install for shoutbox with SMF v.1.1.1?
Thank you
How, How?

Pleas someboody.....

noaneo

Hello,
I do not speak English, I use a translator to have a dialogue, I downloaded the last one of shoutbox, and I have an error message, that to make?
If I write in the column "French" somebody can help me?
Thank you
Noaneo

pariofdreamz

Good evening,
How to install for shoutbox with SMF v.1.1.1?
Thank you :(


Nothing is IMPOSSIBLE in this world as IMPOSSIBLE itself says I M POSSIBLE

Kettu

Please, if you ask for Support, tell us the Version you use and whose shoutbox (deep, mbirth or FoneBone).
Main Forum: SMF 2.0.6
Co-Forum: SMF 2.0.6

belaferon

#785
Quote from: Kettu on January 09, 2007, 09:28:12 AM
Please, if you ask for Support, tell us the Version you use and whose shoutbox (deep, mbirth or FoneBone).
mbirth
http://custom.simplemachines.org/mods/index.php?mod=412
v1.15 with SMF 1.1.1

noaneo

Good evening,
it is the version which I took, walk not
Noaneo

knt3424

I'm running a board (v1.1.1) with Classic YaBB theme and thinking about installing mbirth's version (or maybe on of the others).  But I'd like to see a demo of a working shoutbox.  Can anyone direct me to a board with a working shoutbox?  And maybe tell me the version they are running so I can compare?

Thanks so much!

kok3n

try mine,  www.bisdak.ph

you need to login before you can view the shoutbox..

belaferon

Quote from: kok3n on January 09, 2007, 03:04:34 PM
try mine,  hxxp:www.bisdak.ph [nonactive]

you need to login before you can view the shoutbox..
Pleas tell me haw you install this mod?

If I wont install him, SMF give me message:

Installation Readme
Sorry, but the SMF Shoutbox Mod doesn't support your SMF version!

Pleas someboody help me...



Kettu

Quote from: belaferon on January 09, 2007, 09:33:19 AM
Quote from: Kettu on January 09, 2007, 09:28:12 AM
Please, if you ask for Support, tell us the Version you use and whose shoutbox (deep, mbirth or FoneBone).
mbirth
http://custom.simplemachines.org/mods/index.php?mod=412
v1.15 with SMF 1.1.1
Well, v1.15 is made for 1.1 RC3. So I know mbirth will make a new version for 1.1.1. He couldn't program the last weeks because of stress, but he told me, he will do it soon.
Main Forum: SMF 2.0.6
Co-Forum: SMF 2.0.6

SponToN

is there a possibility to make SB by DEEP that posts there will be sort that newest will be at the bottom not at the top ??

Kettu

Quote from: SponToN on January 10, 2007, 12:01:03 PM
is there a possibility to make SB by DEEP that posts there will be sort that newest will be at the bottom not at the top ??
Yes. You have to find the ASC / DESC part at sboxDB.php. There should be something like this code. Could be a bit different.

ORDER BY id DESC, time ASC LIMIT " . $modSettings['sbox_MaxLines'], __FILE__, __LINE__);

Just change id DESC to id ASC. But please, don't forget to backup the file. Because I can't guarantee that this works.
Main Forum: SMF 2.0.6
Co-Forum: SMF 2.0.6

circles122345

i have a problem with my smf i want to have a shoutbox in my forum, my theme is classic..

thanks,
<<clear the evidence before you leave>>

richiehale

okay I have been trying to get this to work, I have RC3 , and it installed fine, but like others i am getting the 404 error in the box, I think I edited the sbox.template.php file right, I added it below if anyone can tell me if i screwed it up. Thank you in advance

<?php

function template_shout_box() {
global $context, $settings, $options, $txt, $user_info, $scripturl, $modSettings,
      $forum_version, $sourcedir, $boarddir, $boardurl;

$themedir = $settings['default_theme_url'];
$imgdir = $themedir."/images/";
$sourceurl = str_replace($boarddir, $boardurl, $sourcedir);

if ($context['user']['is_guest'] && $modSettings['sbox_GuestVisible'] != '1') return;

echo '
 <script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var current_header_sb = '
. ((empty($options['collapse_header_sb']))?'false':'true') . ';

function shrinkHeaderSB(mode) {'
;

if ($context['user']['is_guest']) {
echo '
document.cookie = "upshrinkSB=" + (mode ? 1 : 0);'
;
} else {
echo '
smf_setThemeOption("collapse_header_sb", mode?1:0, null, "'
. $context['session_id'] . '");';
}

echo '
document.getElementById("upshrink_sb").src = smf_images_url + (mode ? "/expand.gif" : "/collapse.gif");
document.getElementById("upshrinkHeaderSB").style.display = mode ? "none" : "";
current_header_sb = mode;
}

    function clearSbox() {
      // Delete shoutbox message text after shout has been submitted
      if (document.sbox)
      document.sbox.sboxText.value="";
     }
     
     function submitSbox() {
       pretxt = \''
. $txt['sbox_TypeShout'] . '\';
       prelen = pretxt.length;
       if (document.sbox.sboxText.value == pretxt) return false;
       xval = document.sbox.sboxText.value;
       while (xval.indexOf(pretxt) >= 0) {
         xpos = xval.indexOf(pretxt);
         xval = xval.substring(0, xpos) + xval.substring(xpos+prelen, xval.length);
       }
       document.sbox.sboxText.value = xval;
       setTimeout(\'clearSbox()\', 500);
       return true;
     }
  // ]]></script>
<div class="tborder"'
, $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' style="width: 100%;"' : '', '>
<div class="catbg" style="padding: 6px; vertical-align: middle; text-align: center;">
<a href="#" onclick="shrinkHeaderSB(!current_header_sb); return false;"><img id="upshrink_sb" src="'
, $settings['images_url'], '/', empty($options['collapse_header_sp']) ? 'collapse.gif' : 'expand.gif', '" alt="*" title="', $txt['upshrink_description'], '" style="margin-right: 2ex;" align="right" /></a>'.$txt['sbox_ModTitle'].'
</div>
<div id="upshrinkHeaderSB"'
, empty($options['collapse_header_sb']) ? '' : ' style="display: none;"', '>
<table border="0" width="100%" cellspacing="1" cellpadding="4" class="bordercolor">
<tr class="windowbg" align="right" style="width:13%">
<td class="windowbg" style="width:87%">
<table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr>
<td align="center" valign="middle">
      <form name="sbox" action="www.employeethoughts.com/forums/sources/sboxDB.php?action=write" method="post" target="sboxframe" style="margin: 0;" onSubmit="return submitSbox();" enctype="multipart/form-data" accept-charset="'
. $context['character_set'] . '">
  <a href="www.employeethoughts.com/forums/sources/sboxDB.php?" target="sboxframe"><img src="'
.$imgdir.'sbox_refresh.gif" border="0" width="16" height="17" align="absmiddle" alt="' . $txt['sbox_Refresh'] . '" /></a>';
if ((!$context['user']['is_guest']) || ($modSettings['sbox_GuestAllowed'] == "1")) {
 echo '
       <input type="hidden" name="ts" value="'
.forum_time(true).'">
<input class="windowbg2" type="text" name="sboxText" size="100" maxlength="320" onFocus="if (this.value==\''
. $txt['sbox_TypeShout'] . '\') this.value = \'\';" onBlur="if (this.value==\'\') this.value=\'' . $txt['sbox_TypeShout'] . '\';" />&nbsp;<input type="submit" class="input" value="&nbsp;shout&nbsp;" />';
} else {
 // guest is not allowed to shout ~~> show message
 echo $txt['sbox_Login'];
}
 echo
'
          </form>
                 <script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
                   document.sbox.sboxText.value = \''
. $txt['sbox_TypeShout'] . '\';
                 // ]]></script>
</td>
</tr>'
;

if (($modSettings['sbox_SmiliesVisible'] == "1") && ((!$context['user']['is_guest']) || ($modSettings['sbox_GuestAllowed'] == "1"))) {
   
sbox_loadSmileys();
   echo
'
             <tr>
               <td align="center">'
;
   
sbox_printSmileys();
   echo
'
               </td>
             </tr>'
;
}

 echo
'
<tr>
<td>
    <iframe name="sboxframe" src="www.employeethoughts.com/forums/sources/sboxDB.php?" width="100%" height="'
.$modSettings['sbox_Height'].'" frameborder="0" style="border: 2px ridge silver;"></iframe>
</td>
</tr>
</table>
  </td>
  </tr>
  </table>
  </div>
 </div>'
;
}

// BEGIN: Borrowed from theme_postbox($msg) in Subs-Post.php (1.1rc3)
function sbox_loadSmileys() {
 global
$context, $settings, $user_info, $txt, $modSettings, $db_prefix;
 
// Initialize smiley array...
$context['smileys'] = array(
'postform' => array(),
'popup' => array(),
);

// Load smileys - don't bother to run a query if we're not using the database's ones anyhow.
if (empty($modSettings['smiley_enable']) && $user_info['smiley_set'] != 'none')
$context['smileys']['postform'][] = array(
'smileys' => array(
array('code' => ':)', 'filename' => 'smiley.gif', 'description' => $txt[287]),
array('code' => ';)', 'filename' => 'wink.gif', 'description' => $txt[292]),
array('code' => ':D', 'filename' => 'cheesy.gif', 'description' => $txt[289]),
array('code' => ';D', 'filename' => 'grin.gif', 'description' => $txt[293]),
array('code' => '>:(', 'filename' => 'angry.gif', 'description' => $txt[288]),
array('code' => ':(', 'filename' => 'sad.gif', 'description' => $txt[291]),
array('code' => ':o', 'filename' => 'shocked.gif', 'description' => $txt[294]),
array('code' => '8)', 'filename' => 'cool.gif', 'description' => $txt[295]),
array('code' => '???', 'filename' => 'huh.gif', 'description' => $txt[296]),
array('code' => '::)', 'filename' => 'rolleyes.gif', 'description' => $txt[450]),
array('code' => ':P', 'filename' => 'tongue.gif', 'description' => $txt[451]),
array('code' => ':-[', 'filename' => 'embarrassed.gif', 'description' => $txt[526]),
array('code' => ':-X', 'filename' => 'lipsrsealed.gif', 'description' => $txt[527]),
array('code' => ':-\\', 'filename' => 'undecided.gif', 'description' => $txt[528]),
array('code' => ':-*', 'filename' => 'kiss.gif', 'description' => $txt[529]),
array('code' => ':\'(', 'filename' => 'cry.gif', 'description' => $txt[530])
),
'last' => true,
);
elseif ($user_info['smiley_set'] != 'none')
{
if (($temp = cache_get_data('posting_smileys', 480)) == null)
{
$request = db_query("
SELECT code, filename, description, smileyRow, hidden
FROM
{$db_prefix}smileys
WHERE hidden IN (0, 2)
ORDER BY smileyRow, smileyOrder"
, __FILE__, __LINE__);
while ($row = mysql_fetch_assoc($request))
{
$row['code'] = htmlspecialchars($row['code']);
$row['filename'] = htmlspecialchars($row['filename']);
$row['description'] = htmlspecialchars($row['description']);

$context['smileys'][empty($row['hidden']) ? 'postform' : 'popup'][$row['smileyRow']]['smileys'][] = $row;
}
mysql_free_result($request);

cache_put_data('posting_smileys', $context['smileys'], 480);
}
else
$context['smileys'] = $temp;
}

// Clean house... add slashes to the code for javascript.
foreach (array_keys($context['smileys']) as $location)
{
foreach ($context['smileys'][$location] as $j => $row)
{
$n = count($context['smileys'][$location][$j]['smileys']);
for ($i = 0; $i < $n; $i++)
{
$context['smileys'][$location][$j]['smileys'][$i]['code'] = addslashes($context['smileys'][$location][$j]['smileys'][$i]['code']);
$context['smileys'][$location][$j]['smileys'][$i]['js_description'] = addslashes($context['smileys'][$location][$j]['smileys'][$i]['description']);
}

$context['smileys'][$location][$j]['smileys'][$n - 1]['last'] = true;
}
if (!empty($context['smileys'][$location]))
$context['smileys'][$location][count($context['smileys'][$location]) - 1]['last'] = true;
}
$settings['smileys_url'] = $modSettings['smileys_url'] . '/' . $user_info['smiley_set'];
}
// END: Borrowed from theme_postbox($msg) in Subs-Post.php

// BEGIN: Borrowed from template_postbox(&$message) in Post.template.php (1.1rc3)
function sbox_printSmileys() {
 global
$context, $txt, $settings;
 
 
loadLanguage('Post');
 
// Now start printing all of the smileys.
if (!empty($context['smileys']['postform']))
{
// Show each row of smileys ;).
foreach ($context['smileys']['postform'] as $smiley_row)
{
foreach ($smiley_row['smileys'] as $smiley)
echo '
<a href="javascript:void(0);" onclick="replaceText(\' '
, $smiley['code'], '\', document.forms.sbox.sboxText); return false;"><img src="', $settings['smileys_url'], '/', $smiley['filename'], '" align="bottom" alt="', $smiley['description'], '" title="', $smiley['description'], '" /></a>';

// If this isn't the last row, show a break.
if (empty($smiley_row['last']))
echo '<br />';
}

// If the smileys popup is to be shown... show it!
if (!empty($context['smileys']['popup']))
echo '
<a href="javascript:sbox_moreSmileys();">['
, $txt['more_smileys'], ']</a>';
}

// If there are additional smileys then ensure we provide the javascript for them.
if (!empty($context['smileys']['popup']))
{
echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var smileys = ['
;

foreach ($context['smileys']['popup'] as $smiley_row)
{
echo '
['
;
foreach ($smiley_row['smileys'] as $smiley)
{
echo '
["'
, $smiley['code'], '","', $smiley['filename'], '","', $smiley['js_description'], '"]';
if (empty($smiley['last']))
echo ',';
}

echo ']';
if (empty($smiley_row['last']))
echo ',';
}

echo '];
var smileyPopupWindow;

function sbox_moreSmileys()
{
var row, i;

if (smileyPopupWindow)
smileyPopupWindow.close();

smileyPopupWindow = window.open("", "add_smileys", "toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,width=480,height=220,resizable=yes");
smileyPopupWindow.document.write(\'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\n<html>\');
smileyPopupWindow.document.write(\'\n\t<head>\n\t\t<title>'
, $txt['more_smileys_title'], '</title>\n\t\t<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/style.css" />\n\t</head>\');
smileyPopupWindow.document.write(\'\n\t<body style="margin: 1ex;">\n\t\t<table width="100%" cellpadding="5" cellspacing="0" border="0" class="tborder">\n\t\t\t<tr class="titlebg"><td align="left">'
, $txt['more_smileys_pick'], '</td></tr>\n\t\t\t<tr class="windowbg"><td align="left">\');

for (row = 0; row < smileys.length; row++)
{
for (i = 0; i < smileys[row].length; i++)
{
smileys[row][i][2] = smileys[row][i][2].replace(/"/g, \'&quot;\');
smileyPopupWindow.document.write(\'<a href="javascript:void(0);" onclick="window.opener.replaceText(&quot; \' + smileys[row][i][0] + \'&quot;, window.opener.document.forms.sbox.sboxText); window.focus(); return false;"><img src="'
, $settings['smileys_url'], '/\' + smileys[row][i][1] + \'" alt="\' + smileys[row][i][2] + \'" title="\' + smileys[row][i][2] + \'" style="padding: 4px;" border="0" /></a> \');
}
smileyPopupWindow.document.write("<br />");
}

smileyPopupWindow.document.write(\'</td></tr>\n\t\t\t<tr><td align="center" class="windowbg"><a href="javascript:window.close();\\">'
, $txt['more_smileys_close_window'], '</a></td></tr>\n\t\t</table>\n\t</body>\n</html>\');
smileyPopupWindow.document.close();
}
// ]]></script>'
;
}
}
// END: Borrowed from template_postbox(&$message) in Post.template.php

?>

kok3n

Quote from: kok3n on January 03, 2007, 10:10:52 PM
I have this problem with the shoutbox. If a member is inactive or doesn't do anything on the forum, his name will disappear on the online list. Thus, if there are 10 users logged in and all of them are not doing anything, nobody will ever appear on the online list.

Please have this resolved.. Thanks!

Don't you guys have this same problem? Please i need feedback from those who are using this shoutbox.

Thanks!

circles122345

but my problem also is i dunno na know who is online in my shoutbox coz there is know icon on it...pls help on how install icon..


thanks ..
<<clear the evidence before you leave>>

qubbah



can i ask u more q...

i have upgrade from 1.1rc3 to smf1.1.1

what must i do to reinstall without error because this version only work with 1.1.rc3

iyeru42

When I tried installing SBOX 1.20, I get the following test error:

15.     Execute Modification     ./Sources/ModSettings.php     Test failed

buhaychat.com

Installed Deep's Shoutbox on my 1.1.1 version without problem, but once installed, it's okay at the start:



It does the refresh thing, but then after awhile, it turns into an error like this:



Notice: Undefined index: action in /home/content/b/u/h/buhaychat/html/forums/Sources/sboxDB.php on line 66

Line 66 has: switch ($_REQUEST['action'])

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/content/b/u/h/buhaychat/html/forums/Sources/Subs.php on line 321

Line 321 has:    $ret = mysql_query($db_string, $db_connection);

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/content/b/u/h/buhaychat/html/forums/Sources/sboxDB.php on line 123

Line 123 has: if(mysql_num_rows($result))

Thanks in advance for your help. :)

Advertisement: