Hi Mark,
Ok,
I'll take the Theme override route.
Thanks for confirming Mark.
For whoever wants to do the same, what I did is I created my own Theme by copying Frosty, edit
template.json and change the template info to whatever you want and copy 2 files in components/com_easysocial/themes/wireframes/search/
- default.content.php
- default.list.mini.php
Take note that Frosty is just an override of Wireframe, any files that is not in Frosty folder means it is not overwritten and still using whatever Wireframe layout is. You can find more info in the
Documentation.
Open default.content.php and go to line #31
<div class="row">
<div class="col-md-12">
<div class="pull-right mr-10 fd-small">
<a href="<?php echo FRoute::search( array( 'layout' => 'advanced' ) ); ?>"><?php echo JText::_( 'COM_EASYSOCIAL_ADVANCED_SEARCH_LINK' ); ?></a>
</div>
</div>
</div>
Modify it to something like this:
<?php
// get user's profile
$profile = $this->my->getProfile();
// check for user's profile to show Advanced Search
if( $profile->title == 'Site Admin' || $profile->title == 'Staff' )
{
?>
<div class="row">
<div class="col-md-12">
<div class="pull-right mr-10 fd-small">
<a href="<?php echo FRoute::search( array( 'layout' => 'advanced' ) ); ?>"><?php echo JText::_( 'COM_EASYSOCIAL_ADVANCED_SEARCH_LINK' ); ?></a>
</div>
</div>
</div>
<?php } ?>
In my case, I have 2 Profiles named Site Admin and Staff that I want to have access to Advanced Search. You have to change 'Site Admin' to whatever Profile name you want. If you only have one profile, the if statement should look like :
if( $profile->title == 'Site Admin' )
{
For the Toolbar search, you have to edit default.list.mini.php. Look for line #49 and #58. See Attachment.
// line #49
<div class="text-center fd-small">
<?php echo JText::sprintf( 'COM_EASYSOCIAL_ADVANCED_SEARCH_TRY_ADVANCED_SEARCH', FRoute::search( array( 'layout' => 'advanced' ) ) ); ?>
</div>
Change to:
// line #49
<?php if( $profile->title == 'Site Admin' ) { ?>
<div class="text-center fd-small">
<?php echo JText::sprintf( 'COM_EASYSOCIAL_ADVANCED_SEARCH_TRY_ADVANCED_SEARCH', FRoute::search( array( 'layout' => 'advanced' ) ) ); ?>
</div>
<?php } ?>
// line #58
<?php if( $profile->title == 'Site Admin' ) { ?>
<div class="fd-small">
<?php echo JText::sprintf( 'COM_EASYSOCIAL_ADVANCED_SEARCH_TRY_ADVANCED_SEARCH', FRoute::search( array( 'layout' => 'advanced' ) ) ); ?>
</div>
<?php } ?>
Hope that helps
if you need more ask Mark hahaha
- something is wrong with the editor not rendering code properly