Kunena 7.1.1 & Kunena 6.4.17 – Security Updates Released

The Kunena team has announce the arrival of Kunena 7.1.1 [K 7.1.1] in stable which is now available for download as a native Joomla extension for J! 5.4.x/6.0.x./6.1.x./6.2.x This version addresses most of the issues that were discovered in K 6.2 / K 6.3 / K 6.4 / K7.0 and issues discovered during the last development stages of K 7.1
Just a reminder: K6.4.17 receives only securities fixes until end of 2026, so it's advised for users to upgrade to K7.1.

Topics that are moved into this category are generally considered to be closed. Users may want to add additional information but these topics should not be resurrected in order to discuss new problems or unrelated matters.

Question Need help with user profile date formats!

More
16 years 11 months ago - 16 years 11 months ago #34234 by qbicsounds
I have search all over the internet and this forum and I cannot find a way to convert the date format on the My Profile / User page to a standard US date and time format (mm/dd/yyyy 12-hour am/pm).

I have already updated my language profile and manipulated several of the files in '/com_kunena/template/default/plugin/myprofile' folder but still no luck. In other areas of the forum, the date/time formats have been converted to my desired US date & time format (excluding the latest post, which is in that 'Xdays Xhours ago' format)

I was able to rearrange the field boxes on the 'My Profile Info' page but it still displays a default value in incorrect order. In the birthdate field, where '0001' is actually the month field,'01' is actually the day, and the last '01' is supposed to be the year.

Hopefully I'm explaining this correctly :unsure: , but just in case I created a graphic showing what I'm talking about :huh: .



PLEASE ANY HELP WILL BE GREATLY APPRECIATED! I am struggling so bad right now! :S :(

System Details: Joomla 1.5.15, Kunena 1.5.7 (Using 'default_ex' template with modified CSS), Community Builder 1.2.1
Last edit: 16 years 11 months ago by qbicsounds. Reason: added template

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

More
16 years 11 months ago #34238 by xillibit
Hello,

In the past these fileds was in US format, but now the fields has been modified.

For your problem 1 and 2 :

open the file components\com_kunena\template\default\plugin\myprofile\myprofile_summary.php at line 79 replace this :
Code:
<td><?php echo $juserinfo->registerDate; ?></td>

by this :
Code:
<td><?php echo date('m-d-Y h:i:s',strtotime($juserinfo->registerDate)); ?></td>

at line 83 replace this :
Code:
<td><?php echo $juserinfo->lastvisitDate; ?></td>

by this :
Code:
<td><?php echo date('m-d-Y h:i:s',strtotime($juserinfo->lastvisitDate)); ?></td>

at line 108 replace this :
Code:
<td><?php echo kunena_htmlspecialchars(stripslashes($userinfo->birthdate)); ?></td>

by this :
Code:
<td><?php echo kunena_htmlspecialchars(stripslashes(date('m-d-Y',strtotime($userinfo->birthdate)))); ?></td>

For your problem 3 :

open the file components\com_kunena\template\default\plugin\myprofile\myprofile_profile_info.php and at line 60 replace this :
Code:
<td class="smalltext"> <input name="bday1" size="4" maxlength="4" value="<?php echo $ulists["year"];?>" type="text"/> - <input name="bday2" size="2" maxlength="2" value="<?php echo $ulists["month"];?>" type="text"/> - <input name="bday3" size="2" maxlength="2" value="<?php echo $ulists["day"];?>" type="text"/> </td>

by this :
Code:
<td class="smalltext"> <input name="bday2" size="2" maxlength="2" value="<?php echo $ulists["month"];?>" type="text"/> - <input name="bday3" size="2" maxlength="2" value="<?php echo $ulists["day"];?>" type="text"/> - <input name="bday1" size="4" maxlength="4" value="<?php echo $ulists["year"];?>" type="text"/> </td>

You need to modify the define in your language file _KUNENA_MYPROFILE_BIRTHDATE_DESC

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
16 years 11 months ago - 16 years 11 months ago #34242 by qbicsounds
OMG! Thank you sooooo freakin much!

The only issues are:

#1 Now I am getting a default Birthday of 12-31-1969. How do I change that so it can show the actual birthdate (if provided) and a blank value of "mm-dd-yyyy" (if not provided)?

#2 When I click on "My Profile Info", the default values are still '0000 - 00 - 00'. Even though the '0000' field only allows 2 characters for the month.
Last edit: 16 years 11 months ago by qbicsounds. Reason: update on issues

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

More
16 years 11 months ago #34244 by xillibit
1°) For what profile info or summary ?

2°) I have tested the changes and it's happenned the same thing, after i don't know why it's worked

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
16 years 11 months ago #34245 by qbicsounds
It was happening on the profile info page.

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

More
16 years 11 months ago #34248 by xillibit
In the file myprofile_profile_info.php add this to the line 61 :
Code:
<?php if($ulists["year"] == "0001" && $ulists["month"] == "01" && $ulists["day"]== "01"){ $ulists["year"] = "yyyy"; $ulists["month"] = "mm"; $ulists["day"] = "dd"; } ?>

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.

Time to create page: 0.124 seconds