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

Recent

Welcome to TinyPortal. Please login or sign up.

May 18, 2024, 01:28:43 PM

Login with username, password and session length
Members
  • Total Members: 3,886
  • Latest: Grendor
Stats
  • Total Posts: 195,189
  • Total Topics: 21,220
  • Online today: 112
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 42
  • Total: 42

"recent topics" in SMF style

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

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

G6Cad

Still the same. have nothing at all turned on exept that it should show on frontpage (still article)

It's there now if you want to see it.

I have 1280x1024 resolution on my screen to so it's not that eather.
Cleard cache, temp internet files to. Still the blue scroll in the bottom,.
It kind of looks like it's in an iframe tag or similar

jacortina

Quote from: mrbean17 on March 06, 2007, 02:39:46 PM
J.A.Cortina,

I really like your new version of this ... but I found a problem:

Any recent topic that spans more than one page creates an odd character around the page numbering:

This is my topic ÂÃ,« 1 2 ÂÃ,»

Weird eh? Anyone else have this problem?

If you look at the code, the 'double arrows' are assigned in these lines:

if (count($tmppages) <= 5)
$pages = 'Ã,« ' . implode(' ', $tmppages);
// Or skip a few?
else
$pages = 'Ã,« ' . $tmppages[0] . ' ' . $tmppages[1] . ' ... ' . $tmppages[count($tmppages) - 2] . ' ' . $tmppages[count($tmppages) - 1];

if (!empty($modSettings['enableAllMessages']) && $topic_length < $modSettings['enableAllMessages'])
$pages .= '  <a href="' . $scripturl . '?topic=' . $row['ID_TOPIC'] . '.0;all">' . $txt[190] . '</a>';
$pages .= ' Ã,»';



These are the same as the characters above each post here before and after the reply # and date/time.

I assume this has something to do with the character set being used.

try changing each (there are two places):
'Ã,« '
to:
'« '

and the one:
' Ã,»'
to:
' »'

jacortina

Quote from: G6â„¢ on March 06, 2007, 02:50:19 PM
Still the same. have nothing at all turned on exept that it should show on frontpage (still article)

It's there now if you want to see it.

I have 1280x1024 resolution on my screen to so it's not that eather.
Cleard cache, temp internet files to. Still the blue scroll in the bottom,.
It kind of looks like it's in an iframe tag or similar

Checking the page source, it looks like that's asn older version which had a 'margin' error in it (the < div > that contains this shows as having a -4pix margin, which isn't in the latest code, but may have been in earlier code).

Latest code is in: http://www.tinyportal.net/index.php?topic=596.msg105580#msg105580

(changed Gobo-Aku's pointer up-thread).

mrbean17

Thanks for the fast reply.

I searched the code and found 3 instances of the character and simply removed them and all is well.

Thanks again!

jacortina

A note about the 'double-arrows' problem -

I include text of message with my notifications and when I got the email notification of the post with this problem, it's displayed in my mail (GMail) as:

QuoteI really like your new version of this ... but I found a problem:

Any recent topic that spans more than one page creates an odd character around the page numbering:

This is my topic Ã,« 1 2 Ã,»

Weird eh? Anyone else have this problem?

No funny characters, even though they show up in that post in this thread
( http://www.tinyportal.net/index.php?topic=596.msg115814#msg115814 ).

G6Cad

QuoteChecking the page source, it looks like that's asn older version which had a 'margin' error in it (the < div > that contains this shows as having a -4pix margin, which isn't in the latest code, but may have been in earlier code).

Latest code is in: http://www.tinyportal.net/index.php?topic=596.msg105580#msg105580

(changed Gobo-Aku's pointer up-thread).

That worked :)

Thank you J.A Cortina :)  :-*

mrbean17

J.A.,

The only thing I don't like about yours vs. Bloc's is that when clicking on a topic, it takes you to the original post vs. the new post since last visit.

Is this an easy change?

Thanks

jacortina

The 'new' icon/graphic will take you there.

Mine works just as a regular topic list works. Subject line is link to first post, <new> graphic to first unread (if any), far right graphic for last post in thread. Plus pages if multiple in thread.

mrbean17


joh87swe

I use this code:
global $scripturl;

echo '
                        <table border="0" width="100%" cellspacing="1" cellpadding="4" class="bordercolor">
                               <tr><td colspan="3" class="catbg3">Senaste inlägg</td></tr> ';
       $what=ssi_recentTopics('5', NULL, '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>';

But I also want to use the same but only to show topics of a certain board. I have many boards and new boards are being added often so it would be wonderful if I only have to set the board id that I want to show topics from.
Thanks for help.

//Johan