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

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 196,021
  • Total Topics: 21,332
  • Online today: 744
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 291
  • Total: 291

Custom Recent Topics Block Help

Started by homo512, May 07, 2008, 12:50:32 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

homo512

Ok so I currently added this new SSI function to my forum:

http://www.tinyportal.net/index.php?topic=1234.msg105411#msg105411

I was wondering if anybody could rewrite it so that it only shows the topic title and nothing else?

Please and thank you.

JPDeni

Change


foreach ($posts as $post)
echo '
<tr>
<td align="right" valign="top" nowrap="nowrap">
[', $post['board']['link'], ']
</td>
<td valign="top">
<a href="', $post['href'], '">', $post['subject'], '</a>
', $txt[525], ' ', $post['poster']['link'], '
', $post['new'] ? '' : '<a href="' . $scripturl . '?topic=' . $post['topic'] . '.msg' . $post['new_from'] . ';topicseen#new"><img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/new.gif" alt="' . $txt[302] . '" border="0" /></a>', '
</td>
<td align="right" nowrap="nowrap">
', $post['time'], '
</td>
</tr>';


to


foreach ($posts as $post)
echo '
<tr>
<td valign="top">
<a href="', $post['href'], '">', $post['subject'], '</a>
</td>
</tr>';

homo512

Do I change this in the SSI.php?  If so... it didn't work :-\

JPDeni

Oh. I only looked at the first bit of code didn't realize there were two.

I'm assuming that your block starts with

$result=ssi_recentTopics_Include(10,array(9),'return');


The important part of that is

'return'


If that's what you've got, then change:


foreach($result as $my){
  echo "$bullet";
  echo '<span class="smalltext">'.$my['link'];
  // is this topic new? (assume they are logged in)
if (!$my['new'] && $context['user']['is_logged'])
echo '
                                                <a href="', $scripturl, '?topic=', $my['topic'], '.from', $my['newtime'], '#new"><img src="', $settings['images_url'], '/', $context['user']['language'], '/new.gif" alt="', $txt[302], '" border="0" /></a>';
echo '
';
}
echo '</span>';


to


foreach($result as $my){
  echo "$bullet";
  echo '<span class="smalltext">'.$my['link'].'</span>';
}

homo512

#4
Hey thanks a lot but they ended up like this:



How do I get them to be lined up like vertically like this:


  • Item 1
  • Item 2
  • Item 3
  • Item 4

JPDeni


This website is proudly hosted on Crocweb Cloud Website Hosting.