Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
date more specific
jackmaessen
✭✭✭
hello back again with another question,
In the discussion i can see that the date is shown only by the day and the month. Is there a way to make it more specific?
Per example: now in a discussion i have in the meta: Started by: admin, 2 January, Most recent by : xxx
I would prefer: Started by ; admin, 31-12-2013 2.50 PM, Most recent by: xxx
Tagged:
0
Comments
The following can be set in config.
Follow this guide for formatting options
http://uk3.php.net/strftime
do not confuse the formatting with this spec
http://uk3.php.net/manual/en/function.date.php
there are different and will not produce the same results.
grep is your friend.
so if you don't want the informality you can make the more recent the same format.
grep is your friend.
well, i do not succeed in this. I put the code above in config.php but nothing changes. I really need some help with this...
Doh! It is supposed to be Locale not config sorry
Create a file called locale.php in /conf and put this
Note those values are the defaults you still have to read the link as to how to fomat how you want.
grep is your friend.
Well, i changed my locale.php in the conf folder and it now looks like this:
But still nothing has changed. Below a snapshot what i prefer:
and
you need to change the right hand side of the equation in the definitions to reflect the date formats you want.
and you must delete the ini files in cache folder when changing or adding locale files.
http://www.php.net/manual/en/function.date.php
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
That is the wrong format use
http://uk3.php.net/strftime
grep is your friend.
@jackmaessen please read through my post again.
grep is your friend.
why on earth are you putting
ob_start("ob_gzhandler");
? For one it is not a file that you ever want anyone to access directly or output to the buffer.btw output compression is usually done on the server level these days, and it is smart based on the capability of the browser.
grep is your friend.
sorry x00
regarding formats.
follow x00's instructions. regarding formats.
but deleting ini files from cache folder - may help when adding locale files.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Well....it still doenst work for me.
This is what is in my locale.php:
As you can see the %A must at least show some day of the week in one of them. But nothing changed.
I deleted all the .ini files in the cache folder and i emptied my browsers cache but still no result.
what i am doing wrong?
About the gzhandler: the main problem is that my hostprtovider does not support gzip. But i noticed with info.php file that gzip is enabled. So i put this line in the php files and i made a .htaccess to force Apache to gzip
thanks for letting us try to help you that is awesome and insightful of you. @jackmaessen
put this in as a test to check if "Discussions" changes to "Posts" to see if you are actually reading the locale.php.
$Definition['Discussions'] = 'Posts'; to see if it changes to posts.
$Definition['Date']['DefaultTimeFormat'] = '%A %l:%M%p'; // If in current day
$Definition['Date']['DefaultDayFormat'] = '%A %B %e'; // If in same year
$Definition['Date']['DefaultYearFormat'] = '%A %B %Y'; // If not in same year
$Definition['Date']['DefaultFormat'] = '%A %B %e, %Y'; // general applications
$Definition['Date']['DefaultDateTimeFormat'] = '%A %c'; // date/time used in attributes
never got a chance to read these huh!
http://vanillaforums.org/discussion/23130/forum-post-ettikett-etiquette
http://vanillaforums.org/discussion/17954/food-for-thought-forum-etiquette
http://vanillaforums.org/discussion/23483/advice-for-all-those-just-starting-out-with-vanilla
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
no nothing changes; so locale.php is not being read?
people aren't reading my post.... look carefully at it then compare it to yours.
grep is your friend.
this is what is known as cargo cult programming.
http://en.wikipedia.org/wiki/Cargo_cult_programming
grep is your friend.
one you are confusing two solutions. Either you are using the apache module, or you are doing in it in php.
In order to use an output buffer function you should first understand the output buffer is.
Lastly this framework is MVC which mean these files aren't requested directly (and the configuration/locale files rarely are). Everything goes through a single dispatcher, so putting this on the top of all php files is pointless. You risk out output errors, such as whitespace errors.
grep is your friend.
Well, i finally found the solution.
Why did it not working? The [Date] should be removed from the code in locale.php and embed in the second
This works:
That was the main reason why it did not work for me.
I also added more specific date in the discussions. In helper_functions.php i added these lines to it:
Actually, my opinion, these settings must be part of the core files with a easy user interface so that anyone can modify it to its own wishes. For people who are not familiar with php code, this is hardly impossible. It should be easy to adjust to everyone.
??? It is the core, and configurable, what more do you want? If you wish to edit helper_functions.php (which don't really need to in this case), you should copy the view over to your theme and place it is n the views/discussions/
Vanilla is called vanilla for a reason. it is not called tutti-fruti, therefore any interface would be more applicable as a plugin I would have thought.
grep is your friend.
you code is also somewhat redundant because you can achieve what you through the correct settings of those definitions, you are re-inventing the wheel.
you are placing code in hacky way, without notion of architecture.
grep is your friend.
yes you are right x00: this is the core, but i actually mean: there should be a nice userinterface for people who are not familiar with code so that they can easily change the date formats to their own wishes.
Something like:
Something like this in a nice userinterface that people only have to choose the checkboxes and the code is parsed in sort of a config file