TinyPortal

Development => Support => Topic started by: geezmo on September 10, 2006, 07:29:00 AM

Title: Edit "Recent Topics" block
Post by: geezmo on September 10, 2006, 07:29:00 AM
I want to edit the "Recent Topics" block so that:

1 - It shows the full topic title without breaking it, even flowing to the 2nd if necessary;
2 - Have the second line show the author of the post; and
3 - Remove the "New" button;
4 - Show only the time of the post and not the date anymore and have it beside the name of the poster

I want it to appear like:

QuoteThis is the full title of the most
recent post in the forum
by Poster's Name [12:12pm]

How do I edit the Recent Topics code? Thanks.
Title: Re: Edit "Recent Topics" block
Post by: Nokonium on September 10, 2006, 08:47:33 AM
The code for the 'Recent Topics' block is in the TPortalBlocks.template.

1)
The $w['short_subject'] is set in an SSI which is found in SSI.php, you can set the number of characters to display. If you increase the number of characters it will wrap. Display.template uses $context['subject'], so you may be able to output the whole subject with a little fiddling.

3)
Remove <img border="0" src="'.$settings['images_url'].'/'.$context['user']['language'].'/new.gif" alt="new" />

4) I don't know how to do.



Title: Re: Edit "Recent Topics" block
Post by: geezmo on September 10, 2006, 05:55:00 PM
Thanks nokonium I'll try this in my forum. Hopefully someone can reply to my other two queries:

2 - Have the second line show the author of the post;
4 - Show only the time of the post and not the date anymore and have it beside the name of the poster
Title: Re: Edit "Recent Topics" block
Post by: Nokonium on September 10, 2006, 06:10:26 PM
The way I find things out is look for something that does what I want, find out how it does it and 'fiddle'  ;D

I use my own recent topics code, I wanted a bullet marker for each one, so I fiddled  ;)
Title: Re: Edit "Recent Topics" block
Post by: t-geronimo on June 05, 2023, 03:46:35 PM
Is there any chance to modify the "recent topics" block so it shows not only the topic and the author but also the board in which the topic is to find (of course with a link to the board  8) )?
Title: Re: Edit "Recent Topics" block
Post by: @rjen on June 05, 2023, 04:56:00 PM
Yes, there is, by doing the code change mentioned here: https://www.tinyportal.net/index.php?msg=302896
Title: Re: Edit "Recent Topics" block
Post by: t-geronimo on June 06, 2023, 08:11:30 PM
Many thanks for your fast reply.

That helped a lot!  O0
Title: Re: Edit "Recent Topics" block
Post by: Oldiesmann on June 12, 2023, 05:24:20 AM
Somehow just noticed that TP 2.3 was released. Updated two sites so far and a couple more to do tomorrow. No problems so far.