Support

  1. Thomsterdam
  2. General
  3. Tuesday, September 06 2016, 04:17 PM
  4.  Subscribe via email
Ciao,
1. Is it possible to display both the date of birth AND the age? If so, how do I go about it?
example:
________________
Born: 22 June 1961
Age: 55
________________
2. In the 'profile page', I can show the date of birth as above, but in the 'edit profile page' I see the calendar which produces this format: 1961-06-22. Is it possible to display it in the format above?

3. I would like to use a different avatar, not the standard /components/com_jsn/assets/img/default.jpg but one I created myself.
I could not find how to make an override for it, so I made a 'core hack': I saved my own image and uploaded it to /com_jsn/assets/img/ I know this is bad practice in Joomla to make a core hack, because it will be overwritten when you come with a component update.
So, is there another way to use my own image?

Grazie,

Thom
admin Accepted Answer
Admin
Hi,
1)
this is not possible with a simple way, we will try to explain you a workaround to do this:
- Install some tool like Sourcerer (https://www.regularlabs.com/extensions/sourcerer) it's free
- Create a field of type HTML Delimiter called "Born" (hidden on registration and edit profile pages, only show on profile)
- In HTML Delimiter description put some code like this:

{source}
<?php
$user=JsnHelper::getUser( JRequest::getVar( 'id' , JFactory::getUser()->id ) );
echo date( 'j F Y' , strtotime( $user->age ) );
?>
{/source}

- See Result ;)

NOTE: Sourcerer allow you to add PHP code as Content Plugin
NOTE2: HTML delimiter field can trigger content plugins, see docs at http://docs.easy-profile.com/index.php/article/html-delimiter-field-type

2)
Try this:
- Go to: Administrator->Extensions->Languages->Overrides (left menu)
- Create a new override by click to "New" Button
- Set this:
Language Constant: COM_JSN_DATE_INPUT_FORMAT
Text: dd MM yyyy
- see screenshot

NOTE: this is a hidden feature, why hidden? because it can not works with all languages. Date input field need to be parsed, so it need a standard format. Anyway I hope this works ;)

3)
You can set default image from Administration->Components->Easy Profile->Choose Avatar field and search default value parameter
Attachments (3)
  1. more than a month ago
  2. General
  3. # 1
Thomsterdam Accepted Answer
Ciao,
I tried your suggestions.
1. We have already set a date of birth field and it has been populated with data. So I'll just leave it the way it is.
2. I have made the language override as you suggested. First I only added the Language Constant only on the front-end and later also for the back-end, but when I tried to change the date of birth for a test member, I got this result:
________________
Waarschuwing
Profiel opslaan mislukt: DateTime::__construct(): Failed to parse time string (02 februari 1960) at position 6 (r): The timezone could not be found in the database
________________
which means in English:
________________
Warning:
Saving Profile failed: DateTime::__construct(): Failed to parse time string (02 februari 1960) at position 6 (r): The timezone could not be found in the database
________________
Can you suggest a solution?

3. I could/should have thought of this myself; I changed it.
I have a further question, though: I have uploaded an image of 300 x 300 pixels in size, like the one you provide as a default. When I go to the members list, MY default image shows very big, but when someone has uploaded his own image, it shows as a small picture. Is there a way to change this easily? Or should I use CSS for this?

Thanx,

Thom
  1. more than a month ago
  2. General
  3. # 2
Thomsterdam Accepted Answer
To give you an idea of what it now looks like, I have uploaded a screen shot.
Attachments (1)
  1. more than a month ago
  2. General
  3. # 3
admin Accepted Answer
Admin
Hi,
1) This is ok.
2) I'm sorry but Joomla (JDate class) does not retrieve date from string with your language. So the only solution is to change something in Easy Profile core file administrator/components/com_jsn/helpers/date.php in function "storedata"
3) You need to manage via CSS. This not seems a normale Easy Profile list page. Have you some template override?
  1. more than a month ago
  2. General
  3. # 4
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.

Request Support

Support is currently Offline

Support Availability

Working days: Monday to Friday. The support staff is not available on weekends; in the most of cases tickets will not be answered during that time.

Reply time: Depending on the complexity of your support issue it's usually between a few minutes and 24 hours for paid members and about one week for free members. When we expect longer delays we will notify you.

Guidelines

Before you post: read the documentation and search the forums for an answer to your question.

When you post: include Site Details if you request a support (you can use the form below the reply in Site Details tab).

Auto Solved Question: If after a week the author of the post does not reply to a request by moderator, the question will be marked as resolved.

Language: only English

Search Users

Easy ProfileĀ® is not affiliated with or endorsed by Open Source Matters or the Joomla Project. Joomla is Free Software released under the GNU/GPL License.