inherit
237817
0
Jul 15, 2017 1:30:54 GMT -8
seaturtle
63
October 2016
seaturtle
|
Post by seaturtle on Apr 4, 2017 15:04:00 GMT -8
Hi guys,
On the thread list I just want the dates of the newest posts only, and not the specific time that the last post was made, is this possible?
I think it's probably not doable since this part can't be edited (?):
$[thread.last_post.created_on]
Thanks for any advice!
|
|
#00AF33
Official Code Helper
19529
0
1
Nov 19, 2012 14:18:28 GMT -8
Todge
**
17,324
January 2004
todge
|
Post by Todge on Apr 5, 2017 5:05:06 GMT -8
|
|
inherit
237817
0
Jul 15, 2017 1:30:54 GMT -8
seaturtle
63
October 2016
seaturtle
|
Post by seaturtle on Apr 7, 2017 7:54:02 GMT -8
You made that just for me? Thanks! But after testing it out, unfortunately it doesn't work on my forum, hopefully it will be of use to others Can we get more people to try your new plugin to see if it works for them? I want to show you my forum to illustrate why I want this feature Notice how the "23 hours ago" looks fine But the timestamp below with dates and times, messes up the alignment Plus if you hover over it, it shows the time anyway if someone is really desperate to know the specific time a post was made. I just want it to show for instance, 19 January, 5 March, 26 July, etc "Yesterday", "x Hours ago" etc are fine because they are not too long.
|
|
Former Member
inherit
guest@proboards.com
225992
0
Nov 23, 2024 10:39:32 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Apr 7, 2017 9:34:52 GMT -8
I would suggest using twitters approach to timestamps, which uses moment.jsRather than full dates they use short code characters as follows "1 day ago" => 1d "24 minutes ago" => 24m "6 seconds ago" => 6s "2 hours ago" => 2h The $[thread.last_post.created_on] creates the time but also supplies the unix timestamp <abbr data-timestamp=""> which can be passed to moment.js
|
|
inherit
237817
0
Jul 15, 2017 1:30:54 GMT -8
seaturtle
63
October 2016
seaturtle
|
Post by seaturtle on Apr 7, 2017 10:59:31 GMT -8
Thanks for your response @synthtec But I have no idea how to use this With javascript I never really understand what it wants me to do. It asks me to "install" a file, but that doesn't make any sense to me because when I click install it just opens up a long wall of code. Are people using some sort of program that I am not aware of?
|
|
Former Member
inherit
guest@proboards.com
225992
0
Nov 23, 2024 10:39:32 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Apr 7, 2017 12:29:12 GMT -8
Not sure what you mean there seaturtleBy install a file, do you mean "embed" the file into your page/template?
|
|
inherit
237817
0
Jul 15, 2017 1:30:54 GMT -8
seaturtle
63
October 2016
seaturtle
|
Post by seaturtle on Apr 7, 2017 13:50:54 GMT -8
In the link you gave it says download on the left and then install on the right Do I copy and paste this into my HTML? It doesn't seem right
|
|
Former Member
inherit
guest@proboards.com
225992
0
Nov 23, 2024 10:39:32 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Apr 7, 2017 14:41:42 GMT -8
Ah ok gottcha. Sorry, those commands are actually used in tool chains, downloaded locally and bundled into a package. That was just a link to the documentation site Building proboards stuff we don't have that luxury. Instead we need to find an online source that will host the scripts, namely a CDN. So inside your admin->templates->forum_wrapper template, you would add the following <head> ... <script src='//cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.min.js'></script> </head>
|
|
inherit
237817
0
Jul 15, 2017 1:30:54 GMT -8
seaturtle
63
October 2016
seaturtle
|
Post by seaturtle on Apr 11, 2017 13:25:50 GMT -8
Ah ok gottcha. Sorry, those commands are actually used in tool chains, downloaded locally and bundled into a package. That was just a link to the documentation site Building proboards stuff we don't have that luxury. Instead we need to find an online source that will host the scripts, namely a CDN. So inside your admin->templates->forum_wrapper template, you would add the following <head> ... <script src='//cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.min.js'></script> </head> Thanks for the response, I only just saw this I just tried it but unfortunately it doesn't work for me, did it work for you?
|
|
inherit
140147
0
Nov 19, 2024 5:07:22 GMT -8
Nscalerr
Throw me to the wolves and I'll return leading the pack!
3,043
May 2009
nscalerr
|
Post by Nscalerr on Apr 13, 2017 3:14:11 GMT -8
I just tested this script on my forum and didn't see any change.
I tested between the <head> and </head> tags in the wrapper template and in the global header / footer.
|
|
inherit
Official Code Helper
65613
0
1
Oct 22, 2024 1:56:19 GMT -8
Chris
"'Oops' is the sound we make when we improve"
9,017
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Apr 13, 2017 4:09:34 GMT -8
You can install the code posted in this thread then add the following to your theme's CSS to conceal the time portion
|
|