Ultimate Shoutbox

Started by Grudge, March 28, 2004, 09:11:20 AM

Previous topic - Next topic

Ryan

But still ive used the ssi include...

And this..
<?php
// Shout Box Start
       echo '
', ssi_shout(), '';
?>

And yet im still getting 1000's of error logs! Its killing my mysql datasbase with all the activity!

What shud i do :(

Alisha

Quote from: M3THOD on January 25, 2005, 06:22:54 PM
But still ive used the ssi include...

And this..
<?php
// Shout Box Start
        echo '
', ssi_shout(), '';
?>

And yet im still getting 1000's of error logs! Its killing my mysql datasbase with all the activity!

What shud i do :(


Never have used the SSI_Shout  never heard of it, On my site we use ', smfshout(), ' and works just fine, no errors or anything..  There is NO SSI involved except in that fact that it uses the SSI File.

', smfshout(), '  if you look down a bit, I made a post that came DIRECTLY from my template code.   

Ryan

Nope!

This is taken from the .mod file itself..

<edit file>
ssi_examples.php
</edit file>

<search for>
<h3>Recent Calendar Events Function: &lt;?php ssi_recentEvents(); ?&gt;</h3>
<?php ssi_recentEvents(); ?>

<hr />
</search for>

<add after>
<h3>Shoutbox: &lt;?php ssi_shout(); ?&gt;</h3>
<?php ssi_shout(); ?>

<hr />
</add after>

nk111

#223
Hi there,

i just found a bug regarding the max characters function.
It won't work if you type one single word  without spaces
and a length of more then three times of the maxlength setting.

Or with other words: When you type in one very long word and
have a quite low setting vor the maxlength seting the code will
do a maximum of 2 line breaks.

Example: max characterlength: 20
Break words after: 17

if you now type in a word of about 70 'W's this will happen:

wwwwwwwwwwwwwwwww...
wwwwwwwwwwwwwwwww...
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww



solution:

change (in shout.php)

    while ($mlimit >= $mcounter)
    {
      $wordlength = strlen($message[$mcounter]);
        if ($wordlength > $modSettings['shoutmaxchr'])
        {
          $firsthalf = substr($message[$mcounter], 0, $modSettings['shoutsplitchr']) . '...';
          $secondhalf = substr($message[$mcounter], ($modSettings['shoutsplitchr'] - $wordlength));
          $returned = array_splice($message, $mcounter, 1, array($firsthalf, $secondhalf));
        }
      $mcounter++;
    }


to:

    while ($mlimit >= $mcounter)
    {
      $wordlength = strlen($message[$mcounter]);
        if ($wordlength > $modSettings['shoutmaxchr'])
        {
          $firsthalf = substr($message[$mcounter], 0, $modSettings['shoutsplitchr']) . '...';
          $secondhalf = substr($message[$mcounter], ($modSettings['shoutsplitchr'] - $wordlength));
          $returned = array_splice($message, $mcounter, 1, array($firsthalf, $secondhalf));
          $mlimit = count($message) - 1;
        }
      $mcounter++;
    }


If we add entries to the array then we should set the upper bound
again. right?  ;)

regards
Nico

Alisha

Quote from: M3THOD on January 25, 2005, 06:38:28 PM
Nope!

This is taken from the .mod file itself..

<edit file>
ssi_examples.php
</edit file>

<search for>
<h3>Recent Calendar Events Function: &lt;?php ssi_recentEvents(); ?&gt;</h3>
<?php ssi_recentEvents(); ?>

<hr />
</search for>

<add after>
<h3>Shoutbox: &lt;?php ssi_shout(); ?&gt;</h3>
<?php ssi_shout(); ?>

<hr />
</add after>


Well I dont know, but this is DIRECTLY from my boardindex.template.php file, and mine is working, so I am not sure what exactly is going on then.

        // Shout Box Start
        echo '
<tr>
<td class="catbg" colspan="2">"Shout Outs"</td>
        </tr><tr>
<td class="windowbg2" align="left" colspan="2"><span class="smalltext">', smfshout(), '</span></td>
        </tr>';

// If they are logged in, but SP1 style information is off... show a personal message bar.
        if ($context['user']['is_logged'] && !$settings['show_sp1_info'])
        {
                echo '
        <tr>
                <td class="catbg" colspan="2">', $txt[159], '</td>
        </tr><tr>
                <td class="windowbg" width="20" valign="middle" align="center">
                        <a href="', $scripturl, '?action=pm">
                                <img src="', $settings['images_url'], '/message_sm.gif" alt="', $txt[159], '" border="0" /></a>
                </td>
                <td class="windowbg2" valign="top">
                        <b><a href="', $scripturl, '?action=pm">', $txt[159], '</a></b>
                        <div class="smalltext">
                                ', $txt[660], ' ', $context['user']['messages'], ' ', $context['user']['messages'] == 1 ? $txt[471] : $txt[153], '.... ', $txt[661], ' <a href="', $scripturl, '?action=pm">', $txt[662], '</a> ', $txt[663], '
                        </div>
                </td>
        </tr>';
        }


So maybe ignore the SSI.php and use', smfshout(), ' and see if that eliminates the errors and works for you also.


ryanbsoftware

i tried to install it and kept getting erros about files, after chmodding them to 777 for the package manager to write to them i then got this error, in the white screen of death, lol, like the name?

QuoteFatal error: Cannot redeclare smfshout() (previously declared in /home/chf/public_html/Sources/Subs.php:1822) in /home/chf/public_html/Sources/Subs.php on line 1829

Jerry

in your /Sources/Subs.php find:
function smfshout()
{
global $sourcedir;

include_once("$sourcedir/shout.php");
shout_display();
shout_form();
}

there are two, one right after the other... remove one :)


- Jerry
Find me on:
Facebook
Twitter
PlanetSMF

"If all you look for is the negative in things, you will never see the positive."

ryanbsoftware

#227
Quote from: Jerry on January 28, 2005, 07:33:21 PM
in your /Sources/Subs.php find:
function smfshout()
{
global $sourcedir;

include_once("$sourcedir/shout.php");
shout_display();
shout_form();
}

there are two, one right after the other... remove one :)

ok thanks

perhaps the package should be updated, i got it from the smf package server. ;)

edit: ok no erros, but no shoutbox...

RedAlert2

i just uploaded it and everything and it said that: 
Fatal error: Cannot redeclare smfshout() (previously declared in /home/csidog/public_html/forum/Sources/Subs.php:1849) in /home/csidog/public_html/forum/Sources/Subs.php on line 1856

i can't even view the forums, can someone help??

Jerry

RedAlert2 please read my post, it is right above RyanB's post.


Grudge, guess I wasn't the only one with this problem :-X


- Jerry
Find me on:
Facebook
Twitter
PlanetSMF

"If all you look for is the negative in things, you will never see the positive."

RedAlert2

k, thnx, fixed it, but there isn't a shoutbox......... is there a way to make it show up?

Jerry

again, read back further in this post.. it will tell you how to add the shoutbox to your forums :)


- Jerry
Find me on:
Facebook
Twitter
PlanetSMF

"If all you look for is the negative in things, you will never see the positive."

Anguz

Grudge, about what we talked

<marquee direction="', $modSettings['shoutscrolldir'], '"', (!empty($modSettings['shoutscrollwidth']) ? ' width="' . $modSettings['shoutscrollwidth'] . '"' : ''), (!empty($modSettings['shoutscrollheight']) ? ' height="' . $modSettings['shoutscrollheight'] . '"' : ''), ' scrollamount="', $modSettings['shoutscrollspeed'], '" scrolldelay="', $modSettings['shoutscrolldelay'], '" onmouseover="this.stop()" onmouseout="this.start()">';
Cristián Lávaque http://cristianlavaque.com

Krispl

mod work pefect you can see   at   forum.ocm.pl
thx :)

Grudge

You should only be using ssi_shout() for SSI integration, I don't know how it will work as part of SMF.

I need to find some time to correct a few things with this so people have less problems in the future.
I'm only a half geek really...

olli

#235
Is there a way to refresh the shoutbox without clickin refresh all the time? like when u go into a different section

BabyGz

Is there a way for making guest NOT see the shoutbox at all??..

I only got 2 options in the edit permissions panel.

"Can Shout"
"Remove Shouts"

So..You have to login..Then you will see the shoutbox..

hypnoticpimp

hey! where is the shoutbox? my site is http://nl.he4t.com [nofollow] but where is my shoutbox. it said everything installed correctly. but i dont see it! please help

Alisha

Ya know this thread is here to help you... Please Guys take the time to READ it... 

There must be 50 posts on why your shout box does not show up.  Simple answer, becuse you have not put in the smfshout line into your template. 

Take a few mins and read part of the thread before you post the same thing over and over. 

hypnoticpimp

alisha! Everytime i install the shoutbox! When i click on permissionit gives me errors! This is 1 in particualr "{Fatal error: Cannot redeclare smfshout"() (previously declared in Sources/Subs.php:2025)"

please alisha can you install it for me

Advertisement: