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

Recent

Welcome to TinyPortal. Please login or sign up.

May 19, 2024, 10:36:02 PM

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

"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.

alhaudhie

how can we made only just the topic and limit the topic character?

i dont want new icon,category,poster name,date.

Hope anybody can help.

G6Cad

Did you read through this entire thread ?
I think what you ask for is allready done, and that the code for it is in this thread.

Long read, but perhaps your lucky :)

alhaudhie

Quote from: G6 on September 04, 2008, 05:51:10 PM
Did you read through this entire thread ?
I think what you ask for is allready done, and that the code for it is in this thread.

Long read, but perhaps your lucky :)

tq.. DONE.....

but one thing is i cant find it, how to limit the topic character?

IchBin

Did you use the search for that question? I'm pretty sure its been covered. Try searching for character limit and see what you find.

pedrox

Increase number pages on front page ?   :)

alhaudhie

How can i add scrolling with this code

global $scripturl;

echo '
                        <table border="0" width="100%" cellspacing="1" cellpadding="3" class="bordercolor">
                               <tr><td colspan="6" class="titlebg" align="center">Kiriman Terbaru Di Forum    </td></tr> ';
       $what=ssi_recentTopics('12', NULL, 'array');


        foreach ($what as $topic)
        {
               echo '
                                <tr>
                                        <td class="windowbg" valign="middle">
                                                <span title="',shorten_subject($topic['preview'], $modSettings['hoverLength']),'">', $topic['link'],'</span>';

                // 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="14%">
                                                ', $topic['poster']['link'], '
                                        </td>

                                        </td>
                                        <td class="windowbg" valign="middle" width="15%">
                                                ', $topic['board']['link'], '
                                        </td>


                                        <td class="windowbg2" valign="middle" width="27%">';
                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>';

IchBin

You add the marquee tags to add scrolling. If you want it to stop scrolling when you mouse over and stuff, then you'll have to find a javascript marquee script to do that kind of stuff. If you google the marquee HTML tag, you'll see how it is used. Then you just add those tags to this code before and after the table tags.

alhaudhie

I think i have make a wrong request about scroll.

What i mean is like this :
<div style="width: 100%; ' , $online['num_users']>5 ? 'height: 25ex;overflow: auto;' : ''

thats for users online.

How can i put it in this Recent code.

alhaudhie

This is what i take from user online stats :
<div style="width: 100%; ' , $online['num_users']>5 ? 'height: 25ex;overflow: auto;' : ''

how can i make my recent post having overflow limitation. I want my recent post showing 20 latest post but their size only for 5 post. User must scroll down to look more 15 post.
This is my original code : hope soebody can edit it.

global $scripturl;

echo '
                        <table border="0" width="100%" cellspacing="1" cellpadding="3" class="bordercolor">
                               <tr><td colspan="6" class="titlebg" align="center">Kiriman Terbaru Di Forum    </td></tr> ';
       $what=ssi_recentTopics('12', NULL, 'array');


        foreach ($what as $topic)
        {
               echo '
                                <tr>
                                        <td class="windowbg" valign="middle">
                                                <span title="',shorten_subject($topic['preview'], $modSettings['hoverLength']),'">', $topic['link'],'</span>';

                // 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="14%">
                                                ', $topic['poster']['link'], '
                                        </td>

                                        </td>
                                        <td class="windowbg" valign="middle" width="15%">
                                                ', $topic['board']['link'], '
                                        </td>


                                        <td class="windowbg2" valign="middle" width="27%">';
                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>';

alhaudhie

how can i add also with above code number of views and repy?