Kunena 7.0.4 Released

The Kunena team has announce the arrival of Kunena 7.0.4 [K 7.0.4] in stable which is now available for download as a native Joomla extension for J! 5.4.x/6.0.x. This version addresses most of the issues that were discovered in K 6.2 / K 6.3 / K 6.4 and issues discovered during the last development stages of K 7.0

Question [Solved - Finally!] Change Date-Format in myprofilebox

More
17 years 2 months ago - 17 years 2 months ago #5661 by Lintzy
xillibit wrote:

<?php $birthdate=explode("-",$userinfo->birthdate);
$test=date("d-M-Y",mktime(0,0,0,$birthdate[1],$birthdate[2],$birthdate[0])); ?>

Then in your file(template/default/plugin/myprofile/myprofile_summary.php) you type this :

<td><b><?php echo _KUNENA_MYPROFILE_BIRTHDATE; ?></b> </td>
<td><?php echo $test; ?></td>


Very well, this solution is really working THANKS !!!

Do you have a solution for

Register Date
Last Visit Date


too?

I guess, those are more difficult, because the time is fetched from Joomla?
Last edit: 17 years 2 months ago by Lintzy.

Please Log in or Create an account to join the conversation.

More
17 years 2 months ago #5686 by Matias
Joomla saves the time in the same format. It just contains also time. See php manual how to fetch the information you're after.

Please Log in or Create an account to join the conversation.

More
17 years 2 months ago #5723 by xillibit
Lintzy wrote:

xillibit wrote:

<?php $birthdate=explode("-",$userinfo->birthdate);
$test=date("d-M-Y",mktime(0,0,0,$birthdate[1],$birthdate[2],$birthdate[0])); ?>

Then in your file(template/default/plugin/myprofile/myprofile_summary.php) you type this :

<td><b><?php echo _KUNENA_MYPROFILE_BIRTHDATE; ?></b> </td>
<td><?php echo $test; ?></td>


Very well, this solution is really working THANKS !!!

Do you have a solution for

Register Date
Last Visit Date


too?

I guess, those are more difficult, because the time is fetched from Joomla?

I have made this for register date and for last visit date is the same, you have to change $juserinfo->registerDate by $juserinfo->lastvisitDate :

<?php
$registerfirst=explode(" ",$juserinfo->registerDate);
$registerdate=explode("-",$registerfirst[0]);
$registertime=explode(":",$registerfirst[1]);

$testregister=date("d-M-Y H:i:s",mktime($registertime[0],$registertime[1],$registertime[2],$registerdate[1],$registerdate[2],$registerdate[0])); ?>
<td><b><?php echo _KUNENA_MYPROFILE_REGISTERDATE; ?></b> </td>
<td><?php echo $testregister; ?></td>

I don't provide support by PM, because this can be useful for someone else.

Please Log in or Create an account to join the conversation.

More
17 years 2 months ago #5735 by Matias
Hmm.. I think that there is an easier way to do this. YYYY-MM-DD is standard way of expressing date and there are functions which can change this to suitable for date() function.

See fi2.php.net/manual/en/function.strtotime.php

Please Log in or Create an account to join the conversation.

More
17 years 2 months ago #5743 by Lintzy
@ xillibit

It works EXCELLENT. You have done the european a great favor! The solution is fantastic, registerDate, visitDate and birthdayDate are now in d.M.Y-Format.

Thank you very much indeed.

Please Log in or Create an account to join the conversation.

More
17 years 2 months ago #5921 by Lambas
This is great!!!

Any fix for the noobs?? (like me haha) :)

hey yo!

Please Log in or Create an account to join the conversation.

Time to create page: 0.265 seconds