TinyPortal

Development => Support => Topic started by: Nokonium on August 16, 2005, 07:27:13 AM

Title: Front Block and Recent Topics
Post by: Nokonium on August 16, 2005, 07:27:13 AM
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?
Title: Re: Front Block and Recent Topics
Post by: Bjørn on August 16, 2005, 09:24:23 AM
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.
Title: Re: Front Block and Recent Topics
Post by: Nokonium on August 16, 2005, 05:40:30 PM
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]
Title: Re: Front Block and Recent Topics
Post by: Bjørn on August 16, 2005, 11:47:17 PM
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.
Title: Re: Front Block and Recent Topics
Post by: Nokonium on August 17, 2005, 06:27:30 AM
Thanks Bloc
Title: Re: Front Block and Recent Topics
Post by: Bjørn on August 17, 2005, 12:03:06 PM
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.
Title: Re: Front Block and Recent Topics
Post by: Nokonium on August 17, 2005, 01:23:18 PM
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]
Title: Re: Front Block and Recent Topics
Post by: Bjørn on August 17, 2005, 10:45:07 PM
Ah, I see..I have updated it. See if it works better now.