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

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 196,004
  • Total Topics: 21,330
  • Online today: 468
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 100
  • Total: 100

Front Block and Recent Topics

Started by nokonium, August 16, 2005, 07:27:13 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Nokonium

If you put recent topics in the front block it displays the same as in the sidebar, squished into 170px width.

Would it be possible to load into the front block, by inserting code into a php block and not a block option, recent posts displayed as formatted in the forum?

Bjørn

Yes, you can also put it in a regular PHP blocktype - just using the ssi_recentTopics(); It has a few more options to tinker with then. Like this:

ssi_recentTopics('8', NULL , 'echo');

if you want exclude some boards from this(that isn't limited by permissions for membergroups already) , use the second option too:

ssi_recentTopics('8', array('4','34','77'), 'echo');

..where those numbers in brackets are the ID of the boards you don't want in recent topics.

Nokonium

That is going the right direction, they aren't squished. But is it possible to display them as you would in the forum theme in a formatted table i.e. If you use 'action=unread'

[attachment deleted by admin]

Bjørn

Its possible..by doing what the "recent topics" block does: getting the info into a array instead, and just displaying it like you need to. I have made the "recent topics" blocktype  narrow of course, to fit in the sideblocks. So its really a theme issue...but to keep both "versions" you should rather do it a php block.

I can write it up..but it will needs some tweaking first to get it right.

Nokonium


Bjørn

Ok, have done it..I just placed it in a special board for pre-made block codes:

http://www.tinyportal.net/smf/index.php?topic=596.0

I will also try to hunt down other examples and move them over there.

Nokonium

That is great Bloc except for one little thing, the posts without the 'New' are the unread  and the ones with it are the read.

Compare the Recent Posts in the side block with the Recent Posts in front block.


[attachment deleted by admin]

Bjørn

Ah, I see..I have updated it. See if it works better now.

This website is proudly hosted on Crocweb Cloud Website Hosting.