Advanced search  

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

Pages: [1]   Go Down

Author Topic: header image only on the home page  (Read 5431 times)

0 Members and 1 Guest are viewing this topic.

allvip

  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Posts: 1362
header image only on the home page
« 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.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: header image only on the home page
« Reply #1 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?
Logged

allvip

  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Posts: 1362
Re: header image only on the home page
« Reply #2 on: August 27, 2013, 05:43:26 pm »

index.php
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: header image only on the home page
« Reply #3 on: August 27, 2013, 05:45:16 pm »

Please post a link to your gallery.
Logged

allvip

  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Posts: 1362
Re: header image only on the home page
« Reply #4 on: August 27, 2013, 05:56:34 pm »

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.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: header image only on the home page
« Reply #5 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);
Logged

allvip

  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Posts: 1362
Re: header image only on the home page
« Reply #6 on: August 28, 2013, 02:57:22 pm »


It worked thanks a lot.
Logged
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 20 queries.