Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11
  1. #1
    Junior Member
    Join Date
    Aug 2011
    Posts
    6
    Member #
    29154
    [SIZE=10px][COLOR=rgb(50, 61, 79)]I know it sounds weird but I actually want to exclude my "logo" on the homepage and homepage only. Not sure what excluding css / html remarks I might need to make.

    Here is part of my index.php from my templatemonster template:

    <div id="jbg-content" class="all">
    <div id="header">
    <div id="head">
    <div class="logoheader">
    <h1 id="logo">

    <?php if ($logo): ?>
    <a href="<?php echo $this->baseurl?>"><img src="<?php echo $this->baseurl ?>/<?php echo htmlspecialchars($logo); ?>" alt="<?php echo htmlspecialchars($templateparams->get('sitetitle'));?>" /></a>
    <?php endif;?>
    <?php if (!$logo ): ?>
    <?php echo htmlspecialchars($templateparams->get('sitetitle'));?>
    <?php endif; ?>
    <span class="header1">
    <?php echo htmlspecialchars($templateparams->get('sitedescription'));?>
    </span></h1>
    </div> </div><!-- end logoheader -->

    <div class="menublock">
    <jdoc:include type="modules" name="position-1" />
    </div>


    </div><!-- end header -->



    I know there's a way but just can't seem to find anything. Thanks in advance!


    [/COLOR]
    [/SIZE]

  2.  

  3. #2
    Senior Member Ganners's Avatar
    Join Date
    Feb 2011
    Location
    United Kingdom
    Posts
    415
    Member #
    27007
    Liked
    92 times
    You'd use php for it. You could if you wanted use it to hide the logo with CSS. So for that you'd probably do something like..

    turn:

    PHP Code:
    <?php if ($logo): ?>
    <a href="<?php echo $this->baseurl?>"><img src="<?php echo $this->baseurl ?>/<?php echo htmlspecialchars($logo); ?>" alt="<?php echo htmlspecialchars($templateparams->get('sitetitle'));?>" /></a>
    <?php endif;?>
    into

    PHP Code:
    <?php if ($logo): ?>
    <a href="<?php echo $this->baseurl?>">
    <img src="<?php echo $this->baseurl ?>/<?php echo htmlspecialchars($logo); ?>"
    alt="<?php echo htmlspecialchars($templateparams->get('sitetitle'));?>"
    style="<?php print (is_null($_SERVER["REQUEST_URI"]) ? "display:none" ""); ?>;" /></a>
    <?php endif;?>
    This will check if there is no request URI (assuming your homepage is like http://example.com/ and not http://example.com/home). This isn't tried or tested but should work, basic php :X.
    Mark Gannaway Software Developer

    Recent Experiments
    - Backpropogation Neural Network language solving (http://ann.ganners.co.uk/)
    - Animated image to ASCII (http://google.ganners.co.uk/)
    - 3D Paper Characters (http://cybergame.ganners.co.uk/)
    - Anagram solving (http://roflol.co.uk/)

  4. #3
    Junior Member
    Join Date
    Aug 2011
    Posts
    6
    Member #
    29154
    hmmm. Can't see, to make it work This is how I replaced it:

    [SIZE=10px][COLOR=rgb(50, 61, 79)]<div id="jbg-content" class="all">
    <div id="header">
    <div id="head">
    <div class="logoheader">
    <h1 id="logo">

    [COLOR=rgb(0, 0, 0)][COLOR=rgb(0, 119, 0)]<?[/COLOR][COLOR=rgb(0, 0, 187)]php [/COLOR][COLOR=rgb(0, 119, 0)]if ([/COLOR][COLOR=rgb(0, 0, 187)]$logo[/COLOR][COLOR=rgb(0, 119, 0)]): [/COLOR][COLOR=rgb(0, 0, 187)]?>
    [/COLOR]<a href="[COLOR=rgb(0, 0, 187)]<?php [/COLOR][COLOR=rgb(0, 119, 0)]echo [/COLOR][COLOR=rgb(0, 0, 187)]$this[/COLOR][COLOR=rgb(0, 119, 0)]->[/COLOR][COLOR=rgb(0, 0, 187)]baseurl?>[/COLOR]">
    <img src="[COLOR=rgb(0, 0, 187)]<?php [/COLOR][COLOR=rgb(0, 119, 0)]echo [/COLOR][COLOR=rgb(0, 0, 187)]$this[/COLOR][COLOR=rgb(0, 119, 0)]->[/COLOR][COLOR=rgb(0, 0, 187)]baseurl ?>[/COLOR]/[COLOR=rgb(0, 0, 187)]<?php [/COLOR][COLOR=rgb(0, 119, 0)]echo [/COLOR][COLOR=rgb(0, 0, 187)]htmlspecialchars[/COLOR][COLOR=rgb(0, 119, 0)]([/COLOR][COLOR=rgb(0, 0, 187)]$logo[/COLOR][COLOR=rgb(0, 119, 0)]); [/COLOR][COLOR=rgb(0, 0, 187)]?>[/COLOR]"
    alt="[COLOR=rgb(0, 0, 187)]<?php [/COLOR][COLOR=rgb(0, 119, 0)]echo [/COLOR][COLOR=rgb(0, 0, 187)]htmlspecialchars[/COLOR][COLOR=rgb(0, 119, 0)]([/COLOR][COLOR=rgb(0, 0, 187)]$templateparams[/COLOR][COLOR=rgb(0, 119, 0)]->[/COLOR][COLOR=rgb(0, 0, 187)]get[/COLOR][COLOR=rgb(0, 119, 0)]([/COLOR][COLOR=rgb(221, 0, 0)]'sitetitle'[/COLOR][COLOR=rgb(0, 119, 0)]));[/COLOR][COLOR=rgb(0, 0, 187)]?>[/COLOR]"
    style="[COLOR=rgb(0, 0, 187)]<?php [/COLOR][COLOR=rgb(0, 119, 0)]print ([/COLOR][COLOR=rgb(0, 0, 187)]is_null[/COLOR][COLOR=rgb(0, 119, 0)]([/COLOR][COLOR=rgb(0, 0, 187)]$_SERVER[/COLOR][COLOR=rgb(0, 119, 0)][[/COLOR][COLOR=rgb(221, 0, 0)]"REQUEST_URI"[/COLOR][COLOR=rgb(0, 119, 0)]]) ? [/COLOR][COLOR=rgb(221, 0, 0)]"display:none" [/COLOR][COLOR=rgb(0, 119, 0)]: [/COLOR][COLOR=rgb(221, 0, 0)]""[/COLOR][COLOR=rgb(0, 119, 0)]); [/COLOR][COLOR=rgb(0, 0, 187)]?>[/COLOR];" /></a>
    [COLOR=rgb(0, 0, 187)]<?php [/COLOR][COLOR=rgb(0, 119, 0)]endif;[/COLOR][COLOR=rgb(0, 0, 187)]?>[/COLOR]
    [/COLOR][/COLOR]
    [/SIZE]
    [SIZE=10px][COLOR=rgb(50, 61, 79)][COLOR=rgb(0, 0, 0)][COLOR=rgb(0, 0, 187)][/COLOR][/COLOR]
    <?php if (!$logo ): ?>
    <?php echo htmlspecialchars($templateparams->get('sitetitle'));?>
    <?php endif; ?>
    <span class="header1">
    <?php echo htmlspecialchars($templateparams->get('sitedescription'));?>
    </span></h1>
    </div> </div><!-- end logoheader -->

    <div class="menublock">
    <jdoc:include type="modules" name="position-1" />
    </div>


    </div><!-- end header -->[/COLOR]
    [/SIZE]

  5. #4
    Senior Member Ganners's Avatar
    Join Date
    Feb 2011
    Location
    United Kingdom
    Posts
    415
    Member #
    27007
    Liked
    92 times
    Whats the URL to your site? Need to see what you're working with
    Mark Gannaway Software Developer

    Recent Experiments
    - Backpropogation Neural Network language solving (http://ann.ganners.co.uk/)
    - Animated image to ASCII (http://google.ganners.co.uk/)
    - 3D Paper Characters (http://cybergame.ganners.co.uk/)
    - Anagram solving (http://roflol.co.uk/)

  6. #5
    Junior Member
    Join Date
    Aug 2011
    Posts
    6
    Member #
    29154

  7. #6
    Senior Member Ganners's Avatar
    Join Date
    Feb 2011
    Location
    United Kingdom
    Posts
    415
    Member #
    27007
    Liked
    92 times
    Oh okay I see where I went wrong, try using this:

    PHP Code:
    <?php if ($logo): ?>
    <a href="<?php echo $this->baseurl?>">
    <img src="<?php echo $this->baseurl ?>/<?php echo htmlspecialchars($logo); ?>"
    alt="<?php echo htmlspecialchars($templateparams->get('sitetitle'));?>"
    style="<?php print ($_SERVER["REQUEST_URI"] == "/" "display:none" ""); ?>;"/></a>
    <?php endif;?>

    Mark Gannaway Software Developer

    Recent Experiments
    - Backpropogation Neural Network language solving (http://ann.ganners.co.uk/)
    - Animated image to ASCII (http://google.ganners.co.uk/)
    - 3D Paper Characters (http://cybergame.ganners.co.uk/)
    - Anagram solving (http://roflol.co.uk/)

  8. #7
    Junior Member
    Join Date
    Aug 2011
    Posts
    6
    Member #
    29154
    Ooo It works! Awesome! the only thing is now I'm getting 404 errors on every other page... hmmmm

  9. #8
    Senior Member Ganners's Avatar
    Join Date
    Feb 2011
    Location
    United Kingdom
    Posts
    415
    Member #
    27007
    Liked
    92 times
    Ohh dear, well the cause of that is likely something entirely different, perhaps something .htaccess related? Although your blog and contact page are working okay.
    Mark Gannaway Software Developer

    Recent Experiments
    - Backpropogation Neural Network language solving (http://ann.ganners.co.uk/)
    - Animated image to ASCII (http://google.ganners.co.uk/)
    - 3D Paper Characters (http://cybergame.ganners.co.uk/)
    - Anagram solving (http://roflol.co.uk/)

  10. #9
    Junior Member
    Join Date
    Aug 2011
    Posts
    6
    Member #
    29154
    yeah this is gettin' weird. Couldn't be that I'm using joomla could it?

  11. #10
    Senior Member Ganners's Avatar
    Join Date
    Feb 2011
    Location
    United Kingdom
    Posts
    415
    Member #
    27007
    Liked
    92 times
    It i'm sure has something to do with joomla, I'm not sure what would cause the problem though. Just play around with those pages which don't work.
    Mark Gannaway Software Developer

    Recent Experiments
    - Backpropogation Neural Network language solving (http://ann.ganners.co.uk/)
    - Animated image to ASCII (http://google.ganners.co.uk/)
    - 3D Paper Characters (http://cybergame.ganners.co.uk/)
    - Anagram solving (http://roflol.co.uk/)


Page 1 of 2 1 2 LastLast

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 04:39 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com