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.

display additional field in Search Results

9 years 7 months ago
  • Mike's Avatar
    Topic Author
  • Mike
  • Offline
  • Fresh Boarder
  • Posts: 20
  • Thank you received: 0
Licenses:
JomSocial Active

Please can you tell us which file to amend so that we can add additional fields to search results(such as Country field from User profile). Please see attached

Attachments:
9 years 7 months ago
Licenses:

Hi, Mike.

List is created here: ROOT/components/com_community/templates/default/people.browse.php
You can create override and customize file to display additional information from profile.


- 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
9 years 7 months ago
  • Mike's Avatar
    Topic Author
  • Mike
  • Offline
  • Fresh Boarder
  • Posts: 20
  • Thank you received: 0
Licenses:
JomSocial Active

Hi Michal,

Thanks for your reply. We have amended the file people.browse.php and we can display the company name by each user by using the following code:

<div class="cIndex-Content">
<h3 class="cIndex-Name cResetH">
<a href="<?php echo $row->profileLink; ?>"><?php echo $row->user->getDisplayName(); ?></a>
<span class="small"><?php echo $row->user->getInfo('Firm'); ?></span>
</h3>

However when we try to add the country name by each user adding the following code:
<span class="small"><?php echo $row->user->getInfo('Country'); ?></span>

we get the attached display (people.browse.jpg). It displays com_community_lang_name. The code worked fine for jomsocial 2. Can you tell us what field we need to echo to show the country name rather than what is being displayed.

Attached also is the field names in the admin view (jomsocialadmin.jpg).

Thanks

Attachments:
9 years 6 months ago
Licenses:

Hi, Mike.

It's because country names in database are stored as language constants.
You need to load constant to variable an then try to decode it with 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
9 years 6 months ago
  • Mike's Avatar
    Topic Author
  • Mike
  • Offline
  • Fresh Boarder
  • Posts: 20
  • Thank you received: 0
Licenses:
JomSocial Active

Hi Michal,

Thanks for your reply. I am not very good in this area, please can you give me an example that i can use?

9 years 6 months ago
Licenses:

Hi, Mike.

jText::_($somevariable)

I advise to ask professional developer for help: www.jomsocial.com/jomsocial-developers


- 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