Support

  1. messagedj
  2. General
  3. Saturday, May 09 2015, 03:41 PM
I would like to style my profile page.

is there a way to style results?\

For example, a user can select, Man of Woman in the profile. I'd like to use CSS icons. So if you choose for man you see a different icon than woman
Accepted Answer
admin Accepted Answer
Admin
Hi,
we have check your override and there is a problem, in first post we wrote this (wrong):
if($field->name=='gender'){

in the second we wrote (correct):
if($field->fieldname=='gender'){

Check on your site, now work;)
  1. more than a month ago
  2. General
  3. # Permalink
admin Accepted Answer
Admin
Hi,
sorry for late reply, it was weekend for us.

You can apply Joomla override on Easy Profile template files, so for example:
- copy /components/com_jsn/view/profile/tmpl/default_fields.php into /templates/your-template-folder/html/com_jsn/profile/default_fields.php
- Edit new file with some code like this before line 50
if($field->name=='gender'){
if($field->value=='male') echo('<i class="icon icon-male"></i>');
if($field->value=='female') echo('<i class="icon icon-female"></i>');
}
else{
// existing code
}


NOTE: this is only an example, with template overrides there are many possibilities, this code is not tested and not supported.
  1. more than a month ago
  2. General
  3. # 1
messagedj Accepted Answer
It is not working, but to be sure, could you tell me what is in line 50?

i mean, where it should be edit before exactly
  1. more than a month ago
  2. General
  3. # 2
admin Accepted Answer
Admin
at line 50 you find the code to render output of each field in profile page.

Example:
I have a Gender field (select type) with alias "gender" and these optios:
male|Male
female|Female

replace from line 50 to line 55 this:
				if (JHtml::isRegistered('users.'.$field->id)) echo JHtml::_('users.'.$field->id, $field->value);
elseif (JHtml::isRegistered('users.'.$field->fieldname)) echo JHtml::_('users.'.$field->fieldname, $field->value);
elseif (JHtml::isRegistered('users.'.$field->type)) echo JHtml::_('users.'.$field->type, $field->value);
elseif (JHtml::isRegistered('jsn.'.$field->type)) echo JHtml::_('jsn.'.$field->type, $field);
elseif (is_string($field->value) && trim($field->value)=="0") echo $field->value;
else echo JHtml::_('users.value', $field->value);

with this:
if($field->fieldname=="gender"){
if($field->value=='male') echo("HTML icon male");
if($field->value=='female') echo("HTML icon female");
}
else
{
if (JHtml::isRegistered('users.'.$field->id)) echo JHtml::_('users.'.$field->id, $field->value);
elseif (JHtml::isRegistered('users.'.$field->fieldname)) echo JHtml::_('users.'.$field->fieldname, $field->value);
elseif (JHtml::isRegistered('users.'.$field->type)) echo JHtml::_('users.'.$field->type, $field->value);
elseif (JHtml::isRegistered('jsn.'.$field->type)) echo JHtml::_('jsn.'.$field->type, $field);
elseif (is_string($field->value) && trim($field->value)=="0") echo $field->value;
else echo JHtml::_('users.value', $field->value);
}


Tested and works
  1. more than a month ago
  2. General
  3. # 3
messagedj Accepted Answer
Content Protected
  1. more than a month ago
  2. General
  3. # 4
messagedj Accepted Answer
Marvelous!

now i only need to know what template file is used for Easy Profile » Users List.

thnx a lot for the help
  1. more than a month ago
  2. General
  3. # 5
admin Accepted Answer
Admin
the tmpl files for list are into folder /components/com_jsn/view/list/tmpl/ and you need to copy into /templates/your-template-folder/html/com_jsn/list/

the template file for each user is default_user.php for User List menu item and table_user.php for User Table menu item.
  1. more than a month ago
  2. General
  3. # 6
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.
Sorry, the discussion is currently locked. You will not be able to post a reply at the moment.

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.