header image only on the home page header image only on the home page
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

header image only on the home page

Started by allvip, August 27, 2013, 03:58:46 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

allvip

is it possible for the header image - logo to show only on the home page ?
at least not on display_media page.

Αndré

What exactly is the home page? Just index.php or also something like index.php?cat=123?

allvip


Αndré


allvip

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.

Αndré

Quote from: allvip on August 27, 2013, 05:56:34 PM
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
    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
$template_vars = CPGPluginAPI::filter('theme_pageheader_params', $template_vars);

allvip