It looks like you're new here. If you want to get involved, click one of these buttons!
ok, i know it's a bit confusing and i'm starting to think i'm confusing myself more and more but i tried about thousands of possibilities now and i guess i'm losing track... :-P
so what i want is:
i alredy tried many variatons of-date($Object->DateInserted, ('Y m d') == date($Now, ('Y m d')) and similar stuff in various files but nothing ever worked... is there a much easier solution which i just can't see or what am i doing wrong?
thanks for help in advance!
you could also take a look at the Unreadicon plugin
and modify it to your needs.
It will show you how to test for time difference and then you can reformat the time in a plugin or in the helper_functions.php file.
Answers
that gives me 4 results:
in the class.format-file it's quite easy to define, so it also should be in other files or what's my mistake in thoughts?
- Spam
- Abuse
0 · Insightful Awesome LOL ·I dont understnd your question.
You want to change Posted:9.24 am to Posted:4 minutes ago ?
422 Real Estate Australia , now open Check it out
- Spam
- Abuse
0 · Insightful Awesome LOL ·no, not at all.
i want to change "posted april 24" to "posted april 24 - 13:22h" but only in discussions and only if the comment is not from the same day... so i changed defaultdateformat to '%d %B - %R'... but then there's the problem that in the thread-overview the format is changed too of course (and that doesn't look good). so i have to add something that changes that again, but only for the thread-overview.
the other version is that i only change the time format in the theme/view/discussion folder, but then i have to add something ("if-else" like mentioned in first posting) which because of an unknown reason doesn't work... so why does this not work:
- Spam
- Abuse
0 · Insightful Awesome LOL ·ok, thanks a lot for the idea, i took a short look at the code of the plugin now and it seems to contain some new ideas, will have a closer look at it soon... :-) (now i have to get some sleep cause it's 3am here) and i forgot to mention that, but i'm working in the helper-functions.php file most of the time...
- Spam
- Abuse
0 · Insightful Awesome LOL ·Shouldnt be to difficult all that info is stored. Best of luck
422 Real Estate Australia , now open Check it out
- Spam
- Abuse
0 · Insightful Awesome LOL ·if it was that easy for me i wouldn't still be here... i'm cunfused... i think i got pretty close but i have one more question:
when $indate = date($Sender->EventArguments['Comment']->DateInserted); echoes: "2012-06-10 00:06:26"
why $indate = date('Y m d', $Sender->EventArguments['Comment']->DateInserted); echoes "1970 01 01"
?!
- Spam
- Abuse
0 · Insightful Awesome LOL ·Epoch. You more than likely need to define another var, then parse it like $MyCustomDateTime
422 Real Estate Australia , now open Check it out
- Spam
- Abuse
0 · Insightful Awesome LOL ·finally i found a solution, i just used a little trick (i just cut the date-string)... so if anyone is interested, here's the code for the helper-functions.php file in the "discussion" folder:
<.span class="DateCreated">
- Spam
- Abuse
2 · Insightful 2Awesome LOL ·