TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,973
  • Latest: NonStop
Stats
  • Total Posts: 196,231
  • Total Topics: 21,353
  • Online today: 651
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 1
  • Guests: 176
  • Total: 177
  • lurkalot

Can I get the shoutbox to appear on other areas of my site?

Started by General_Sun, July 14, 2007, 06:59:20 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

General_Sun

Can I get the shoutbox to appear on other areas of my site?

I want to get it on my forum page without being in a side block.

IchBin

You should be able to just call the function if TP is loaded on the page you're putting it in.

echo TPortal_shoutbox();

General_Sun

Hi, umm, I'm not quit sure how to do this, well my code looks like this:

                  echo'<table><tr><td>TPortal_shoutbox()</td></tr></table>';

That would probably be incorrect?

G6Cad


General_Sun

Thanks, but I think I best paste the whole code here.

This is in the SMF Info Center...

// Show lots of posts.
elseif (!empty($context['latest_posts']))
{
echo '
<table cellpadding="0" cellspacing="0" width="50%" border="0">';

/* Each post in latest_posts has:
board (with an id, name, and link.), topic (the topic's id.), poster (with id, name, and link.),
subject, short_subject (shortened with...), time, link, and href. */
foreach ($context['latest_posts'] as $post)
echo '
<tr>
<td class="middletext" align="center" valign="top"><b>', $post['link'], '</b> <br>', $txt[525], ' ', $post['poster']['link'], ' (', $post['board']['link'], ')</td>
</tr>
';
echo '
</table>';
}
echo '
</td>
</tr>';
}


Now what I want it to be is kind of like this....


// Show lots of posts.
elseif (!empty($context['latest_posts']))
{
echo '
<table cellpadding="0" cellspacing="0" width="50%" border="0">';

/* Each post in latest_posts has:
board (with an id, name, and link.), topic (the topic's id.), poster (with id, name, and link.),
subject, short_subject (shortened with...), time, link, and href. */
foreach ($context['latest_posts'] as $post)
echo '
<tr>
<td class="middletext" align="center" valign="top"><b>', $post['link'], '</b> <br>', $txt[525], ' ', $post['poster']['link'], ' (', $post['board']['link'], ')</td>
</tr>
';
</table><table><tr>echo TPortal_shoutbox();<td></td></tr></table>';
}
echo '
</td>
</tr>';
}


That obviously doesn't work, could someone help and put the shoutbox in for me at the correct location? Thanks!

tick

What kind of result does that give you. DOes it do anything at all?

G6Cad

Add a center block and choose the shoutbox, why complicate things when they are built in to just fetch with a few clicks ?

General_Sun

That gives an error, the correct form of that would be :

// Show lots of posts.
elseif (!empty($context['latest_posts']))
{
echo '
<table cellpadding="0" cellspacing="0" width="50%" border="0">';

/* Each post in latest_posts has:
board (with an id, name, and link.), topic (the topic's id.), poster (with id, name, and link.),
subject, short_subject (shortened with...), time, link, and href. */
foreach ($context['latest_posts'] as $post)
echo '
<tr>
<td class="middletext" align="center" valign="top"><b>', $post['link'], '</b> <br>', $txt[525], ' ', $post['poster']['link'], ' (', $post['board']['link'], ')</td>
</tr>
';
echo '
</table><table><tr>echo TPortal_shoutbox();<td></td></tr></table>';
}
echo '
</td>
</tr>';
}


And that just displays the text echo TPortal_shoutbox();

Putting it in a center block would put it below the fold....

tick

I am playing with it.  I am not a coder by any means but I am trying to get it to work.


This website is proudly hosted on Crocweb Cloud Website Hosting.