Skip to content

Commit c7a53ca

Browse files
author
Maverick
committed
Merge pull request #9 from Ruud68/master
Hide/show author about text in users overview depending on core.showp…
2 parents 97b6734 + 281a1e7 commit c7a53ca

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

site/views/users/tmpl/default.php

+13-11
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@
99
* @license License GNU General Public License version 2 or later
1010
*/
1111
defined ( '_JEXEC' ) or die ( 'Restricted access' );
12-
$itemid = CJFunctions::get_active_menu_id();
13-
$page_heading = $this->params->get('page_heading');
14-
$active_id = 2;
15-
$api = new CjLibApi();
16-
$avatarApp = $this->params->get('avatar_component', 'cjblog');
17-
$profileApp = $this->params->get('profile_component', 'cjblog');
18-
$layout = $this->params->get('layout', 'default');
19-
$editor = $this->params->get('default_editor', 'wysiwygbb');
20-
$bbcode = $editor == 'wysiwygbb' ? true : false;
12+
$itemid = CJFunctions::get_active_menu_id();
13+
$page_heading = $this->params->get('page_heading');
14+
$active_id = 2;
15+
$api = new CjLibApi();
16+
$avatarApp = $this->params->get('avatar_component', 'cjblog');
17+
$profileApp = $this->params->get('profile_component', 'cjblog');
18+
$layout = $this->params->get('layout', 'default');
19+
$editor = $this->params->get('default_editor', 'wysiwygbb');
20+
$bbcode = $editor == 'wysiwygbb' ? true : false;
2121
?>
2222

2323
<div id="cj-wrapper">
@@ -46,11 +46,13 @@
4646
$showProfile = JFactory::getUser($user['id'])->authorise('core.showprofile', 'com_cjblog');
4747
if ($showProfile)
4848
{
49-
$profileUrl = $api->getUserProfileUrl($profileApp, $user['id']);
49+
$profileUrl = $api->getUserProfileUrl($profileApp, $user['id']);
50+
$aboutText = strip_tags(JHtml::_('string.truncate', CJFunctions::parse_html($user['about'], false, $bbcode), 250));
5051
}
5152
else
5253
{
5354
$profileUrl = "#";
55+
$aboutText = "";
5456
}
5557

5658
?>
@@ -77,7 +79,7 @@
7779
<span class="margin-right-10"><?php echo JText::_('LBL_BADGES').': '.$user['num_badges'];?></span>
7880
</div>
7981
<div class="muted padbottom-5">
80-
<?php echo strip_tags(JHtml::_('string.truncate', CJFunctions::parse_html($user['about'], false, $bbcode), 250));?>
82+
<?php echo $aboutText;?>
8183
</div>
8284
</div>
8385
</div>

0 commit comments

Comments
 (0)