Login  |  Register
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome, Guest. Please login or register.
Did you miss your activation email?

January 31, 2023, 10:30:23 AM

Login with username, password and session length
Members
  • Total Members: 3856
  • Latest: Bixby
Stats
  • Total Posts: 193910
  • Total Topics: 21127
  • Online today: 49
  • Online ever: 3540
  • (September 02, 2022, 06:38:54 PM)
Users Online
Users: 0
Guests: 36
Total: 36

Author Topic: "recent topics" in SMF style  (Read 271417 times)

0 Members and 1 Guest are viewing this topic.

Xarcell

  • Guest
Re: "recent topics" in SMF style
« Reply #590 on: March 30, 2010, 10:33:07 PM »
I see now. Looks like there is an extra <td> when you do that. Let me see if I can replicate the problem. Are you using the code that was last posted by Xarcell?

I see the extra TD too Ich.

Lol, is that TP? is that the one that bikken found awhile back?

I'm still trying to figure out where that background color is coming from though. It doesn't make sense. I'd swear that it's the frame background.

EDIT:
I'm looking at the code right now and it's using "windowbg", the same as the other blocks.
« Last Edit: March 30, 2010, 10:36:53 PM by Xarcell »

ricardo3523

  • Guest
Re: "recent topics" in SMF style
« Reply #591 on: March 31, 2010, 01:54:08 AM »
Thought I'd just let you know, also if I only choose to not display the title, it starts doing a bit odd.

Offline IchBin

  • Friends
  • *
  • Posts: 16231
Re: "recent topics" in SMF style
« Reply #592 on: March 31, 2010, 08:00:08 AM »
Can you try this code to see if it does anything different?
Code: [Select]
global $scripturl, $settings, $txt, $context;

echo '
<div style="width: 50%; float: left;">';

echo '
<table border="0" width="100%" cellspacing="1" cellpadding="4" class="bordercolor">
   <tr><td colspan="3" class="titlebg">Recent topics</td></tr>';
   
$what=ssi_recentTopics(8, array(2), 'array');

        foreach ($what as $topic)
        {
echo '
<tr>
<td class="windowbg" valign="middle">
', $topic['link'];

                // Is this topic new? (assuming they are logged in!)
                if (!$topic['new'] && $context['user']['is_logged'])
                        echo '
                    <a href="', $scripturl, '?topic=', $topic['topic'], '.from', $topic['new_from'], '#new"><img src="', $settings['images_url'], '/', $context['user']['language'], '/new.gif" alt="', $txt[302], '" border="0" /></a>';

                echo '
</td>
<td class="windowbg2" valign="middle" width="20%">
', $topic['poster']['link'], '
</td>
<td class="windowbg2" valign="middle" width="35%">';
                if ($settings['images_url'] != $settings['theme_url'] . '/images' || file_exists($settings['theme_dir'] . '/images/icons/last_post.gif'))
                        echo '
<a href="', $topic['href'], '"><img src="', $settings['images_url'], '/icons/last_post.gif" alt="last post" title="last post" border="0" style="float: right;" /></a>
<span class="smalltext">
', $topic['time'], '
</span>
</td>
</tr>';
        }

        echo '
</table>
</div>
    <div style="float: right; width: 50%;">
<table border="0" width="100%" cellspacing="1" cellpadding="4" class="bordercolor">
<tr><td colspan="3" class="titlebg">Recent topics</td></tr>';

$what=ssi_recentTopics(8, array(3), 'array');

        foreach ($what as $topic)
        {
echo '
<tr>
<td class="windowbg" valign="middle">
', $topic['link'];

                // Is this topic new? (assuming they are logged in!)
                if (!$topic['new'] && $context['user']['is_logged'])
                    echo '
                <a href="', $scripturl, '?topic=', $topic['topic'], '.from', $topic['new_from'], '#new"><img src="', $settings['images_url'], '/', $context['user']['language'], '/new.gif" alt="', $txt[302], '" border="0" /></a>';

                echo '
</td>
<td class="windowbg2" valign="middle" width="20%">
', $topic['poster']['link'], '
</td>
<td class="windowbg2" valign="middle" width="35%">';
                if ($settings['images_url'] != $settings['theme_url'] . '/images' || file_exists($settings['theme_dir'] . '/images/icons/last_post.gif'))
                        echo '
                <a href="', $topic['href'], '"><img src="', $settings['images_url'], '/icons/last_post.gif" alt="last post" title="last post" border="0" style="float: right;" /></a>';
               
                echo '
<span class="smalltext">
', $topic['time'], '
</span>
</td>
</tr>';
        }

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

ricardo3523

  • Guest
Re: "recent topics" in SMF style
« Reply #593 on: March 31, 2010, 08:38:53 AM »
It seems to be working ;)

Well, thank you both I guess!!

Just one remaining question, how can I get the left side of the frame from this code on the same row as from the news that shows beneath it.

Tried some numbers in the code itself and on the admin panel, didn't managed to find anything yet.
« Last Edit: March 31, 2010, 08:52:55 AM by ricardo3523 »

Offline IchBin

  • Friends
  • *
  • Posts: 16231
Re: "recent topics" in SMF style
« Reply #594 on: March 31, 2010, 12:53:58 PM »
Do you still have another block enabled? It looks to me like that extra <td> causing your shift on the left is from an empty block or something. I can't reproduce the same affect on my site.

Xarcell

  • Guest
Re: "recent topics" in SMF style
« Reply #595 on: March 31, 2010, 12:55:42 PM »
Do you still have another block enabled? It looks to me like that extra <td> causing your shift on the left is from an empty block or something. I can't reproduce the same affect on my site.

I think it's TP. It's an extra TD. Bloc has corrected this in beta 5.

Offline IchBin

  • Friends
  • *
  • Posts: 16231
Re: "recent topics" in SMF style
« Reply #596 on: March 31, 2010, 12:56:31 PM »
Doesn't happen on my TP beta 4 or beta 5.

ricardo3523

  • Guest
Re: "recent topics" in SMF style
« Reply #597 on: March 31, 2010, 12:58:45 PM »
I don't have any other upper blocks enabled or front page blocks.

There is an option at those blocks saying padding between panels.. but this is on #4 at every block.. so that can't be it?

Offline IchBin

  • Friends
  • *
  • Posts: 16231
Re: "recent topics" in SMF style
« Reply #598 on: March 31, 2010, 01:03:00 PM »
Need to know your TP version. Would help if you'd leave the version in your footer. :) Would you mind letting me take a look? I can't reproduce the issue on my setup. I don't think the padding has anything to do with it.

ricardo3523

  • Guest
Re: "recent topics" in SMF style
« Reply #599 on: March 31, 2010, 01:10:14 PM »
Well if you would be able to tell me where I can find my TP version I'd be glad to look it up for you :)
What do you mean exactly, letting you take a look?