forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 themes (visuals) => Topic started by: allvip on August 27, 2013, 03:58:46 pm

Title: header image only on the home page
Post by: allvip on August 27, 2013, 03:58:46 pm
is it possible for the header image - logo to show only on the home page ?
at least not on display_media page.
Title: Re: header image only on the home page
Post by: Αndré on August 27, 2013, 05:30:18 pm
What exactly is the home page? Just index.php or also something like index.php?cat=123?
Title: Re: header image only on the home page
Post by: allvip on August 27, 2013, 05:43:26 pm
index.php
Title: Re: header image only on the home page
Post by: Αndré on August 27, 2013, 05:45:16 pm
Please post a link to your gallery.
Title: Re: header image only on the home page
Post by: allvip on August 27, 2013, 05:56:34 pm
allvip.us/gallery/index.php (http://allvip.us/gallery/index.php)

My header image is in the html file of my theme.
I will delete this div for my header and use coppermine default.
Title: Re: header image only on the home page
Post by: Αndré on August 28, 2013, 11:05:05 am
I will delete this div for my header and use coppermine default.
I don't understand what you're trying to tell me. I thought this was the question?

If you want to remove the whole my_header div block for other pages than index.php (without any additional parameters), we need to move the code from template.html to the corresponding function in theme.php. I suggest to replace your div block with a new token like {MY_HEADER_LOGO}. Then, we can replace that token in the function pageheader. Just add something like
Code: [Select]
    global $CPG_PHP_SELF;
    $superCage = Inspekt::makeSuperCage();
    if ($CPG_PHP_SELF == 'index.php' && !count($superCage->get->_source)) {
        $template_vars['{MY_HEADER_LOGO}'] = <<< EOT
  <div id="my_header">
    <div id="div1">
      <div class="fb-like" data-href="http://allvip.us/gallery/index.php" data-send="true" data-width="450" data-show-faces="true" data-font="arial"></div>
    </div>
    <div id="div2"></div>
    <div id="div3">
      <div id="div4">
        <h1><a href="http://allvip.us/gallery/index.php">allvip.us</a></h1>
        <p>Gallery updated daily</p>
      </div>
      <div id="div5">
        <ul>
          <ul>
          <li>Uou can UPLOAD in all the albums or create album in all the category</a></li>
          <li><a href="http://www.allvipfun.com/forum/" target="_blank">FORUMS for everything</a></li>
          <li><a href="http://www.allvipfun.com"  target="_blank">post images and write posts , articles , books , polls , create Group and PERSONAL BLOG</a></li>
        </ul>
      </div>   
    </div>
  </div>
EOT;
    } else {
        $template_vars['{MY_HEADER_LOGO}'] = '';
    }
above
Code: [Select]
$template_vars = CPGPluginAPI::filter('theme_pageheader_params', $template_vars);
Title: Re: header image only on the home page
Post by: allvip on August 28, 2013, 02:57:22 pm

It worked thanks a lot.