Notifications
Clear all

wpForo 1.x.x [Solved] Last post

6 Posts
3 Users
0 Likes
728 Views
Posts: 5
Topic starter
(@psumbler)
Active Member
Joined: 3 years ago

Is there anyway of changing the forum (I use simplified layout) to say the date and time of the last post rather than how long ago

e.g last post by PSumbler 29/6 at 22.35
As opposed to last post by PSumbler 1 minute ago

5 Replies
Alvina
Posts: 1872
Moderator
(@alvina)
Member
Joined: 3 years ago

Hi @psumbler,

You can do any change you want using wpForo template files. Here is the documentation for update-safe template customization: 

Posts: 873
(@tutrix)
Noble Member
Joined: 3 years ago

@psumbler

open wpf-themes > classic > layouts > 2 > forum.php

search for

<p class="wpforo-last-post-info"><?php wpforo_member_link($member, 'by'); ?>, <?php wpforo_date($forum['last_post_date']) ?></p>

and replace

<?php wpforo_date($forum['last_post_date']) ?>

with

<?php wpforo_date($forum['last_post_date'], 'd/m/Y g:i a') ?>

 

 

 

Posts: 5
Topic starter
(@psumbler)
Active Member
Joined: 3 years ago

Thank you both thats brilliant

Can that be done on individual forums as well - its worked on the index page but not on the individual forums?  I assume its same code but on a different page?

 

Posts: 873
(@tutrix)
Noble Member
Joined: 3 years ago

@psumbler

topic.php & recent.php

<?php wpforo_date($topic['created']); ?>

replace with

<?php wpforo_date($topic['created'], 'd/m/Y g:i a'); ?>

----------------

<?php wpforo_date($post['created']); ?>

replace with

<?php wpforo_date($post['created'], 'd/m/Y g:i a'); ?>

----------------

<?php if( wpfkey($topic, 'created') ) wpforo_date($topic['created']); ?>

replace with

<?php if( wpfkey($topic, 'created') ) wpforo_date($topic['created'], 'd/m/Y g:i a'); ?>

 

 

Page 1 / 2