TinyPortal
Development => Support => Topic started by: Sakuragi on October 11, 2005, 12:56:38 AM
I want to show this page (http://www.tinyportal.net/smf/index.php?action=tpmod&sub=shoutbox) of ShoutBox! on my Board as for the MOD ultimate shoutbox, that will work if I put this code in BoardIndex.template.php ??
echo '<div class="tborder"><table style="margin-bottom: 2px; table-layout: fixed;" class="windowbg" cellpadding="20" cellspacing="0" border="0" width="100%">
<tr><td><div style="width: 100%;"><td class="catbg" colspan="2">', $context['TPortal']['shoutbox'], '
</div></td></tr></table><div class="windowbg2" style="padding-top: 10px;"><form style="margin-top: 8px; text-align: center;" name="tp-shoutbox" action="'.$scripturl.'?action=tpmod&id=shout" method="post">
';
if(($context['TPortal']['guest_shout']) || (!$context['TPortal']['guest_shout'] && !$context['user']['is_guest']))
echo '<textarea name="tp-shout" style="width: 50%; height: 50px;" type="text"></textarea><br /><input style="margin-top: 4px;" class="smalltext" type="submit" name="shout_send" value="'.$txt['shout!'].'">';
if($context['user']['is_guest'] && $context['TPortal']['guest_shout'])
echo '<br /><input style="margin-top: 4px;" size="20" type="text" name="tp-shout-name" value="'.$txt['tp-guest'].'">';
else
echo '<input type="hidden" name="tp-shout-name" value="'.$context['user']['name'].'">';
echo '<input name="tp-shout-url" type="hidden" value="'.$tp_where.'">
</form></div></div>';
Where do you want to put it on your forum? If you want it to be on the main page you'll want to put it in the index.template.php
Code looks ok to me. If you want it on the forum then I think Boardindex.template.php is right.
No way to find out other than to actually try it. :)
Sorry for digging up this thread again... I have a question: How would it be possible to show the shoutbox on the main site? I mean, I'm using tinyportal just for my forum... but I have a main page (simply div-style) so, is it possible to add the tinyportal shoutbox to the main site? I tried it with an iframe linking to the shoutbox, but it showed me the whole tinyportal :'( I only want the shoutbox to display...
http://www.tinyportal.net/smf/index.php?topic=1610.msg13220#msg13220
Oh sorry, didn't see that. Thank you so much :D