News:

Want to get involved in developing SMF, then 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

BeEbAcK

well im new at these....but my error says :

Notice: Undefined index: sbox_smilie01_file in /home/www/forum/Sources/Load.php(1656) : eval()'d code on line 44

Notice: Undefined index: sbox_smilie01_text in /home/www/forum/Sources/Load.php(1656) : eval()'d code on line 44

Notice: Undefined index: sbox_smilie01_text in /home/www/forum/Sources/Load.php(1656) : eval()'d code on line 44

Notice: Undefined index: sbox_smilie01_code in /home/www/forum/Sources/Load.php(1656) : eval()'d code on line 44

Notice: Undefined index: sbox_smilie02_file in /home/www/forum/Sources/Load.php(1656) : eval()'d code on line 45

Notice: Undefined index: sbox_smilie02_text in /home/www/forum/Sources/Load.php(1656) : eval()'d code on line 45

I can see the shoutout Box but




Any ideas what did go wrong :<  plz help me
-= There is no side, there is only the DARK side =-

x0joshua0x

disable smileys to help with debugging ?

carlatf

A pretty basic question, what's the difference between a Shoutbox and a chat?.
They seem very similar to me, so I can't decite to install the Integrated chat box or this Shoutbox.
Best,
Carla

Col

A shoutbox is intended for quick hellos, smart-arse comments, etc. It's not organised in way that works very well for chat. Although this shoutbox seems to work pretty much in real time, most are too slow for that, refreshing only when you refresh or move page. I have both, as they serve different functions.

kriskd

I noticed that "Thursday" is spelled wrong in my SMF shoutbox.  Where in the code can I correct this?
SMF 2.0.2

kyt

Ok this is driving me crazy

I just upgraded to 1.1 RC2 today and I can't get any mods to install
I'm trying to install this shoutbox but the forum is gving me fits

Yesterday I installed 2 mods on 1.0.7 and I didn't have an issue
Now I'm getting "You cannot download or install new packages because the Packages directory or one of the files in it are not writable! "

Not possible! I've changed permissions on the Package folder and everything under to 777
Thinking the error message was telling me the wrong folder I went through and set everything in base folder to 777 and the sources folder.
Am I going to have to go through each and every theme folder too?

or am I missing something?
Anybody know?

K_4_kelly

Quote from: Deep on May 21, 2006, 08:02:20 AM
Quote from: littleone
Can you specify the coding to be placed and where it needs to be placed to get the local time.
Please have a look on the file sboxDB.php in the package of version 1.05beta.

I want to explain the changes step by step.
First you need a new designed database table to store the shout contents. In this new table the field time (varchar(25)) is changed to shouttime (int(11)) to store a timestamp instead of a string which contains a text with the time. The PHP command to create this table is:

$result = mysql_query("
CREATE TABLE {$db_prefix}sbox_messages
(id int(11) NOT NULL auto_increment,
shouttime int(11) NOT NULL default '',
name varchar(80) NOT NULL default '',
content text NOT NULL,
PRIMARY KEY (id)) TYPE=MyISAM;");


Now in sboxDB.php you have to replace the following code:

// insert shout message into database
$sql = "insert into ".$db_prefix."sbox_content (name,content,time) values ('".$user_info['username']."','".$content."','$date')";
db_query($sql,__FILE__,__LINE__);

// delete old shout messages (get id of last shouting and delete all shoutings as defined in settings
$result = db_query("select id from ".$db_prefix."sbox_content where name='".$user_info['username']."' and content='".$content."' and time='$date'",__FILE__,__LINE__);
$rows = mysql_fetch_assoc($result) ;
$sql = "delete from ".$db_prefix."sbox_content where id < '".($rows["id"]-$modSettings['sbox_MaxLines'])."'";
db_query($sql,__FILE__,__LINE__);


with:

$time=time();

// insert shout message into database
$sql = "insert into ".$db_prefix."sbox_messages (name,content,shouttime) values ('".$user_info['username']."','".$content."','".$time."')";
db_query($sql,__FILE__,__LINE__);

// delete old shout messages (get id of last shouting and delete all shoutings as defined in settings)
$result = db_query("select id from ".$db_prefix."sbox_messages where name='".$user_info['username']."' and content='".$content."' and shouttime='$time'",__FILE__,__LINE__);
$rows = mysql_fetch_assoc($result) ;
$sql = "delete from ".$db_prefix."sbox_messages where id < '".($rows["id"]-$modSettings['sbox_MaxLines'])."'";
db_query($sql,__FILE__,__LINE__);


Now there is a timestamp written to the database.
To display it, you have to replace in sboxDB.php the following code:

// get shout messages out of database
$result = db_query("select * from ".$db_prefix."sbox_content order by id desc, time asc limit ".$modSettings['sbox_MaxLines'],__FILE__,__LINE__);
if(mysql_num_rows($result))
{
$count=0; // counter to distinguish font color
while($row = mysql_fetch_assoc($result))
{
$count = $count + 1; // increase counter
$name = $row["name"]; // user name
$date = $row["time"]; // shouting date and time
$content = stripslashes($row['content']); // shouting content

// replace smilie code with path to smilie image
$content = str_replace ($txt['sbox_smilie01_code'], '<img src="'.$imgdir.$txt['sbox_smilie01_file'].'" alt="'.$txt['sbox_smilie01_text'].'" title="'.$txt['sbox_smilie01_text'].'" border="0" />', $content);
$content = str_replace ($txt['sbox_smilie02_code'], '<img src="'.$imgdir.$txt['sbox_smilie02_file'].'" alt="'.$txt['sbox_smilie02_text'].'" title="'.$txt['sbox_smilie02_text'].'" border="0" />', $content);
$content = str_replace ($txt['sbox_smilie03_code'], '<img src="'.$imgdir.$txt['sbox_smilie03_file'].'" alt="'.$txt['sbox_smilie03_text'].'" title="'.$txt['sbox_smilie03_text'].'" border="0" />', $content);
$content = str_replace ($txt['sbox_smilie04_code'], '<img src="'.$imgdir.$txt['sbox_smilie04_file'].'" alt="'.$txt['sbox_smilie04_text'].'" title="'.$txt['sbox_smilie04_text'].'" border="0" />', $content);
$content = str_replace ($txt['sbox_smilie05_code'], '<img src="'.$imgdir.$txt['sbox_smilie05_file'].'" alt="'.$txt['sbox_smilie05_text'].'" title="'.$txt['sbox_smilie05_text'].'" border="0" />', $content);
$content = str_replace ($txt['sbox_smilie06_code'], '<img src="'.$imgdir.$txt['sbox_smilie06_file'].'" alt="'.$txt['sbox_smilie06_text'].'" title="'.$txt['sbox_smilie06_text'].'" border="0" />', $content);
$content = str_replace ($txt['sbox_smilie07_code'], '<img src="'.$imgdir.$txt['sbox_smilie07_file'].'" alt="'.$txt['sbox_smilie07_text'].'" title="'.$txt['sbox_smilie07_text'].'" border="0" />', $content);
$content = str_replace ($txt['sbox_smilie08_code'], '<img src="'.$imgdir.$txt['sbox_smilie08_file'].'" alt="'.$txt['sbox_smilie08_text'].'" title="'.$txt['sbox_smilie08_text'].'" border="0" />', $content);
$content = str_replace ($txt['sbox_smilie09_code'], '<img src="'.$imgdir.$txt['sbox_smilie09_file'].'" alt="'.$txt['sbox_smilie09_text'].'" title="'.$txt['sbox_smilie09_text'].'" border="0" />', $content);
$content = str_replace ($txt['sbox_smilie10_code'], '<img src="'.$imgdir.$txt['sbox_smilie10_file'].'" alt="'.$txt['sbox_smilie10_text'].'" title="'.$txt['sbox_smilie10_text'].'" border="0" />', $content);
$content = str_replace ($txt['sbox_smilie11_code'], '<img src="'.$imgdir.$txt['sbox_smilie11_file'].'" alt="'.$txt['sbox_smilie11_text'].'" title="'.$txt['sbox_smilie11_text'].'" border="0" />', $content);
$content = str_replace ($txt['sbox_smilie12_code'], '<img src="'.$imgdir.$txt['sbox_smilie12_file'].'" alt="'.$txt['sbox_smilie12_text'].'" title="'.$txt['sbox_smilie12_text'].'" border="0" />', $content);
$content = str_replace ($txt['sbox_smilie13_code'], '<img src="'.$imgdir.$txt['sbox_smilie13_file'].'" alt="'.$txt['sbox_smilie13_text'].'" title="'.$txt['sbox_smilie13_text'].'" border="0" />', $content);
$content = str_replace ($txt['sbox_smilie14_code'], '<img src="'.$imgdir.$txt['sbox_smilie14_file'].'" alt="'.$txt['sbox_smilie14_text'].'" title="'.$txt['sbox_smilie14_text'].'" border="0" />', $content);
$content = str_replace ($txt['sbox_smilie15_code'], '<img src="'.$imgdir.$txt['sbox_smilie15_file'].'" alt="'.$txt['sbox_smilie15_text'].'" title="'.$txt['sbox_smilie15_text'].'" border="0" />', $content);

// display shouting message and use a different color each second row
if ($count % 2)
echo '
<div class="OddLine">';
else
echo '
<div class="EvenLine">';
if ($context['user']['is_admin'])
echo '<a title="'.$txt['sbox_KillShout'].'" class="Kill" onclick="return killYesNo();" href="sboxDB.php?action=kill&kill='.$row['id'].'">[X]</a>';

echo '[&nbsp;'.$date.'&nbsp;]&nbsp;<b>&lt;'.$name.'&gt;</b>&nbsp;'.$content.'</div>';
}


with:

// get shout messages out of database
$result = db_query("select id,name,shouttime,content from ".$db_prefix."sbox_messages order by id desc, shouttime asc limit ".$modSettings['sbox_MaxLines'],__FILE__,__LINE__);
if(mysql_num_rows($result))
{
$count=0; // counter to distinguish font color
while($row = mysql_fetch_assoc($result))
{
$count = $count + 1; // increase counter
$name = $row["name"]; // user name
$shouttime = $row["shouttime"]; // shouting date and time
$content = stripslashes($row['content']); // shouting content

$time=$shouttime;

// replace smilie code with path to smilie image
$content = str_replace ($txt['sbox_smilie01_code'], '<img src="'.$imgdir.$txt['sbox_smilie01_file'].'" alt="'.$txt['sbox_smilie01_text'].'" title="'.$txt['sbox_smilie01_text'].'" border="0" />', $content);
$content = str_replace ($txt['sbox_smilie02_code'], '<img src="'.$imgdir.$txt['sbox_smilie02_file'].'" alt="'.$txt['sbox_smilie02_text'].'" title="'.$txt['sbox_smilie02_text'].'" border="0" />', $content);
$content = str_replace ($txt['sbox_smilie03_code'], '<img src="'.$imgdir.$txt['sbox_smilie03_file'].'" alt="'.$txt['sbox_smilie03_text'].'" title="'.$txt['sbox_smilie03_text'].'" border="0" />', $content);
$content = str_replace ($txt['sbox_smilie04_code'], '<img src="'.$imgdir.$txt['sbox_smilie04_file'].'" alt="'.$txt['sbox_smilie04_text'].'" title="'.$txt['sbox_smilie04_text'].'" border="0" />', $content);
$content = str_replace ($txt['sbox_smilie05_code'], '<img src="'.$imgdir.$txt['sbox_smilie05_file'].'" alt="'.$txt['sbox_smilie05_text'].'" title="'.$txt['sbox_smilie05_text'].'" border="0" />', $content);
$content = str_replace ($txt['sbox_smilie06_code'], '<img src="'.$imgdir.$txt['sbox_smilie06_file'].'" alt="'.$txt['sbox_smilie06_text'].'" title="'.$txt['sbox_smilie06_text'].'" border="0" />', $content);
$content = str_replace ($txt['sbox_smilie07_code'], '<img src="'.$imgdir.$txt['sbox_smilie07_file'].'" alt="'.$txt['sbox_smilie07_text'].'" title="'.$txt['sbox_smilie07_text'].'" border="0" />', $content);
$content = str_replace ($txt['sbox_smilie08_code'], '<img src="'.$imgdir.$txt['sbox_smilie08_file'].'" alt="'.$txt['sbox_smilie08_text'].'" title="'.$txt['sbox_smilie08_text'].'" border="0" />', $content);
$content = str_replace ($txt['sbox_smilie09_code'], '<img src="'.$imgdir.$txt['sbox_smilie09_file'].'" alt="'.$txt['sbox_smilie09_text'].'" title="'.$txt['sbox_smilie09_text'].'" border="0" />', $content);
$content = str_replace ($txt['sbox_smilie10_code'], '<img src="'.$imgdir.$txt['sbox_smilie10_file'].'" alt="'.$txt['sbox_smilie10_text'].'" title="'.$txt['sbox_smilie10_text'].'" border="0" />', $content);
$content = str_replace ($txt['sbox_smilie11_code'], '<img src="'.$imgdir.$txt['sbox_smilie11_file'].'" alt="'.$txt['sbox_smilie11_text'].'" title="'.$txt['sbox_smilie11_text'].'" border="0" />', $content);
$content = str_replace ($txt['sbox_smilie12_code'], '<img src="'.$imgdir.$txt['sbox_smilie12_file'].'" alt="'.$txt['sbox_smilie12_text'].'" title="'.$txt['sbox_smilie12_text'].'" border="0" />', $content);
$content = str_replace ($txt['sbox_smilie13_code'], '<img src="'.$imgdir.$txt['sbox_smilie13_file'].'" alt="'.$txt['sbox_smilie13_text'].'" title="'.$txt['sbox_smilie13_text'].'" border="0" />', $content);
$content = str_replace ($txt['sbox_smilie14_code'], '<img src="'.$imgdir.$txt['sbox_smilie14_file'].'" alt="'.$txt['sbox_smilie14_text'].'" title="'.$txt['sbox_smilie14_text'].'" border="0" />', $content);
$content = str_replace ($txt['sbox_smilie15_code'], '<img src="'.$imgdir.$txt['sbox_smilie15_file'].'" alt="'.$txt['sbox_smilie15_text'].'" title="'.$txt['sbox_smilie15_text'].'" border="0" />', $content);

// Offset the time.
$time = $time + ($user_info['time_offset'] + $modSettings['time_offset']) * 3600;
if ($time < 0)
$time = 0;

// get actual weekday
$days = array($txt['sbox_Sunday'],$txt['sbox_Monday'],$txt['sbox_Tuesday'],$txt['sbox_Wednesday'],$txt['sbox_Thurday'],$txt['sbox_Friday'],$txt['sbox_Saturday']);
$day=$days[date("w",$time)]; // weekday
$date=$day." | ". date("G:i",$time); // time

// display shouting message and use a different color each second row
if ($count % 2)
echo '
<div class="OddLine">';
else
echo '
<div class="EvenLine">';
if ($context['user']['is_admin'])
echo '<a title="'.$txt['sbox_KillShout'].'" class="Kill" onclick="return killYesNo();" href="sboxDB.php?action=kill&kill='.$row['id'].'">[X]</a>';

echo '[&nbsp;'.$date.'&nbsp;]&nbsp;<b>&lt;'.$name.'&gt;</b>&nbsp;'.$content.'</div>';
}


It seems to be easier if you just replace your sboxDB.php with that one out of the 1.05beta package.


Quote from: x0joshua0x
Is there a way to make the username show as the persons display name instead of the account name.
I know there of course is a way to display the persons display name instead of the account name, but i don´t have experiences with this part of SMF.
I can not guarantee that it works, but try to replace in sboxDB.php any occurany of:

$user_info['username']


with:

$context['member']['name']

Does it work?


Quote from: littleone
Id also like to see membergroup specific permissions so that I can grant my moderators the ability to delete shouts.
I am sorry, but i do not have the time to do that.
I have no experience with this part of SMF.
I can not guarantee that it works, but if you want all moderators to be able to delete shouts, try to replace in sboxDB.php any occurany of:

$context['user']['is_admin']


with:

allowedTo('moderate_forum')


@x0joshua0x:
@littleone:
It seems to be a good idea if you ask some more experienced SMF coders to answer your questions. In both cases i can tell you what to replace, but i am not sure if i told you the right replacement.

However, have a happy sunday! :-)

Deep

Thanks Deep!
it works well...we have the correct local time now!
thanks!! :)

mass

can we add more smiles to it? :P

Soniceffect

Have a problem on getting this to work with a different skin. I`ve done  the modifications that you suggested and the shoutbox seems to work without a problem. Apart from there are no smilies showing. They work fine on the default skin, but not on the skin I`m using. Also don`t know if this helps, but when I went to view source in explorer, it seems to be pointing to the dir of them, but not an actually image.

Hope someone can help :)

KingOfMyWorld

After installation of the shoutbox mod, I go to the default theme and this is what appears inside the shoutbox. Anyway to make it go away and get the shoutbox working? My members don't care much for the mkportal's shoutbox and would like this one so any help would be much appreciated.  :)

<?
require("../SSI.php");

if (!defined('SMF'))
die('Hacking attempt...');

// global variables
global $db_connection, $context, $settings, $txt, $user_info, $modSettings, $db_prefix;

// used in test scenario
//@mysql_select_db($db_name, $db_connection);

//display html header
echo '<html xmlns="http://www.w3.org/1999/xhtml"', $context['right_to_left'] ? ' dir="rtl"' : '', '>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=', $context['character_set'], '" />
<meta name="description" content="Shoutbox" />
<meta name="keywords" content="Shoutbox" />
<title>Shoutbox</title>
<meta http-equiv="refresh" content="'.$modSettings['sbox_RefreshTime'].';URL=sboxDB.php">
<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/style.css?rc2" />
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
function killYesNo()
{
return confirm("'.$txt['sbox_KillShout'].'");

}
// ]]></script>

<style type="text/css"><!-- // --><![CDATA[
<!--
.Kill
{
color: #ff0000;
}
.OddLine
{
font-family: '.$modSettings['sbox_FontFamily1'].';
font-style: normal;
font-size: '.$modSettings['sbox_TextSize1'].';
font-weight: normal;
color: '.$modSettings['sbox_TextColor1'].';
}
.EvenLine
{
font-family: '.$modSettings['sbox_FontFamily2'].';
font-style: normal;
font-size: '.$modSettings['sbox_TextSize2'].';
font-weight: normal;
color: '.$modSettings['sbox_TextColor2'].';
}
body
{
padding: 0px 0px 0px 0px;
background-color: '.$modSettings['sbox_BackgroundColor'].';
}
a:link
{
color: #ff0000;
text-decoration: none;
}
//-->
// ]]></style>';


switch ($_REQUEST['action'])
{

case "write":
if  ((!$context['user']['is_guest']) || ($modSettings['sbox_GuestAllowed'] == "1"))
{
// empty messages are not allowed
$content=$_REQUEST['sboxText'];
if(chop($content."") != "")
{
// get actual weekday
$days = array($txt['sbox_Sunday'],$txt['sbox_Monday'],$txt['sbox_Tuesday'],$txt['sbox_Wednesday'],$txt['sbox_Thurday'],$txt['sbox_Friday'],$txt['sbox_Saturday']);
$day=$days[date("w")]; // weekday
$date=$day." | ". date("G:i"); // time

// handle spacial characters
$content=addslashes($content);

// insert shout message into database
$sql = "insert into ".$db_prefix."sbox_content (name,content,time) values ('".$user_info['username']."','".$content."','$date')";
db_query($sql,__FILE__,__LINE__);

// delete old shout messages (get id of last shouting and delete all shoutings as defined in settings
$result = db_query("select id from ".$db_prefix."sbox_content where name='".$user_info['username']."' and content='".$content."' and time='$date'",__FILE__,__LINE__);
$rows = mysql_fetch_assoc($result) ;
$sql = "delete from ".$db_prefix."sbox_content where id < '".($rows["id"]-$modSettings['sbox_MaxLines'])."'";
db_query($sql,__FILE__,__LINE__);
}
}
break;
case "kill":
if  ($context['user']['is_admin'])
{
$id = "".$_REQUEST['kill'];
if ($id != "")
{
$sql = "delete from ".$db_prefix."sbox_content where id=".$id."";
db_query($sql,__FILE__,__LINE__);
}
}
break;
}

// close header and open body
echo '
</head>
<body>';

// get smilie path
$themedir = $settings['default_theme_url']; // smf theme path
$imgdir = $themedir."/images/"; // smilie path

// get shout messages out of database
$result = db_query("select * from ".$db_prefix."sbox_content order by id desc, time asc limit ".$modSettings['sbox_MaxLines'],__FILE__,__LINE__);
if(mysql_num_rows($result))
{
$count=0; // counter to distinguish font color
while($row = mysql_fetch_assoc($result))
{
$count = $count + 1; // increase counter
$name = $row["name"]; // user name
$date = $row["time"]; // shouting date and time
$content = stripslashes($row['content']); // shouting content

// replace smilie code with path to smilie image
$content = str_replace ($txt['sbox_smilie01_code'], '<img src="'.$imgdir.$txt['sbox_smilie01_file'].'" alt="'.$txt['sbox_smilie01_text'].'" title="'.$txt['sbox_smilie01_text'].'" border="0" />', $content);
$content = str_replace ($txt['sbox_smilie02_code'], '<img src="'.$imgdir.$txt['sbox_smilie02_file'].'" alt="'.$txt['sbox_smilie02_text'].'" title="'.$txt['sbox_smilie02_text'].'" border="0" />', $content);
$content = str_replace ($txt['sbox_smilie03_code'], '<img src="'.$imgdir.$txt['sbox_smilie03_file'].'" alt="'.$txt['sbox_smilie03_text'].'" title="'.$txt['sbox_smilie03_text'].'" border="0" />', $content);
$content = str_replace ($txt['sbox_smilie04_code'], '<img src="'.$imgdir.$txt['sbox_smilie04_file'].'" alt="'.$txt['sbox_smilie04_text'].'" title="'.$txt['sbox_smilie04_text'].'" border="0" />', $content);
$content = str_replace ($txt['sbox_smilie05_code'], '<img src="'.$imgdir.$txt['sbox_smilie05_file'].'" alt="'.$txt['sbox_smilie05_text'].'" title="'.$txt['sbox_smilie05_text'].'" border="0" />', $content);
$content = str_replace ($txt['sbox_smilie06_code'], '<img src="'.$imgdir.$txt['sbox_smilie06_file'].'" alt="'.$txt['sbox_smilie06_text'].'" title="'.$txt['sbox_smilie06_text'].'" border="0" />', $content);
$content = str_replace ($txt['sbox_smilie07_code'], '<img src="'.$imgdir.$txt['sbox_smilie07_file'].'" alt="'.$txt['sbox_smilie07_text'].'" title="'.$txt['sbox_smilie07_text'].'" border="0" />', $content);
$content = str_replace ($txt['sbox_smilie08_code'], '<img src="'.$imgdir.$txt['sbox_smilie08_file'].'" alt="'.$txt['sbox_smilie08_text'].'" title="'.$txt['sbox_smilie08_text'].'" border="0" />', $content);
$content = str_replace ($txt['sbox_smilie09_code'], '<img src="'.$imgdir.$txt['sbox_smilie09_file'].'" alt="'.$txt['sbox_smilie09_text'].'" title="'.$txt['sbox_smilie09_text'].'" border="0" />', $content);
$content = str_replace ($txt['sbox_smilie10_code'], '<img src="'.$imgdir.$txt['sbox_smilie10_file'].'" alt="'.$txt['sbox_smilie10_text'].'" title="'.$txt['sbox_smilie10_text'].'" border="0" />', $content);
$content = str_replace ($txt['sbox_smilie11_code'], '<img src="'.$imgdir.$txt['sbox_smilie11_file'].'" alt="'.$txt['sbox_smilie11_text'].'" title="'.$txt['sbox_smilie11_text'].'" border="0" />', $content);
$content = str_replace ($txt['sbox_smilie12_code'], '<img src="'.$imgdir.$txt['sbox_smilie12_file'].'" alt="'.$txt['sbox_smilie12_text'].'" title="'.$txt['sbox_smilie12_text'].'" border="0" />', $content);
$content = str_replace ($txt['sbox_smilie13_code'], '<img src="'.$imgdir.$txt['sbox_smilie13_file'].'" alt="'.$txt['sbox_smilie13_text'].'" title="'.$txt['sbox_smilie13_text'].'" border="0" />', $content);
$content = str_replace ($txt['sbox_smilie14_code'], '<img src="'.$imgdir.$txt['sbox_smilie14_file'].'" alt="'.$txt['sbox_smilie14_text'].'" title="'.$txt['sbox_smilie14_text'].'" border="0" />', $content);
$content = str_replace ($txt['sbox_smilie15_code'], '<img src="'.$imgdir.$txt['sbox_smilie15_file'].'" alt="'.$txt['sbox_smilie15_text'].'" title="'.$txt['sbox_smilie15_text'].'" border="0" />', $content);

// display shouting message and use a different color each second row
if ($count % 2)
echo '
<div class="OddLine">';
else
echo '
<div class="EvenLine">';
if ($context['user']['is_admin'])
echo '<a title="'.$txt['sbox_KillShout'].'" class="Kill" onclick="return killYesNo();" href="sboxDB.php?action=kill&kill='.$row['id'].'">[X]</a>';

echo '[&nbsp;'.$date.'&nbsp;]&nbsp;<b>&lt;'.$name.'&gt;</b>&nbsp;'.$content.'</div>';
}

    echo '
</body>
</html>';
}
?>
                                                                                                                                                                                                                     

shela

Hi.

I have two little problems with shout.
It's workinf fine, but i have problem with charset. I'm not using english charset which is set to iso-8859-1 but iso-8859-2 ... i've tried to change it in many ways but i still have uglu characters in my shout ...

Second problem isn't something special ... as far as i know in my admin panel should be something to menage this shuotbox ... i can't see it on my panel with my lang set, i can't even see it on default english set ..

i hope it's easy to fix :P

talktechno

Hey all  8)

I installed the shout box the other day and its working perfectly on the index page but when i click on one of the sub forums it looks like this:

hxxp:muslimessenger.com/forums/index.php/board,5.0.html [nonactive]

It has the whole page inside the Shoutbox  :o

any help will be appreciated  >:(

cdonon

Hello....


I installed SMF 1.1RC2 on
Joomla v1.0.8 using a
Bridge by JoomlaHacks


Everything seems to be working great except the SMF Shoutbox

It works here...
hxxp:www.showtimeweb.com/finalforum/index.php [nonactive]

But not here and this is where I need it to be...
hxxp:www.showtimeweb.com/finalsite/index.php?option=com_smf&Itemid=26 [nonactive]


and how do I change the header from "SMF Shoutbox" to what I want?

Please give me a solution to these problems

Thanks a bunch

ballboff

Sorry to open up an old thread, but I just have one question.  How do I change the name of the shout box to something of my own liking, something other than smf shoutbox?

liquidscythe

Ok I run the sbox_setup.php file and i install it but i see NOTHING ON MY ******ING FORUM(im kinda pissed ive bee messin with this for a week lol). I'm running the default green theme. And do i just put the sbox files in the root directory or the themes? I've put them in both just incase but i see nothing. Please help,

LS

tapirul

I've installed smf shoutbox on a test-forum and it seems to be working fine, but there are some settings I wish they were implemented
- posibility to set "how many shouts visible" based on a time variable (let's say days), along with the existing setting (number of lines). That is, "shouts older than x days are pruned"
- when an admin/moderator/user deletes a shout, a text will replace the deleted shout (like in phpbb shoutbox, something like "admin:deleted").
- possibility to open the shoutbox in a separate window/tab (in phpbb shoutbox this happens when you click on "shoutbox")

Thanks

PostThis

Quote from: Soniceffect on May 28, 2006, 07:02:23 AM
Have a problem on getting this to work with a different skin. I`ve done  the modifications that you suggested and the shoutbox seems to work without a problem. Apart from there are no smilies showing. They work fine on the default skin, but not on the skin I`m using. Also don`t know if this helps, but when I went to view source in explorer, it seems to be pointing to the dir of them, but not an actually image.

Hope someone can help :)

I believe I can help you with that, as I ran into the same issue. It's an easy fix though.

Unpack the smilies from the mod package, add a "moods" folder to the image directory of the theme that you ported the Shoutbox to, then copy the smileys into the "moods" folder.

Let me know if that fixes it for you.  :)

onijin

Quote from: kriskd on May 25, 2006, 09:29:51 AM
I noticed that "Thursday" is spelled wrong in my SMF shoutbox.  Where in the code can I correct this?

I'd like to know that as well~  ^_^

GreenToes

I installed this shout box and got this error.
My site is now down and will not let me access it.
What the heck?

Fatal error: Cannot redeclare sbox() (previously declared in /home/chatfest/public_html/Sources/Subs.php:3351) in /home/chatfest/public_html/Sources/Subs.php on line 3364

Deep

#119
Quote from: kriskd
And here's a sample error from my error log.  Can anyone assist me with this?


Apply Filter: Only show the error messages of this URL  http://www.sprechereast.com/forum/index.php
Apply Filter: Only show the errors with the same message
8: Undefined index: sbox_smilie15_code
File: /home/.cutiekins/sprechereast/sprechereast.com/forum/Themes/default/sbox.template.php (eval?)
Line: 66


Hi kriskd,

I am sorry for not having been able to read your question earlier, because the solution seems to be very simple. The problem is that in your file Modifications.english.php (or Modifications.german.php if you use your forum in german language) some or all shoutbox text definitions has been deleted.

In that file just insert at any place you want the following code:

//SMF Shoutbox
$txt['sbox_ModTitle'] = 'SMF Shoutbox';
$txt['sbox_Visible'] = 'Shoutbox is visible';
$txt['sbox_GuestAllowed'] = 'Guests are allowed to shout';
$txt['sbox_MaxLines'] = 'Maximum number of displayed lines';
$txt['sbox_Height'] = 'Shoutbox height';
$txt['sbox_SmiliesVisible'] = 'Smilie window is visible';
$txt['sbox_smilie01_text'] = 'blblbl!';
$txt['sbox_smilie02_text'] = 'grinning';
$txt['sbox_smilie03_text'] = 'laughing';
$txt['sbox_smilie04_text'] = 'kissing';
$txt['sbox_smilie05_text'] = 'smiling';
$txt['sbox_smilie06_text'] = 'that´s okay!';
$txt['sbox_smilie07_text'] = 'smoking';
$txt['sbox_smilie08_text'] = 'greeting';
$txt['sbox_smilie09_text'] = 'cheerio!';
$txt['sbox_smilie10_text'] = 'oops';
$txt['sbox_smilie11_text'] = 'praying';
$txt['sbox_smilie12_text'] = 'crying';
$txt['sbox_smilie13_text'] = 'angry';
$txt['sbox_smilie14_text'] = 'baaaaaad';
$txt['sbox_smilie15_text'] = 'headbanging';
$txt['sbox_smilie01_code'] = ':frech:';
$txt['sbox_smilie02_code'] = ';-)';
$txt['sbox_smilie03_code'] = ':-]';
$txt['sbox_smilie04_code'] = ':-s';
$txt['sbox_smilie05_code'] = ':-)';
$txt['sbox_smilie06_code'] = ':-!';
$txt['sbox_smilie07_code'] = ':smoking:';
$txt['sbox_smilie08_code'] = ':greeting:';
$txt['sbox_smilie09_code'] = ':cheerio:';
$txt['sbox_smilie10_code'] = ':-O';
$txt['sbox_smilie11_code'] = ':praying:';
$txt['sbox_smilie12_code'] = ':crying:';
$txt['sbox_smilie13_code'] = ':-(';
$txt['sbox_smilie14_code'] = ':bad:';
$txt['sbox_smilie15_code'] = ':bang:';
$txt['sbox_smilie01_file'] = 'sbox_funny.gif';
$txt['sbox_smilie02_file'] = 'sbox_grin.gif';
$txt['sbox_smilie03_file'] = 'sbox_laugh.gif';
$txt['sbox_smilie04_file'] = 'sbox_kiss.gif';
$txt['sbox_smilie05_file'] = 'sbox_smile.gif';
$txt['sbox_smilie06_file'] = 'sbox_yeah.gif';
$txt['sbox_smilie07_file'] = 'sbox_smoke.gif';
$txt['sbox_smilie08_file'] = 'sbox_hand.gif';
$txt['sbox_smilie09_file'] = 'sbox_cheerio.gif';
$txt['sbox_smilie10_file'] = 'sbox_oops.gif';
$txt['sbox_smilie11_file'] = 'sbox_church.gif';
$txt['sbox_smilie12_file'] = 'sbox_cry.gif';
$txt['sbox_smilie13_file'] = 'sbox_angry.gif';
$txt['sbox_smilie14_file'] = 'sbox_bad.gif';
$txt['sbox_smilie15_file'] = 'sbox_bang.gif';
$txt['sbox_Monday'] = 'Monday';
$txt['sbox_Tuesday'] = 'Tuesday';
$txt['sbox_Wednesday'] = 'Wednesday';
$txt['sbox_Thurday'] = 'Thurday';
$txt['sbox_Friday'] = 'Friday';
$txt['sbox_Saturday'] = 'Saturday';
$txt['sbox_Sunday'] = 'Sunday';
$txt['sbox_KillShout'] = 'Dou you want to kill this shout?';
$txt['sbox_TextSize1'] = '1. Font size';
$txt['sbox_TextColor1'] = '1. Font color';
$txt['sbox_TextSize2'] = '2. Font size';
$txt['sbox_TextColor2'] = '2. Font color';
$txt['sbox_RefreshTime'] = 'Refresh time';
$txt['sbox_BackgroundColor'] = 'Background color';
$txt['sbox_FontFamily1'] = '1. Font family';
$txt['sbox_FontFamily2'] = '2. Font family';


But please have a look at the file before you modify it, because it is important that you only insert the missing lines. You might get an error if there are multiple identical lines.


Quote from: squirrelof09
If a user is on the ban list they shall not be able to shout.

Edit: do you think it is possable to limit the maximum size in submitted Images in the shout box?

or have a page in Features in Options that lets you disable certain bbc code?

I am really sorry. I don´t have the time to program this. But please feel free to modify the shoutbox in any way you want.


Quote from: kriskd
Another question now that I have this working on my site once again.  Is there a way to turn off the refresh completely?

Yes. To turn off the automatic refresh please remove the follwing line from sboxDB.php:


<meta http-equiv="refresh" content="'.$modSettings['sbox_RefreshTime'].';URL=sboxDB.php">



Quote from: BeEbAcK
Notice: Undefined index: sbox_smilie01_file in /home/www/forum/Sources/Load.php(1656) : eval()'d code on line 44

As descibed above in the case of kriskd your Modifications.english.php (or Modifications.german.php) may be corrupted. Please insert the above described lines in that file, if the lines are missing.

If you use your forum not in english or german you have to modify the file Modifications.yourlanguage.php.


Quote from: kriskd
I noticed that "Thursday" is spelled wrong in my SMF shoutbox.  Where in the code can I correct this?

Please replace in Modifications.english.php the follwing code

$txt['sbox_Thurday'] = 'Thurday';

with

$txt['sbox_Thurday'] = 'Thursday';


Quote from: mass
can we add more smiles to it?

To add a smilie you have to do the following steps (this example shows you how to add smilie number 16 which has the smilie code ":XYZ:" and the smilie image file "smilie16.gif":

1. Upload the smilie image (smilie16.gif) to $themedir/images (image directory inside the themes directory)

2. In Modifications.english.php you have to add the following lines:

$txt['sbox_smilie16_text'] = 'This is XYZ';
$txt['sbox_smilie16_code'] = ':XYZ:';
$txt['sbox_smilie16_file'] = 'smilie16.gif';


3. In sboxDB.php you have to replace

$content = str_replace ($txt['sbox_smilie15_code'], '<img src="'.$imgdir.$txt['sbox_smilie15_file'].'" alt="'.$txt['sbox_smilie15_text'].'" title="'.$txt['sbox_smilie15_text'].'" border="0" />', $content);

with

$content = str_replace ($txt['sbox_smilie15_code'], '<img src="'.$imgdir.$txt['sbox_smilie15_file'].'" alt="'.$txt['sbox_smilie15_text'].'" title="'.$txt['sbox_smilie15_text'].'" border="0" />', $content);
$content = str_replace ($txt['sbox_smilie16_code'], '<img src="'.$imgdir.$txt['sbox_smilie16_file'].'" alt="'.$txt['sbox_smilie16_text'].'" title="'.$txt['sbox_smilie16_text'].'" border="0" />', $content);


4. In sbox.template.php you have to add after the following code

<tr class="headerbodies">
  <td align="center"><img src="'.$imgdir.$txt['sbox_smilie13_file'].'" alt="'.$txt['sbox_smilie13_text'].'" title="'.$txt['sbox_smilie13_text'].'" border="0" onclick="insertSmilie(\''.$txt['sbox_smilie13_code'].'\')" onmouseover="this.style.cursor=\'hand\';" /></td>
  <td align="center"><img src="'.$imgdir.$txt['sbox_smilie14_file'].'" alt="'.$txt['sbox_smilie14_text'].'" title="'.$txt['sbox_smilie14_text'].'" border="0" onclick="insertSmilie(\''.$txt['sbox_smilie14_code'].'\')" onmouseover="this.style.cursor=\'hand\';" /></td>
  <td align="center"><img src="'.$imgdir.$txt['sbox_smilie15_file'].'" alt="'.$txt['sbox_smilie15_text'].'" title="'.$txt['sbox_smilie15_text'].'" border="0" onclick="insertSmilie(\''.$txt['sbox_smilie15_code'].'\')" onmouseover="this.style.cursor=\'hand\';" /></td>
</tr>

this code

<tr class="headerbodies">
  <td align="center"><img src="'.$imgdir.$txt['sbox_smilie16_file'].'" alt="'.$txt['sbox_smilie16_text'].'" title="'.$txt['sbox_smilie16_text'].'" border="0" onclick="insertSmilie(\''.$txt['sbox_smilie16_code'].'\')" onmouseover="this.style.cursor=\'hand\';" /></td>
  <td align="center">&nbsp;</td>
  <td align="center">&nbsp;</td>
</tr>



Quote from: Soniceffect
Have a problem on getting this to work with a different skin. I`ve done  the modifications that you suggested and the shoutbox seems to work without a problem. Apart from there are no smilies showing. They work fine on the default skin, but not on the skin I`m using. Also don`t know if this helps, but when I went to view source in explorer, it seems to be pointing to the dir of them, but not an actually image.

The smilie images are installed in $themedir/images (image directory inside the themes directory).
Please copy the smilie images from that directory into the images directory of that theme you want to use.


Quote from: KingOfMyWorld
After installation of the shoutbox mod, I go to the default theme and this is what appears inside the shoutbox. Anyway to make it go away and get the shoutbox working? My members don't care much for the mkportal's shoutbox and would like this one so any help would be much appreciated.


Please replace the very first line

<?

with

<?php



Quote from: shela
It's workinf fine, but i have problem with charset. I'm not using english charset which is set to iso-8859-1 but iso-8859-2 ... i've tried to change it in many ways but i still have uglu characters in my shout ...

I am sorry, but i am not experienced with character sets. This may be a general SMF issue.
Can somebody help?

Quote from: shela
Second problem isn't something special ... as far as i know in my admin panel should be something to menage this shuotbox ... i can't see it on my panel with my lang set, i can't even see it on default english set ..

Yeah, in the admin panel, at Configuration->Features and Options there should be a link "SMF SHOUTBOX" between "LAYOUT AND OPTIONS" and "KARMA" - but only if you use the forum in english (or german if you have installed the optional german language pack of the shoutbox).
Did you find it?


Quote from: talktechno
Hey all 

I installed the shout box the other day and its working perfectly on the index page but when i click on one of the sub forums it looks like this:

http://muslimessenger.com/forums/index.php/board,5.0.html

It has the whole page inside the Shoutbox

I looked at you forum, but i could not find a shoutbox there.
However, if the whole forum page (i think, this is what you mean, right?) appear inside the shoutbox it indicates that there has been an error somewhere. Do you see an error message inside this forum page? Do you find an error in your forum error log?


Quote from: cdonon
It works here...
http://www.showtimeweb.com/finalforum/index.php

But not here and this is where I need it to be...
http://www.showtimeweb.com/finalsite/index.php?option=com_smf&Itemid=26


and how do I change the header from "SMF Shoutbox" to what I want?

I did not find a shoutbox on both links.
However, the shoutbox is installed in the default theme of SMF. The Forum on your second link uses another theme, so you have to modify the theme which you are using.
The way how to do that is described somewhere in this thread - and on the download page of the SMF shoutbox.

You can modify the header by modifying Modifications.english.php. In that file look for:

$txt['sbox_ModTitle'] = 'SMF Shoutbox';

For example you can replace it with

$txt['sbox_ModTitle'] = 'My very private shoutbox';



Quote from: ballboff
How do I change the name of the shout box to something of my own liking, something other than smf shoutbox?

As described just above.


Quote from: tapirul
I've installed smf shoutbox on a test-forum and it seems to be working fine, but there are some settings I wish they were implemented
- posibility to set "how many shouts visible" based on a time variable (let's say days), along with the existing setting (number of lines). That is, "shouts older than x days are pruned"
- when an admin/moderator/user deletes a shout, a text will replace the deleted shout (like in phpbb shoutbox, something like "admin:deleted").
- possibility to open the shoutbox in a separate window/tab (in phpbb shoutbox this happens when you click on "shoutbox")

I am really sorry. I don´t have the time to program this. But please feel free to modify the shoutbox in any way you want.

Quote from: onijin
Quote from: kriskd
I noticed that "Thursday" is spelled wrong in my SMF shoutbox.  Where in the code can I correct this?
I'd like to know that as well~  ^_^

Your question is answered somewhere above.


Quote from: GreenToes
Fatal error: Cannot redeclare sbox() (previously declared in /home/chatfest/public_html/Sources/Subs.php:3351) in /home/chatfest/public_html/Sources/Subs.php on line 3364

This error indicates that you have installed the shoutbox twice.
Please have a look at here.


I hope i could help.
By the way, those people who prefer german support should look here

Deep

Advertisement: