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.

Listing Custome Profile fields

11 years 1 week ago
  • Paul's Avatar
    Topic Author
  • Paul
  • Offline
  • Fresh Boarder
  • Posts: 15
  • Thank you received: 0
Licenses:
JomSocial Expired

Hi,

I'm busy upgrading this installation to the latest version of JS.

For the time being, members are not allowed to edit their profile.However, they're allowed to see how their profile look like. So in Custom Profile I set all fields to Read Only. Unfortunately that's not working.

How can I simple show a list of all custom profile fields?

Paul





However, I need to create a page where a list of the custom profile fields is shown.

11 years 1 week ago
Licenses:

Hi, Paul.

You mean that you want to forbid users to change field values?
Or you want to display values for all fields somewhere else that in About me?


- 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
11 years 1 week ago
  • Paul's Avatar
    Topic Author
  • Paul
  • Offline
  • Fresh Boarder
  • Posts: 15
  • Thank you received: 0
Licenses:
JomSocial Expired

Hi Michael,

Thank you for your prompt response!

Actually, I want to have both. Visitors should be able how their profile looks like, but not be able to edit the information shown.

11 years 1 week ago
Licenses:

Hi, Paul.

1. Prevent users to edit their profile field.
Well as not all fields could be blocked than disabling toolbar links to edit profile data seems to be best solution.

Copy this file:

ROOT/components/com_community/templates/default/profile.about.php

to

ROOT/templates/your_template/html/com_community (if you don't have "html" or "com_community" folders, feel free to create them)

Edit file and in line 112 change this:

<?php if ($isMine): ?>
            <a class="edit-this" href="<?php echo CRoute::_('index.php?option=com_community&view=profile&task=edit'); ?>" title="<?php echo JText::_('COM_COMMUNITY_PROFILE_EDIT'); ?>"><?php echo JText::_('COM_COMMUNITY_PROFILE_EDIT'); ?></a>
        <?php endif; ?>

with this:

<?php /* if ($isMine): ?>
            <a class="edit-this" href="<?php echo CRoute::_('index.php?option=com_community&view=profile&task=edit'); ?>" title="<?php echo JText::_('COM_COMMUNITY_PROFILE_EDIT'); ?>"><?php echo JText::_('COM_COMMUNITY_PROFILE_EDIT'); ?></a>
        <?php endif; */ ?>

Now copy the same way this file:

ROOt/components/com_community/templates/default/profile.edit.php

Edit it in line 17 and remove completely:
<li><a href="#basicSet"><?php echo JText::_('COM_COMMUNITY_PROFILE_SETTING_INFO');?></a></li>

2. Displaying user fields values elsewhere

This could be done by using sql query:
docs.joomla.org/Selecting_data_using_JDatabase


- 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: Paul
11 years 1 week ago
  • Paul's Avatar
    Topic Author
  • Paul
  • Offline
  • Fresh Boarder
  • Posts: 15
  • Thank you received: 0
Licenses:
JomSocial Expired

Hi Michal,

Indeed this is the best way to prevent that profiles are edited.

Thank you very much!

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