SimplePortal
Customization => Custom Coding => Topic started 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]
-
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
-
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?
-
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.
-
I would guess it´s in PortalBlocks.php
at 1008: function sp_recent...
something to change in this: <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 />' : '';
?
-
I figured it out. Change to
<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 />' : '';