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,963
  • Latest: BiZaJe
Stats
  • Total Posts: 195,917
  • Total Topics: 21,308
  • Online today: 884
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 1
  • Guests: 453
  • Total: 454
  • @rjen

"recent topics" in SMF style

Started by Lesmond, August 17, 2005, 12:01:38 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

ricardo3523

#560
Hello.

I pasted the following into a php box twice ( two boxes ):

       
global $scripturl;

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('1','112','47','52','36','49','37','51','192','8') , '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="', $txt[111], '" title="', $txt[111], '" border="0" style="float: right;" /></a>';
                echo '
                                                <span class="smalltext">
                                                        ', $topic['time'], '
                                                </span>
                                        </td>
                                </tr>';
        }

        echo '
                        </table>';


The result is in attachement.

I wonder if anyone happens to know how I can make those two boxes the same length.. for some reason the left one has a longer length as the right box.

Thanks!

EDIT: I noticed they change with the size of the title.. is there any way to implement a length which it sticks to?

Rav33n

ricardo3523 your problem is with the block width and not the code itself.

Make both block widths the same and see whether the lengths match.

ricardo3523

Sorry for my confusing post.

I confused length with width..

I would like to know how I can make both blocks have the same width.
And I am unable to find any option which says blocks width..

IchBin

Then perhaps you should tell us which verison of TP you're using. There are all sorts of width options in the latest beta inside the panel and block options area.

Xarcell

Quote from: ricardo3523 on March 23, 2010, 07:29:13 PM
Sorry for my confusing post.

I confused length with width..

I would like to know how I can make both blocks have the same width.
And I am unable to find any option which says blocks width..

I'm not familiar with the version you are using, as I don't have time to back read all of the posts. There are a few ways to do this.

First i would try going to the panel settings and you can set the width of each block within the panel. This way all blocks have the same width regardless.

ricardo3523

I believe I have TP 1.0...
I've got no clue where I can check my TP version, only managed to find my SMF version.

The only width option at panels at those blocks are ''Padding between panels:      ''
So, for as far I see, no option to set a width.

IchBin

TP version is always in the footer. If you don't see it in a custom theme, then check the default theme. Sounds like you are running TP 0.9.8 though if you don't see any other options. That old version doesn't have these features.

Xarcell

Yes, it sounds like you are using an older version if you don't have that option.

ricardo3523

So I suppose there is no way to make a set width for those blocks then?

Would it be possible to upgrade the TP version without screwing anything from the website over?

IchBin

There's no guarantee for anything. I haven't see any site blow up because of TP. However, there shouldn't be any worry if you have backups before you upgrade. However, if you're that concerned about it I would install it on a test site and test it out before upgrading if I were you.

This website is proudly hosted on Crocweb Cloud Website Hosting.