Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: getting last post inside bb_forum_class()

@romerocw

Member

Thanks _ck_, I just downloaded it and installed it. I have a question and a comment.

1st Q: Am I missing something simple? Is there a way to get forum_last_post_title() in addition to the link? I”d like the link title to be the post title. With your plugin I can create an href of the last post and link to it but the link text has to be the URL. I’d like the link text to be the post title.

2nd comment: There is something weird going on inside the bb_fourm_class() loop. If I do this code the plugin works correctly giving me the last post link:

<td class="topicTitle"> <?php forum_time(); ?> <a href="<?php forum_last_post_link(); ?>"><?php forum_last_post_link(); ?> </a> <?php forum_time(); ?>
<br /><span class="lastPoster">by <a href=""><?php forum_last_poster(); ?></a></span>
<span class="topicTime">at <?php topic_time('M. j, Y'); ?></span>
</td>

If I remove the first occurrence of <?php forum_time(); ?> and let the loop see “> first then the plugin doesn’t work correctly and the incorrect first post link is displayed. The following breaks the plugin for the 1st occurence of a link. The subforum link does work correctly.

<td class="topicTitle"> <a href="<?php forum_last_post_link(); ?>"><?php forum_last_post_link(); ?> </a> <?php forum_time(); ?>
<br /><span class="lastPoster">by <a href=""><?php forum_last_poster(); ?></a></span>
<span class="topicTime">at <?php topic_time('M. j, Y'); ?></span>
</td>

See if you can reproduce it in one of your templates. I can reproduce it here.

Skip to toolbar