hi staff,
we like reduce the top community area into the restricted site (after the login). How we can remove the LOGO bar from only registered users?
Hi, Brokerad.
(WARNING! Core file hack! Please, make safe copy of edited file. It means also that this file will be overwritten during upgrade, so please make a safe copy of customized file as well. Some core hacks could not working with future JomSocial releases and/or cause issues that will be not supported)
Edit this file:
ROOT/templates/socialize/tpls/blocks/header-jb.php
Replace this (line 17-59):
<header id="t3-header" class="t3-header">
<div class="container">
<div class="row">
<!-- LOGO -->
<div class="span8 logo">
<div class="logo-<?php echo $logotype, ($logoimgsm ? ' logo-control' : '') ?>">
<a href="<?php echo JURI::base(true) ?>" title="<?php echo strip_tags($sitename) ?>">
<?php if($logotype == 'image'): ?>
<img class="logo-img" src="<?php echo JURI::base(true) . '/' . $logoimage ?>" alt="<?php echo strip_tags($sitename) ?>" />
<?php endif ?>
<?php if($logoimgsm) : ?>
<img class="logo-img-sm" src="<?php echo JURI::base(true) . '/' . $logoimgsm ?>" alt="<?php echo strip_tags($sitename) ?>" />
<?php endif ?>
<span><?php echo $sitename ?></span>
</a>
<small class="site-slogan hidden-phone"><?php echo $slogan ?></small>
</div>
</div>
<!-- //LOGO -->
<?php if($this->countModules('head-search or languageswitcherload')): ?>
<div class="span4 clearfix">
<?php if ($this->countModules('head-search')) : ?>
<!-- HEAD SEARCH -->
<div class="head-search<?php $this->_c('head-search')?>">
<jdoc:include type="modules" name="<?php $this->_p('head-search') ?>" style="raw" />
</div>
<!-- //HEAD SEARCH -->
<?php endif ?>
<?php if ($this->countModules('languageswitcherload')) : ?>
<!-- LANGUAGE SWITCHER -->
<div class="languageswitcherload">
<jdoc:include type="modules" name="<?php $this->_p('languageswitcherload') ?>" style="raw" />
</div>
<!-- //LANGUAGE SWITCHER -->
<?php endif ?>
</div>
<?php endif ?>
</div>
</div>
</header>
<?php
$user = JFactory::getUser();
if($user->id == '0') {
?>
<header id="t3-header" class="t3-header">
<div class="container">
<div class="row">
<!-- LOGO -->
<div class="span8 logo">
<div class="logo-<?php echo $logotype, ($logoimgsm ? ' logo-control' : '') ?>">
<a href="<?php echo JURI::base(true) ?>" title="<?php echo strip_tags($sitename) ?>">
<?php if($logotype == 'image'): ?>
<img class="logo-img" src="<?php echo JURI::base(true) . '/' . $logoimage ?>" alt="<?php echo strip_tags($sitename) ?>" />
<?php endif ?>
<?php if($logoimgsm) : ?>
<img class="logo-img-sm" src="<?php echo JURI::base(true) . '/' . $logoimgsm ?>" alt="<?php echo strip_tags($sitename) ?>" />
<?php endif ?>
<span><?php echo $sitename ?></span>
</a>
<small class="site-slogan hidden-phone"><?php echo $slogan ?></small>
</div>
</div>
<!-- //LOGO -->
<?php if($this->countModules('head-search or languageswitcherload')): ?>
<div class="span4 clearfix">
<?php if ($this->countModules('head-search')) : ?>
<!-- HEAD SEARCH -->
<div class="head-search<?php $this->_c('head-search')?>">
<jdoc:include type="modules" name="<?php $this->_p('head-search') ?>" style="raw" />
</div>
<!-- //HEAD SEARCH -->
<?php endif ?>
<?php if ($this->countModules('languageswitcherload')) : ?>
<!-- LANGUAGE SWITCHER -->
<div class="languageswitcherload">
<jdoc:include type="modules" name="<?php $this->_p('languageswitcherload') ?>" style="raw" />
</div>
<!-- //LANGUAGE SWITCHER -->
<?php endif ?>
</div>
<?php endif ?>
</div>
</div>
</header>
<?php } ?>
<?php
$user = JFactory::getUser();
if($user->id == '0') {
?>
if($user->id > '0')
Hi daniel,
We install the last version of template and this condition it is not working :(
P.s. With new version of JS and template we spent 2 day for upgrade and now is not all resolved too.
Hi, Brokerad.
This is an updated method for Socialize 2:
Edit this file: ROOT/templates/socialize/tpls/default.php (I presume that you're using default Socialize layout. If not. Just do the same for layout of your choice.
Change this (line 38);
<?php $this->loadBlock('header') ?>
<?php
$user = JFactory::getUser();
if($user->id == 0) {
$this->loadBlock('header');
}
?>
HI, Brokerad.
I updated my code. A simple change from != to == ;)