SimplePortal

Support => English Support => Topic started by: PokemonS on June 01, 2015, 12:23:09 AM

Title: Display shoutbox history on a page
Post by: PokemonS on June 01, 2015, 12:23:09 AM
SMF 2.0.10
SP 2.3.6

Hi

I can display a standalone shoutbox page by using this code + require SSI.php:

Code: [Select]
$block = current(getBlockInfo(false, 15, false, false));
template_block($block);

But how to display shoutbox history?

Thanks!
Title: Re: Display shoutbox history on a page
Post by: ♦ Ninja ZX-10RR ♦ on June 01, 2015, 08:59:14 AM
Not exactly what you want but there is some basic page of that already built-in, have a look at this post, which is highly unrelated, but posts a link very similar to the one you should have on your own forum :)
Title: Re: Display shoutbox history on a page
Post by: PokemonS on June 02, 2015, 12:52:11 AM
Not exactly what you want but there is some basic page of that already built-in, have a look at this post, which is highly unrelated, but posts a link very similar to the one you should have on your own forum :)

I cannot see your "have a look at this post" link. :p
Title: Re: Display shoutbox history on a page
Post by: ccbtimewiz on June 02, 2015, 01:23:25 AM
Try this;

Code: [Select]
echo '
<div class="shoutbox_info">
<div id="shoutbox_load_15" style="float: right; display: none;"><img src="', $settings['sp_images_url'], '/loading.gif" alt="" /></div>
<a href="', $scripturl, '?action=portal;sa=shoutbox;shoutbox_id=', $shoutbox['id'], '" onclick="sp_refresh_shout(', $shoutbox['id'], ', last_refresh_', $shoutbox['id'], '); return false;">', sp_embed_image('refresh'), '</a> <a href="', $scripturl, '?action=portal;sa=shoutbox;shoutbox_id=', $shoutbox['id'], '">', sp_embed_image('history'), '</a>';

$block = current(getBlockInfo(false, 15, false, false));
template_block($block);

echo '
</div>
</div>';
Title: Re: Display shoutbox history on a page
Post by: PokemonS on June 02, 2015, 03:01:52 AM
Try this;

Code: [Select]
echo '
<div class="shoutbox_info">
<div id="shoutbox_load_15" style="float: right; display: none;"><img src="', $settings['sp_images_url'], '/loading.gif" alt="" /></div>
<a href="', $scripturl, '?action=portal;sa=shoutbox;shoutbox_id=', $shoutbox['id'], '" onclick="sp_refresh_shout(', $shoutbox['id'], ', last_refresh_', $shoutbox['id'], '); return false;">', sp_embed_image('refresh'), '</a> <a href="', $scripturl, '?action=portal;sa=shoutbox;shoutbox_id=', $shoutbox['id'], '">', sp_embed_image('history'), '</a>';

$block = current(getBlockInfo(false, 15, false, false));
template_block($block);

echo '
</div>
</div>';

Thanks for your answer.

That's displaying a history icon.
I actually want history shoutbox page without theme enabled.
Title: Re: Display shoutbox history on a page
Post by: ♦ Ninja ZX-10RR ♦ on June 02, 2015, 06:22:12 AM
ugh, sorry, didn't paste it. http://simpleportal.net/index.php?topic=13734.msg67892#msg67892 *embarrassed*
SimplePortal 2.3.8 © 2008-2024, SimplePortal