Blog
Developers
Careers
Support
Contact
Gossamer Threads
Solutions
Results
About
Mailing Lists
Resource Centre
Forum
Tools
Home
Who's Online
Tags
Favourites
Login
Forum Search
(
Advanced Search
)
This forum
This category
All forums
for
Home
:
Products
:
Gossamer Forum
:
Discussion
:
Lastest Post Title...
Previous Thread
Next Thread
Print Thread
View Threaded
Dec 1, 2004, 1:13 PM
SeanP
User
(456 posts)
Dec 1, 2004, 1:13 PM
Post #1 of 3
Views: 2386
Shortcut
Lastest Post Title...
I'm trying to add the title of the latest post in each forum to the main category view of GForum. So, where is displays the last post timestamp, it would display the title of it as well. Has anyone done this?
Sean
Dec 2, 2004, 2:14 AM
Andy
Veteran
/ Moderator
(18436 posts)
Dec 2, 2004, 2:14 AM
Post #2 of 3
Views: 2317
Shortcut
Re: [SeanP] Lastest Post Title...
In reply to
I just gave this a go, and it seems to work well :)
<%last_title_global($forum_last_id)%>
Code:
sub {
my $post_id = $_[0];
my $post_title = $DB->table('Post')->select( ['post_subject'], { post_id => $post_id } )->fetchrow;
return $post_title;
}
You need to put it in category_list.html, around;
Code:
<% if forum_total%>
<%nbsp forum_last_date%><br><nobr>by <a href="gforum.cgi?username=<%GT::CGI::escape($forum_last_poster)%>;<%hidden_query%>"><%nbsp forum_last_poster%></a> <a href="gforum.cgi?post=<%forum_last_id%>;<%hidden_query%>#<%forum_last_id%>"><img src="<%image_url%>/jump_last.gif" width="14" height="11" border="0" alt="Jump to post"></a></nobr>
<% else%>
Hope that helps
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my
Amazon Wish List
GLinks ULTRA Package
|
GLinks ULTRA Package PRO
Links SQL Plugins
|
Website Design and SEO
|
UltraNerds
|
ULTRAGLobals Plugin
|
Pre-Made Template Sets
|
FREE GLinks Plugins!
Dec 2, 2004, 7:59 AM
SeanP
User
(456 posts)
Dec 2, 2004, 7:59 AM
Post #3 of 3
Views: 2321
Shortcut
Re: [Andy] Lastest Post Title...
In reply to
That works great! I added an href around it to make it linked to the post:
Code:
<a href="gforum.cgi?post=<%forum_last_id%>;<%hidden_query%>#<%forum_last_id%>"><%latest_post_title($forum_last_id)%></a>
Thanks Andy!
Previous Thread
Next Thread
Print Thread
View Threaded