0 Members and 1 Guest are viewing this topic.

*

Daemon

  • Sniffer
Enhance Post Prefix with mod
December 18, 2017, 02:50:54 AM
Hey Diego,


I need your help with your Mod. It's working fine, but I want to show it in the Mod "RecentForumTopics" from Pipke.


So, in the attachment you can where I want to show the Prefix (if there is any), just before the topic subject of course.  :D


Here's the code from that:/ Template    
         
Code: [Select]
echo'
<tr>
<td class="icon1 ', $color_class, '">
<img src="', $settings['images_url'], '/topic/' . $icon_post3 . '.gif" alt="" />
</td>
<td class="icon2 ', $color_class, '">
<img src="', $settings['images_url'], '/post/', $post['icon'], '.gif" alt="" />
</td>
<td class="subject ', $alternate_class, '">';
if (!empty($modSettings['rft_firstpostlinkicon']))
// I think this is the right place, but what to insert? echo'<a href="' . $scripturl . '?topic=' . $post['topic'] , '.0"><img style="float:right; padding: 4px;" src="', $settings['images_url'], '/icons/first_post.gif" alt="', $txt['rft_first_post'], '" title="', $txt['rft_first_post'], '" /></a>';
// link to first or last topic message?
if (!empty($modSettings['rft_link_topics']) && ($modSettings['rft_link_topics'] == 'last'))
echo'', $post['is_sticky'] ? '<strong>' : '', '<span>', $post['linklast'],'</span>', $post['is_sticky'] ? '</strong>' : '';

if (!empty($modSettings['rft_link_topics']) && ($modSettings['rft_link_topics'] == 'first'))
echo'', $post['is_sticky'] ? '<strong>' : '', '<span>', $post['linkfirst'],'</span>', $post['is_sticky'] ? '</strong>' : '';
// Is this post new? (assuming they are logged in!)
if ($post['new'] && $context['user']['is_logged'])
echo '
<a href="', $post['new_href'], '" /></a>';
echo'
<p>', $txt['started_by'], ' ', $post['first_poster']['link'] ,' ', $txt['on'], ' ', $post['timelast'],' ', $txt['in'], ' ', $post['board']['link'], '</p>
</td>
<td class="stats ', $color_class, '">
', $post['replies'], ' ', $txt['replies'], '
<br />
', $post['views'], ' ', $txt['views'], '
</td>
<td class="lastpost ', $alternate_class, '">';
if (!empty($modSettings['rft_lastpostlinkicon']))
echo'<a href="', $post['href'], '"><img src="', $settings['images_url'], '/icons/last_post.gif" alt="', $txt['last_post'], '" title="', $txt['last_post'], '" /></a>';
echo'', !empty($settings['st_enable_avatars_recent']) ? template_avataronboard($post['poster']['id']) : '' , $txt['by'], ' ', $post['poster']['link'], ' <br /> ', $txt['on'], ' ', $post['timefirst'], '</span>
</td>
</tr>';
[size=78%]


Can you please help me? I tried a lot but always ends with a template failure.
Thank you![/size]


*

Daemon

  • Sniffer
Re: Enhance Post Prefix with mod
December 21, 2017, 03:23:04 AM
Hello?


Anyone here?
*

Diego Andrés

  • Webmaster
Re: Enhance Post Prefix with mod
December 21, 2017, 12:09:46 PM
I'll try to take a look at this before the weekend
*

Daemon

  • Sniffer
Re: Enhance Post Prefix with mod
December 28, 2017, 04:54:15 PM
Weekend and 1 week are over ...
*

Diego Andrés

  • Webmaster
Re: Enhance Post Prefix with mod
December 29, 2017, 12:27:20 AM
Guess I need to start jotting down what I have to review lol
I've splitted the post and moved topic to a different board, I will be working on it by the morning.
*

Diego Andrés

  • Webmaster
Re: Enhance Post Prefix with mod
December 29, 2017, 12:54:31 PM
Here you go, easy peasy  :D

PS: Replace the file on the Sources directory.
I only changed 3 lines, search for id_prefix if you are curious to know what :P
Last Edit: December 29, 2017, 12:56:20 PM by Diego Andrés
*

Daemon

  • Sniffer
Re: Enhance Post Prefix with mod
December 29, 2017, 02:00:19 PM
Works perfect! Thank you very much!  :)