Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
Display last post date instead of "days ago", "weeks ago" etc
Avatar
lisalew
Member
Free Members
sp_UserOfflineSmall Offline
Dec 8, 2011 - 1:28 pm

How do I change the way the last post date is displayed on the main forum view?  Our forum is new and fairly inactive, so "2 months ago" looks pretty lame.  Is there a way to just put the date of the last post?  Like 10/08/2011?  Instead of "2 months ago"?

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Dec 8, 2011 - 2:07 pm

You can turn this off in the template where it makes the call to display first or last post columns.

Add nicedate=0 to the argument list and that will then display a date to the format you have specified in the admin content display settings panel.

andy-signature.png
YELLOW
SWORDFISH
Avatar
lisalew
Member
Free Members
sp_UserOfflineSmall Offline
Dec 9, 2011 - 8:54 am

I can't seem to make this work.  I think I'm in the right place, but please let me know what is wrong with my syntax:

In spForumView.php (for example)

 

sp_ColumnStart('tagClass=spColumnSection spRight&width=16%&height=50px');       

sp_TopicIndexLastPost('iconClass=spIcon spRight nicedate=0', __sp('Last Post'));       

sp_ColumnEnd();

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Dec 9, 2011 - 9:08 am

Like all WordPress template tags you need to separate each argument with an ampersand. So that becomes:

'iconClass=spIcon spRight&nicedate=0'

And no spaces before or after the ampersand either.

andy-signature.png
YELLOW
SWORDFISH
Avatar
lisalew
Member
Free Members
sp_UserOfflineSmall Offline
Dec 9, 2011 - 9:37 am

I tried this, and a few other things, and it still isn't changing the date display.  Here is my current syntax for spForumView.php

 

sp_ColumnStart('tagClass=spColumnSection spRight&width=16%&height=50px');        

sp_TopicIndexLastPost('iconClass=spIcon spRight&nicedate=0', __sp('Last Post'));       

sp_ColumnEnd();

 

When I tried adding it to the spGroupView.php, it got rid of the date completely (which is ok for now, but it would be nice to have the date there).  Here is the syntax I'm using:

sp_ColumnStart('tagClass=spColumnSection spRight&width=32%&height=55px');        

sp_ForumIndexLastPost('tagClass=spInRowPostLink&nicedate=0', __sp('Last Post'));       

sp_ColumnEnd();

 

I tried moving &nicedate=0 to the top line instead, but it didn't do anything either. Thanks for your help.

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Dec 9, 2011 - 10:31 am

Sorry - my fault. I didn't give you enough information.

If you turn off the 'nicedate' but still want an alternative then you need to turn that on instead. These are the tag options for those columns along with the default settings (where 1=true/on and 0=false/off):

'tip' - 1,
'nicedate' - 1,
'date' - 0,
'time' - 0,
'user' -  1,
'stackuser' - 1,
'stackdate' - 0,

so - to turn nicedate off and an ordinary date on you need:

'nicedate=0&date=1'

You can add the time option as well if you need it.

Sorry to mess you around.

andy-signature.png
YELLOW
SWORDFISH
Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 620
Members: 17365
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10128
Posts: 79626