I would like to modify what menu items show up on the advanced search feature as well as what details are listed when a search is returned. Can you please tell me which core files I would need to modify to remove/change some of the displayed options?
Hi Kimberly,
here the files related for advance search result.
/components/com_community/search.advancesearch.php
/components/com_community/views/search/view.html.php
/com_community/templates/default/people.browse.php
Thank you! i have been able to remove most of the functions I do not need.
I am now attempting to place a few links with pre-defined searches on the Advanced Search sub menu bar, specifically by each profile type. I have already created a searchable field called 'Profile Type'. The search works however I am having some troubles adding the correct line within /components/com_community/views/search/view.html.php.
What would be the correct syntax to accomplish this?
Hi Kimberly
at /components/com_community/views/search/view.html.php. At line 44 - 45, you can find the code start with
$this->addSubmenuItem
$this->addSubmenuItem('index.php/search/advancesearch?field0=FIELD_PROFILE_TYPE&condition0=equal&value0=Organization&fieldType0=radio&operator=and&option=com_community&key-list=0', 'Organization');
Thank you for all your help!
I would now like to remove the "already freinds" or "add as friend" options within the search results.
Which core files and what do I need to modify to remove this feature?
Hi Kimberly,
For that, please follow this steps:
1. make override
Copy /components/com_community/templates/default/people.browse.php To /templates/your-template/html/com_community/people.browse.php
2. edit the new file:
remove this code at lines 212 - 224
<div>
<?php if(isset($row->isMyFriend) && $row->isMyFriend==1){ ?>
<i class="com-icon-info"></i>
<a href="javascript:void(0)" onclick="joms.friends.connect('<?php echo $row->user->id;?>')"><span><?php echo JText::_('COM_COMMUNITY_PROFILE_PENDING_FRIEND_REQUEST'); ?></span></a>
<?php } else { ?>
<?php if(!$isWaitingApproval){?>
<i class="com-icon-user-plus"></i>
<a href="javascript:void(0)" onclick="joms.friends.connect('<?php echo $row->user->id;?>')"><span><?php echo JText::_('COM_COMMUNITY_PROFILE_ADD_AS_FRIEND'); ?></span></a>
<?php }else{ ?>
<i class="com-icon-info"></i> <span><?php echo JText::_('COM_COMMUNITY_PROFILE_PENDING_FRIEND_REQUEST'); ?></span>
<?php }?>
<?php } ?>
</div>
[code]
[code]
remove the code at lines 234 - 236:
<div>
<i class="com-icon-tick"></i> <span><?php echo JText::_('COM_COMMUNITY_PROFILE_ADDED_AS_FRIEND'); ?></span>
</div>
Hi Kimberly,
you can put it after line 43, between
else {
.....
.....
.....
}
Hi Kimberly,
We have not received any response back from you in over 7 days, and would like to know if you consider this issue to be resolved. If you have any further questions, simply reply to this post.
Regards,
Albert