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

Recent

Welcome to TinyPortal. Please login or sign up.

March 29, 2024, 12:38:16 PM

Login with username, password and session length
Members
Stats
  • Total Posts: 195,106
  • Total Topics: 21,213
  • Online today: 358
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 1
  • Guests: 72
  • Total: 73
  • @rjen

Edit "Recent Topics" block

Started by geezmo, September 10, 2006, 07:29:00 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

geezmo

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.

Nokonium

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.




geezmo

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

Nokonium

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  ;)

t-geronimo

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) )?

@rjen

Running Latest TP on SMF2.1 at: www.fjr-club.nl

t-geronimo

Many thanks for your fast reply.

That helped a lot!  O0

Oldiesmann

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.