can't totally remove the Logo

GK User
Sat Apr 03, 2010 11:12 am
when trying to rmeove the logo (in order to use my own Header Design that inbcludes a logo) i can either use the Image option, or the Text option (from the Admin),
however if i chose Text, i can't laeve it blank - i get the following errors :

Notice: Undefined variable: config in <...>TestSitetemplatesgk_party_freaklayoutsblocksmainnav.php on line 14

Notice: Trying to get property of non-object in <...>TestSitetemplatesgk_party_freaklayoutsblocksmainnav.php on line 14
SITE SLOGAN


how can i override this?
User avatar
Senior Boarder

teitbite
Tue Apr 06, 2010 12:29 pm
Hi

I do not understand. Could You please explain it a little bit more.
User avatar
Moderator

GK User
Tue Apr 06, 2010 12:37 pm
hi, yes.
in the Template's options i can choose if i want a Picture logo, or if i want Text logo.
however, i have a Header which i inserted into the Background, so i chose Text and left the Text fields empty. then i got this error message:


Notice: Undefined variable: config in <...>TestSitetemplatesgk_party_freaklayoutsblocksmainnav.php on line 14

Notice: Trying to get property of non-object in <...>TestSitetemplatesgk_party_freaklayoutsblocksmainnav.php on line 14
SITE SLOGAN


looks like i can't insert an empty string. can this be overwritten, or you need to fix the code?
User avatar
Senior Boarder

GK User
Tue Apr 06, 2010 12:39 pm
b.t.w - did u insert the fix i did for the other 2 problems? ;-)
User avatar
Senior Boarder

teitbite
Wed Apr 07, 2010 11:30 am
Hi

If You want to complitly remove the logo form site please go to templates/gk_party_freaks/layouts/blocks/mainnav.php and remove this code:

Code: Select all
   <?php
      $siteName = $this->sitename();
      if ($this->getParam('logoType')=='image'):
   ?>
   
   <h1 class="logo">
      <a href="index.php" title="<?php echo $siteName; ?>"><span><?php echo $siteName; ?></span></a>
   </h1>
   
   <?php else : ?>
      
      <?php
         $logoText = (trim($this->getParam('logoType-text-logoText'))=='') ? $config->sitename : $this->getParam('logoType-text-logoText');
         $sloganText = (trim($this->getParam('logoType-text-sloganText'))=='') ? JText::_('SITE SLOGAN') : $this->getParam('logoType-text-sloganText');
      ?>
   
   <div class="logo-text">
      <h1><a href="index.php" title="<?php echo $siteName; ?>"><span><?php echo $logoText; ?></span></a></h1>
      <p class="site-slogan"><?php echo $sloganText;?></p>
   </div>
         
   <?php endif; ?>



Thoose are lines form 2 - 23.



What 2 other problems?
User avatar
Moderator

GK User
Wed Apr 07, 2010 11:37 am
teitbite wrote:
Hi

If You want to complitly remove the logo form site please go to templates/gk_party_freaks/layouts/blocks/mainnav.php and remove this code:

Code: Select all
   <?php
      $siteName = $this->sitename();
      if ($this->getParam('logoType')=='image'):
   ?>
   
   <h1 class="logo">
      <a href="index.php" title="<?php echo $siteName; ?>"><span><?php echo $siteName; ?></span></a>
   </h1>
   
   <?php else : ?>
      
      <?php
         $logoText = (trim($this->getParam('logoType-text-logoText'))=='') ? $config->sitename : $this->getParam('logoType-text-logoText');
         $sloganText = (trim($this->getParam('logoType-text-sloganText'))=='') ? JText::_('SITE SLOGAN') : $this->getParam('logoType-text-sloganText');
      ?>
   
   <div class="logo-text">
      <h1><a href="index.php" title="<?php echo $siteName; ?>"><span><?php echo $logoText; ?></span></a></h1>
      <p class="site-slogan"><?php echo $sloganText;?></p>
   </div>
         
   <?php endif; ?>



Thoose are lines form 2 - 23.



What 2 other problems?



why not remove the Trim in :

Code: Select all
<?php
         $logoText = (trim($this->getParam('logoType-text-logoText'))=='') ? $config->sitename : $this->getParam('logoType-text-logoText');
         $sloganText = (trim($this->getParam('logoType-text-sloganText'))=='') ? JText::_('SITE SLOGAN') : $this->getParam('logoType-text-sloganText');
      ?>


if i remove the trim, the spaces in the beginning wont get trimmed (not that good) but i will be able to insert an empty space there, no
another soution = i can put ' ' instead of SITE SLOGAN, right?

about the 2 other problems - i'll link to the other disucssion i opened about them.
User avatar
Senior Boarder

GK User
Wed Apr 07, 2010 11:46 am
i mean, i can simply change to this
Code: Select all
 <?php
$logoText = (trim($this->getParam('logoType-text-logoText'))=='') ? JText::_(' ')  : $this->getParam('logoType-text-logoText');
$sloganText = (trim($this->getParam('logoType-text-sloganText'))=='') ? JText::_(' ') : $this->getParam('logoType-text-sloganText');
?>


right?
User avatar
Senior Boarder

teitbite
Thu Apr 08, 2010 8:41 pm
Hi

Yes You can do like You wrote, both solutions are good :) By "totally remove" I understood delete the code which is loading the logo/slogan.
User avatar
Moderator

GK User
Sat Apr 10, 2010 5:48 pm
my code worked, i got what i wanted :-).
maybe you can add it as an option? to not put anything (not logo lor text) in the header?
User avatar
Senior Boarder


cron