News:

Wondering if this will always be free?  See why free is better.

Main Menu

Ultimate Shoutbox

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

Previous topic - Next topic

Webby

Nope, it doesn't work............

Ravey76

 mine doesn't work, too ...

I just installed "Ultimate Shoutbox"; everything worked fine - but no changes. Cannot find this "Shout"-button.
Had a look in Admin area. There's a new tab underneath tab "Karma", but it is absolutely blank. Some checkboxes and fields, but no text.

Maybe this problem occurs because I am using german language for my board?

Kind regards,
Ravey76

Jerry

you need to add '.smfshout().' to your BoardIndex.template.php file ;)


- Jerry
Find me on:
Facebook
Twitter
PlanetSMF

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

Ravey76

Hello Jerry,

thank you for your quick reply.

Can you tell me where to place exactly this '.smfshout().'  ?  Is this a button?

Thanks in advance,
Ravey76

Webby

Ravey76, you have to put that code :

smfshout()

somewhere in your template. You decide yourself where you want it.....

And, it works for me, I was talking about the [ img] tags, so don't say it doesn't work for you either, ok ?

Grudge

Ravey76,

Because you are using German you need to open English.modifications.php and copy and paste all the language entries to do with the shoutbox into German.modifications.php
I'm only a half geek really...

Grudge

Webby, Apologies, the line with str_replace on should be:

$message = preg_replace('~\[img.*?\].+?\[/img\]~is', '', $_POST['message']);


Sorry it took so long to get a working reply!
I'm only a half geek really...

Webby

Well, it works and that is what counts !  Thanx again.

Now for another challenge : would it be possible to make it so that you can use another smileyset ?  I mean, the smileys are too big actually for the shoutbox, so I thought it would be fun if you could use very small smileys.  It would take a lot of coding wouldn't it ;) ?

Ravey76

#68
@ Grudge:

Yes, now that point works. I added the stuff from English.modifications.php to the egrman one and now the Shoutbox-settings appear in admin area.

about that code-stuff Jerry mentioned ... still trying and going crazy.
It works ... somehow ... but still need to figure out where's the best place to put it in ...

Ravey

Grudge

Webby, this is a bodge but after this:

$row['message'] = doUBBC($row['message']);


Add:

$row['message'] = preg_replace('~/' . $user_info['smiley_set'] . '/~is', '/shoutsmiley/', $row['message']);

Then create a new smiley set and call it "shoutsmiley", hopefully the code is obvious enough to see what it's doing?

Ravey76, once you have the shoutbox appearing you've done the hard bit, now you just need to decide how you want your HTML to fit around it. There are lots of examples of integrations on peoples sites you can steal. My site (www.p0stwh0res.com/smf) has one such example, look at the source to get some HTML ideas
I'm only a half geek really...

JayBachatero

Hello.  i tried editing the shout.template.php script to make the shout show in 2 columns.  i want on the left the marquee window and on da right the fields to post.  this is the code i have but wen i upload it it says parse error.  can any one help me fix this?

<?php

function template_shout_archive()
{
global $context$settings$options$txt$user_info$scripturl$modSettings;

echo '
<table border="0" cellspacing="0" cellpadding="4" align="center" width="100%">
<tr>
<td class="catbg" align="center">'
$txt['shoutbox_1'], '</td>
</tr><tr>
<td class="titlebg" align="left">'
$context['page_index'], '</td>
</tr><tr>
<td class="windowbg">'
;
foreach ($context['arc_shouts'] as $shout)
{
if ($context['canDelete'])
echo '
<a href="'
$scripturl'?action=delete_shout;id='$shout['id'], '"><img src="'$settings['images_url'], '/deleteshout.gif" border="0" alt="X"></a>';
if (empty($shout['email']))
echo '
<span class="smtxt">'
$shout['time'], '</span> - <a href="'$scripturl'?action=profile;u='$shout['memberID'], '">'$shout['displayname'], '</a> -' $shout['message'] . $modSettings['shoutsep'];
// Guest?
else
echo '
<span class="smtxt">'
$shout['time'], '</span> - <a href="mailto:'$shout['email'], '">'$shout['displayname'], '</a> -' $shout['message'] . $modSettings['shoutsep'];
}
echo '
<center>'
;

if ($modSettings['enablearchiveshout'] == && $context['canPost'])
template_shout_form();

echo '
</center>
</td>
</tr>
</table>'
;

// Pull the delete options for the administrator
if ($context['canDelete'])
echo '
<table border="0" cellspacing="1" cellpadding="4" align="center" width="100%">
<tr>
<td class="catbg" align="center" colspan="2">'
$txt['shoutbox_42'], '
</td>
</tr>
<tr>
<td class="windowbg2" valign="top" width="50%">
<form action="'
$scripturl'?action=delete_shout_age" method="post">'$txt['shoutbox_2'], '
<input type="text" name="age" id="age" value="25" size="4" /> '
$txt['shoutbox_3'], '
</td>
<td class="windowbg2" valign="top">
<input type="submit" name="submit" value="'
$txt['shoutbox_5'], '" />
</form><br />
</td>
</tr><tr>
<td class="windowbg2" valign="top" width="50%">
<form action="'
$scripturl'?action=delete_all_shouts" method="post">'$txt['shoutbox_4'], ' '$modSettings['shoutlimit'], '
</td>
<td class="windowbg2" valign="top">
<input type="submit" name="submit" value="'
$txt['shoutbox_5'], '" />
</form>
</td>
</tr>
</table>'
;
}

function 
template_shout_box()
{
global $context$settings$options$txt$user_info$scripturl$modSettings;

echo '
<center>'
;
// Scrolling?
if ($modSettings['enablescrollshout'] == 1)
echo '
<marquee direction="'
$modSettings['shoutscrolldir'], '" width="'$modSettings['shoutscrollwidth'], '" 
height="'
$modSettings['shoutscrollheight'], '" scrollamount="'$modSettings['shoutscrollspeed'], '" 
scrolldelay="'
$modSettings['shoutscrolldelay'], '" onmouseover="this.stop()" onmouseout="this.start()">';

// Loop through the shouts!
foreach ($context['shouts'] as $shout)
{
// If it's an admin - they get the delete button...
if ($context['canDelete'])
echo '
<a href="'
$scripturl'?action=delete_shout;id='$shout['id'], '"><img src="'$settings['images_url'], '/deleteshout.gif" border="0" alt="X"></a>';
echo '
<span class="smtxt">'
$shout['time'], '</span> <a href="', ($shout['email'] == '' $scripturl '?action=profile;u=' $shout['memberID'] : 'mailto:' $shout['email']), '">'$shout['displayname'], '</a> -'$shout['message'] . $modSettings['shoutsep'];

}

// End the marquee?
if ($modSettings['enablescrollshout'] == 1)
echo '
</marquee>'
;</td>
            <td>
echo '
<center>
<p><a href="'
$scripturl'?action=shout_archive">'$txt['shoutbox_43'], '</a></p>
</p>
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td>'
;
}

function 
template_shout_form()
{
global $context$settings$options$txt$user_info$scripturl$modSettings$ID_MEMBER;

echo '
<center>
<form action="'
$scripturl'?action=shout" method="post">
<input type="hidden" value="'
$context['qstr'], '" name="qstr" />
<input type="hidden" value="" name="email" />'
;

if ($user_info['is_guest'])
echo '
<input type="hidden" value="0" name="memberID" />
<input type="text" value="'
$txt['shoutbox_6'], '" name="displayname" maxlength="100" onfocus="this.value=\'\'" /><br />
<input type="text" value="'
$txt['shoutbox_7'], '" name="email" maxlength="100" onfocus="this.value=\'\'" /><br />';
else
echo '
<input type="hidden" value="'
$user_info['name'], '" name="displayname" />
<input type="hidden" value="'
$ID_MEMBER'" name="memberID" />';

echo '
<input type="text" value="'
$txt['shoutbox_8'], '" name="message" size="16" maxlength="100" onfocus="this.value=\'\'" /><br />
<input type="submit" name="submit" value="'
$txt['shoutbox_9'], '" />
</form>
</center></td>
          </tr>
        </table>'
;

}
?>

Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

Webby

Wow, that works perfectly !  Great, and thanx for you quick reply ;)

JayBachatero

Is there a way to make the shout autorefresh every how many seconds?
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

Jerry

you would have to make your whole page refresh, just add a meta refresh to your index.template.php with the meta tags. . .


- Jerry
Find me on:
Facebook
Twitter
PlanetSMF

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

JayBachatero

Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

Perti

#75
what I'm doing wrong ???, I have installed mod and now when I put ', smfshout(), ' in index.templates.php that template stops working

Webby

You only use :

smfshout()

I guess ?  Without a comma and such ?

Perti

so if I want to put shoutbox right side of my board, what I must put to index.template.php besides smfshout()?

Webby

You will have to work with tables ......

Jerry

I had tried ',smfshout(),' but in the end I had to use '.smfshout().'

@perti, you will have to edit the boardindex.template.php


- Jerry
Find me on:
Facebook
Twitter
PlanetSMF

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

Advertisement: