Notice

The forum is in read only mode.

Support Forum

Welcome! Support Forums have been reactivated
Welcome the Technical Support section. Help us in assisting you by providing us with a concise and descriptive elaboration of your issues. Be specific and if possible, provide us with a step-by-step instruction in replicating your problem.

Member listing - more infos to add

7 years 5 months ago
  • Hermann's Avatar
    Topic Author
  • Hermann
  • Offline
  • Fresh Boarder
  • Posts: 3
  • Thank you received: 0
Licenses:
JomSocial Active Socialize Expired

ISSUE SUMMARY: Member list - adding of profile fields

I want to add some profile fields: e.g. FIELD_GENDER, FIELD_ABOUTME, FIELD_CITY ...

Where can I do this?

Many thanks in advance!
Hermann

7 years 5 months ago
Licenses:

Hi, Hermann.

Thank you for contacting us.
Please, read this :)
www.jomsocial.com/forum/profile-universa...tory-listings#166461


- Instead of saying: 'it's not working', explain the problem in detail.
- Screenshots with the URL visible in them and the problem marked are more than welcome.
- Tell us how to replicate the problem, we can't fix it if we can't find it.
- Make sure that your site/server meets JomSocial System Requirements
- Make sure to setup JomSocial Cron Job
- Always provide us with access details to the backend and ftp. We need it to debug problems.
- If you have a similar problem, but a solution you found isn't working, open a new thread instead of 'merging' with an existing one.

- Use the "Thank You" feature on any post that helped you
7 years 5 months ago
  • Hermann's Avatar
    Topic Author
  • Hermann
  • Offline
  • Fresh Boarder
  • Posts: 3
  • Thank you received: 0
Licenses:
JomSocial Active Socialize Expired

Thanks, I did, like you told me:
As described, I put the code;
<?php
// custom field FIELD_POSITION
$cuser = CFactory::getUser($row->user->id);
echo $cuser->getInfo('FIELD_GENDER');
?>

into the file:people.browse.php

The result is:
Anna
COM_COMMUNITY_MALE
1 Freund

What has gone wrong?


The changes were copied in the folder;
/components/com_community/templates/jomsocial/layouts/people.browse.php
because there was no folder to copy this into:
/templates/yoo_monday/html/com_community/layouts/people.browse.php

Thank you, Hermann

7 years 5 months ago
Licenses:

HI, Herman.

All is fine, just this particular field contain language constant - it's stored like that in DB :)
So in this case you'll need to wrap it with Joomla! "parsing command":

echo JText::_($cuser->getInfo('FIELD_GENDER'));

In other cases where field contain other data you use it without jText.


- Instead of saying: 'it's not working', explain the problem in detail.
- Screenshots with the URL visible in them and the problem marked are more than welcome.
- Tell us how to replicate the problem, we can't fix it if we can't find it.
- Make sure that your site/server meets JomSocial System Requirements
- Make sure to setup JomSocial Cron Job
- Always provide us with access details to the backend and ftp. We need it to debug problems.
- If you have a similar problem, but a solution you found isn't working, open a new thread instead of 'merging' with an existing one.

- Use the "Thank You" feature on any post that helped you
7 years 5 months ago
  • Hermann's Avatar
    Topic Author
  • Hermann
  • Offline
  • Fresh Boarder
  • Posts: 3
  • Thank you received: 0
Licenses:
JomSocial Active Socialize Expired

Wonderful! Thank you very much!

The result now is:
Sportpartner
Männlich Steiermark 1 Freund

better would be:
Sportpartner
Männlich
Steiermark
1 Freund

I wanted to insert the <br> and a "blank" into the code , but it doesnt work.

The Code now is;
<?php
// custom field FIELD_POSITION
$cuser = CFactory::getUser($row->user->id);
echo JText::_($cuser->getInfo('FIELD_GENDER'));
echo $cuser->getInfo('FIELD_STATE');

?>

On the demo site; demo.jomsocial.com
At the top of this site is a Log-in/sign in bar: is this a module or plugin?

Many thanks in advance.

7 years 5 months ago
Licenses:

Hi, Hermann.

You can't add just <br> into php code. If you want them in a list you need to add it like this:

echo JText::_($cuser->getInfo('FIELD_GENDER')) . '<br />';
echo $cuser->getInfo('FIELD_STATE') . '<br />';

You probably mean JS Toolbar. It's an addon to JomSocial available here: www.jomsocial.com/products/products/7-modules/45-toolbar/215


- Instead of saying: 'it's not working', explain the problem in detail.
- Screenshots with the URL visible in them and the problem marked are more than welcome.
- Tell us how to replicate the problem, we can't fix it if we can't find it.
- Make sure that your site/server meets JomSocial System Requirements
- Make sure to setup JomSocial Cron Job
- Always provide us with access details to the backend and ftp. We need it to debug problems.
- If you have a similar problem, but a solution you found isn't working, open a new thread instead of 'merging' with an existing one.

- Use the "Thank You" feature on any post that helped you
The following user(s) said Thank You: Hermann
7 years 5 months ago
  • Hermann's Avatar
    Topic Author
  • Hermann
  • Offline
  • Fresh Boarder
  • Posts: 3
  • Thank you received: 0
Licenses:
JomSocial Active Socialize Expired

Hi, I have a small question about this topic again:

I`ld like to insert the age of the members into the members list, but not the birthday.

I tried something like this:
echo $cuser->getInfo('FIELD_BIRTHDAY') . '<br />'; ==> shows birthday
echo $cuser->getInfo('FIELD_AGE') . '<br />'; ==> shows nothing

How can I do this?

Thank you very much! Hermann

7 years 4 months ago
Licenses:

HI, Hermann.

Please, edit your first post here and provide working backend credentials.
I need to see what FIELD_AGE is.


- Instead of saying: 'it's not working', explain the problem in detail.
- Screenshots with the URL visible in them and the problem marked are more than welcome.
- Tell us how to replicate the problem, we can't fix it if we can't find it.
- Make sure that your site/server meets JomSocial System Requirements
- Make sure to setup JomSocial Cron Job
- Always provide us with access details to the backend and ftp. We need it to debug problems.
- If you have a similar problem, but a solution you found isn't working, open a new thread instead of 'merging' with an existing one.

- Use the "Thank You" feature on any post that helped you
7 years 4 months ago
  • Hermann's Avatar
    Topic Author
  • Hermann
  • Offline
  • Fresh Boarder
  • Posts: 3
  • Thank you received: 0
Licenses:
JomSocial Active Socialize Expired

I tried this field. I think it does Not exist.
Howard can i Show the age of members in the List?

7 years 4 months ago
Licenses:

HI, Hermann.

You can't call fields that doesn't exist. :)
Age is calculated basing on birthdate... but this field contains date only.
So you'll need to call birthdate, change exit data into timestamp, then count difference between current date and birth date, change it into full years and display as number. You'll need few php commands to do that.
As much as I'd love to help, providong full solution here is beyond what we're able to do for customers.
Please, post on stackoverflow.com and ask how to turn date in age in php.


- Instead of saying: 'it's not working', explain the problem in detail.
- Screenshots with the URL visible in them and the problem marked are more than welcome.
- Tell us how to replicate the problem, we can't fix it if we can't find it.
- Make sure that your site/server meets JomSocial System Requirements
- Make sure to setup JomSocial Cron Job
- Always provide us with access details to the backend and ftp. We need it to debug problems.
- If you have a similar problem, but a solution you found isn't working, open a new thread instead of 'merging' with an existing one.

- Use the "Thank You" feature on any post that helped you
7 years 4 months ago
  • Hermann's Avatar
    Topic Author
  • Hermann
  • Offline
  • Fresh Boarder
  • Posts: 3
  • Thank you received: 0
Licenses:
JomSocial Active Socialize Expired

Ok thank you.
And if i wann to List only the year?
Is this possible to get??

7 years 4 months ago
Licenses:

Hi, Hermann.

Yes, you may have different output from that filed, just use php date manipulation tags ;)
stackoverflow.com/questions/4529640/get-...m-specified-date-php


- Instead of saying: 'it's not working', explain the problem in detail.
- Screenshots with the URL visible in them and the problem marked are more than welcome.
- Tell us how to replicate the problem, we can't fix it if we can't find it.
- Make sure that your site/server meets JomSocial System Requirements
- Make sure to setup JomSocial Cron Job
- Always provide us with access details to the backend and ftp. We need it to debug problems.
- If you have a similar problem, but a solution you found isn't working, open a new thread instead of 'merging' with an existing one.

- Use the "Thank You" feature on any post that helped you
7 years 4 months ago
  • Hermann's Avatar
    Topic Author
  • Hermann
  • Offline
  • Fresh Boarder
  • Posts: 3
  • Thank you received: 0
Licenses:
JomSocial Active Socialize Expired

Thank you very much, I tried several codes, described at this link, but none worked, I think I made mistakes, because I dont understand it.

Please could you be so nice, and write me the correct code in the following one, I use now:

<?php
// custom field FIELD_POSITION
$cuser = CFactory::getUser($row->user->id);
echo JText::_($cuser->getInfo('FIELD_GENDER')) . '<br />';
echo JText::_($cuser->getInfo('FIELD_ACTIVITIES')) . '<br />';
echo $cuser->getInfo('FIELD_STATE') . '<br />';

?>

Many thanks in advance! Hermann

7 years 4 months ago
Licenses:

Hi, Hermann.

Your current code seems to be fine.
I'll prepare a snippet for date in spare time ;)


- Instead of saying: 'it's not working', explain the problem in detail.
- Screenshots with the URL visible in them and the problem marked are more than welcome.
- Tell us how to replicate the problem, we can't fix it if we can't find it.
- Make sure that your site/server meets JomSocial System Requirements
- Make sure to setup JomSocial Cron Job
- Always provide us with access details to the backend and ftp. We need it to debug problems.
- If you have a similar problem, but a solution you found isn't working, open a new thread instead of 'merging' with an existing one.

- Use the "Thank You" feature on any post that helped you
Moderators: Piotr Garasiński
Powered by Kunena Forum

Join 180,000 websites creating Amazing communities

JomSocial is the most complete, easy-to-use addon that turns Joomla CMS into a
full -fledged, social networking site

TRY NOW BUY NOW