By Edgar on Monday, 15 June 2015
Posted in General Issues
Replies 3
Likes 0
Views 0.9K
Votes 0
Hello,

I would like to know if it's possible to modify the page created automatically by Easysocial :
community/users :

0)a) Is it possible to limit the access to this page ?
0)b Is possible to remove all this page ?

At least, is it possible to modify these points as shown on the screenshot :
1) How can I remove the filter "Users with photo" ? (1)
2) How can I remove "Add friend" ? (2)
3) Is it possible to limit access to this module ? Or to remove it ?
4) How can I hide the number of members of each profile ?


Sorry for all these questions and thanks a lot for your answers,

Edgar
Hi Edgar,

I'm sorry for the late reply.
Yes, it is possible to limit the access to this page but it is part of a customization.

You may try goto JoomlaFolder\components\com_easysocial\views\users\view.html.php
return $this->redirect(FRoute::dashboard(array(), false));
under display function
when the user trying to access this page, then it will redirect back to dashboard
second , make sure turn off this
http://screen.stackideas.com/2015-06-15_1608.png
so the * Browse Users * menu will not appear on Easysocial toolbar.

Hope this suits your needs.

If this doesn't fits your needs, Do Backup the these two files in your
Joomlafolder\componets\com_easysocial\themes\wireframe\users\default.php
Joomlafolder\components\com_easysocial\themes\wireframe\users\default.list.php

1. Goto Joomlafolder\componets\com_easysocial\themes\wireframe\users\default.php at line 42 - 50
<li class="<?php echo $filter == 'photos' ? 'active' : '';?>">
<a href="<?php echo FRoute::users( array( 'filter' => 'photos' ) );?>"
data-users-filter
data-filter="photos"
title="<?php echo JText::_( 'COM_EASYSOCIAL_PAGE_TITLE_USERS_WITH_PHOTOS' , true );?>"
>
<?php echo JText::_( 'COM_EASYSOCIAL_USERS_FILTER_USERS_WITH_PHOTOS' );?>
</a>
</li>


2. Goto Joomlafolder\components\com_easysocial\themes\wireframe\users\default.list.php
									<span>
<?php if( $user->isFriends( $this->my->id ) ){ ?>
<?php echo $this->loadTemplate( 'site/users/button.friends' ); ?>
<?php } else { ?>
<?php if( $user->getFriend( $this->my->id )->state == SOCIAL_FRIENDS_STATE_PENDING ){ ?>
<?php echo $this->loadTemplate( 'site/users/button.pending' ); ?>
<?php } else { ?>
<?php echo $this->loadTemplate( 'site/users/button.add' , array( 'user' => $user ) ); ?>
<?php } ?>
<?php } ?>
</span>
at line 218-228


3. Goto Joomlafolder\componets\com_easysocial\themes\wireframe\users\default.php
	<div class="es-widget es-widget-borderless">
<div class="es-widget-head">
<div class="widget-title pull-left">
<?php echo JText::_('COM_EASYSOCIAL_USERS_BROWSE_BY_PROFILES');?>
</div>
</div>
at line 89 -94

4. Goto Joomlafolder\componets\com_easysocial\themes\wireframe\users\default.php
<span class="es-count-no pull-right"><?php echo $profile->totalUsers;?></span>
at line 107
·
Monday, 15 June 2015 16:55
·
0 Likes
·
0 Votes
·
0 Comments
·
Great ! Thanks for your long answer

So I'm going to remove the access to the page.
You said :
You may try goto JoomlaFolder\components\com_easysocial\views\users\view.html.php

return $this->redirect(FRoute::dashboard(array(), false));


But I don't find where I have to write this ? In the first line of the file ?

Thanks a lot,

Edgar
·
Tuesday, 16 June 2015 01:51
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Edgar,

Within the * display * function , add this code of line ### return $this->redirect(FRoute::dashboard(array(), false)); ###
at JoomlaFolder\components\com_easysocial\views\users\view.html.php

Check my screen shot: http://screencast.com/t/fmi61oCT
Can you give it a try and let us know about this?
·
Tuesday, 16 June 2015 11:48
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post