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,913
  • Total Topics: 21,308
  • Online today: 884
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 1
  • Guests: 572
  • Total: 573
  • @rjen

Recent topics for SMF2

Started by IchBin, February 22, 2010, 07:53:26 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

BaghdadGhost

Hi all,

this is a great code. thanks for sharing it.

I need a little changes in the style of it.

how to remover "20 Most Recently Posted To Topics" field? nm I got that

how to combine the views/replies together?

and last when a topic has more than one page, I see "?" characters near the pages number?

btw, I use simple portal. does this have to do with the last question.

the reason why I want to make these changes because I want to make it identical with the regular message index and also to save some space as I am going to use it in a top block between left and right sides.

please see these images for better understanding.






thanks

Lesmond

Quote from: BaghdadGhost on January 28, 2012, 06:58:32 PMI use simple portal. does this have to do with the last question.

Sorry but we only support TinyPortal here, you would be best to ask over at simple portal ::)



BaghdadGhost

#42
I just wanted to be honest and not lie.

well thanks anyways for helping others

thechamp

Hi,

Thanks for this, is there a way I can get rid of Most Recently Posted To Topics at the top? I want to use the frame title instead which just says Recent Topics.

Thanks

daveb47



QuoteThanks for this, is there a way I can get rid of Most Recently Posted To Topics at the top? I want to use the frame title instead which just says Recent Topics.

Would like to know this as well please

IchBin

Remove this section.
    echo '
                    <td class="titlebg" colspan="7">', $heading, '</td>';

lparker

installed this with NO errors, after trying many different ones with all kinds of issues, this one worked like a charm, THANK YOU VERY MUCH was so hating the default one haha

leftezi

SMF 2.0.2
TP 1.107

I just tried in a Greek utf-8 forum (default language).
When a topic has more than one page, I see " Ã,« " for "Prev" and " Ã,» " for "Next". This characters are just plain text (not clickable as link).

If this is not easy to fix, it does not bother me if this will be only in English, as "Prev" and "Next", or if this will be not there at all.

IchBin

If you look at the code you can see that those characters have been messed up in this section.
         // Show links to all the pages?
         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['all'] . '</a>';
         $pages .= ' Ã,»';


You can change them to be whatever you'd like.

leftezi

I changed this way but they still plain text (not link)

// Show links to all the pages?
         if (count($tmppages) <= 5)
            $pages = 'Prev« ' . implode(' ', $tmppages);
         // Or skip a few?
         else
            $pages = 'Prev« ' . $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['all'] . '</a>';
         $pages .= ' Next»';
      }
      else
         $pages = '';

This website is proudly hosted on Crocweb Cloud Website Hosting.