SimplePortal

Customization => Custom Coding => Topic started by: Petter on March 27, 2014, 03:31:14 AM

Title: Boardname instead of poster in Recent topics/posts
Post by: Petter on March 27, 2014, 03:31:14 AM
The Recent topics/posts blocks now looks like this:


Topicname
by Poster
[Today at 08:23]

Is it possible to make it:

Topicname
in Boardname
[Today at 08:23]

Title: Re: Boardname instead of poster in Recent topics/post
Post by: FireDitto on March 27, 2014, 05:10:07 AM
Are you using custom code, or the premade block?

You can use the code found here (http://simpleportal.net/index.php?topic=13215.msg65657;topicseen#new) here to make customized boards where you can edit the poster information that is out put pretty easily.

My blocks are:
Topic title
By Poster | time
On Board
Title: Re: Boardname instead of poster in Recent topics/posts
Post by: Petter on March 27, 2014, 07:20:07 AM
Thanks, but I did not understand much of that. I use the premade block, maybe it´s easier to make a little change in that one?
Title: Re: Boardname instead of poster in Recent topics/posts
Post by: FireDitto on March 27, 2014, 07:35:27 AM
If you want to change the post information in the defaults you'll have to go into the source files, I expect. I wouldn't know where to start looking to help you with that. I usually just use custom coding because it's easier to edit.

Sorry; I'm on my phone so I'm not quite able to be as much help as I would like.
Title: Re: Boardname instead of poster in Recent topics/posts
Post by: Petter on March 27, 2014, 09:13:30 AM
I would guess it´s in PortalBlocks.php
at 1008: function sp_recent...
something to change in this:
Code: [Select]
<a href="', $item['href'], '">', $item['subject'], '</a> <span class="smalltext">', $txt['by'], ' ', $item['poster']['link'], $item['new'] ? '' : ' <a href="' . $scripturl . '?topic=' . $item['topic'] . '.msg' . $item['new_from'] . ';topicseen#new" rel="nofollow"><img src="' . $settings['lang_images_url'] . '/new.gif" alt="' . $txt['new'] . '" border="0" /></a>', '<br />[', $item['time'], ']</span><br />', empty($item['is_last']) ? '<hr />' : '';

?
Title: Re: Boardname instead of poster in Recent topics/posts
Post by: Petter on March 27, 2014, 09:41:30 AM
I figured it out. Change to
Code: [Select]
<a href="', $item['href'], '">', $item['subject'], '</a> <span class="smalltext">','<br />', $txt['in'], ' ', $item['board']['link'], $item['new'] ? '' : ' <a href="' . $scripturl . '?topic=' . $item['topic'] . '.msg' . $item['new_from'] . ';topicseen#new" rel="nofollow"><img src="' . $settings['lang_images_url'] . '/new.gif" alt="' . $txt['new'] . '" border="0" /></a>', '<br />[', $item['time'], ']</span><br />', empty($item['is_last']) ? '<hr />' : '';
SimplePortal 2.3.8 © 2008-2024, SimplePortal