coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 themes/skins/templates => Topic started by: bobby131313 on August 08, 2006, 04:27:38 AM

Title: Extra "1" in my footer...
Post by: bobby131313 on August 08, 2006, 04:27:38 AM
So, I wanted to put some ads right above the "Powered by Coppermine Photo Gallery". I did some searching here to find out where to edit to get it done.

I took the code from sample theme.php for the footer and modified it, keep in mind I'm not real familiar with PHP, so I'm doing the trial and error method....

// Function for writing a pagefooter
function pagefooter()
{
    //global $HTTP_GET_VARS, $HTTP_POST_VARS, $HTTP_SERVER_VARS;
    global $USER, $USER_DATA, $ALBUM_SET, $CONFIG, $time_start, $query_stats, $queries;;
    global $template_footer;

    $custom_footer = cpg_get_custom_include($CONFIG['custom_footer_path']);

    if ($CONFIG['debug_mode']==1 || ($CONFIG['debug_mode']==2 && GALLERY_ADMIN_MODE)) {
    cpg_debug_output();
    }

    $template_vars = array(
        '{CUSTOM_FOOTER}' => $custom_footer,
        '{VANITY}' => (defined('THEME_IS_XHTML10_TRANSITIONAL') && $CONFIG['vanity_block']) ? theme_vanity() : '',
    );
    echo require_once('/home/content/c/b/o/cbobby131313/html/includes/ga_468_ffffff.php');
    echo template_eval($template_footer, $template_vars);
}
?>


I added the 4th line from the bottom. Here is the contents of the included file...

<center>
<script type="text/javascript"><!--
google_ad_client = "pub-8965512649599832";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_type = "text";
google_ad_channel ="7556018932";
google_color_border = "ffffff";
google_color_bg = "ffffff";
google_color_link = "0000CC";
google_color_url = "0000CC";
google_color_text = "000000";
//--></script>
  <script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
      </script>
</center>


Now take a look at the footer on any page on my gallery...

http://www.coincommunity.org/gallery/

The ads are there, the "powered by" is there, but there's a "1" on the left. I can't figure out where its coming from.

Did the devs "booby trap" the footer for people that try to remove the credit?

Title: Re: Extra "1" in my footer...
Post by: eruss on August 08, 2006, 05:07:50 AM
Your page source shows it after the Google ads and before the Powered by....

<center>
<script type="text/javascript"><!--
google_ad_client = "pub-8965512649599832";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_type = "text";
google_ad_channel ="7556018932";
google_color_border = "ffffff";
google_color_bg = "ffffff";
google_color_link = "0000CC";
google_color_url = "0000CC";
google_color_text = "000000";
//--></script>
  <script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
      </script>
</center>1<div class="footer" align="center" style="padding-top: 10px;">Powered by <a href="http://coppermine.sourceforge.net/" title="Coppermine Photo Gallery" rel="external">Coppermine Photo Gallery</a></div>


Were you trying to remove the credit?  (bad)  Did you leave a stray number somewhere?
Title: Re: Extra "1" in my footer...
Post by: bobby131313 on August 08, 2006, 05:27:12 AM


QuoteYour page source shows it after the Google ads and before the Powered by....

Yeah, I know, but it's not in my code anywhere I can find. I posted the exact production code above.

No. I wasn't trying to remove the credit, just put the ads right above them.


Title: Re: Extra "1" in my footer...
Post by: Nibbler on August 08, 2006, 03:01:04 PM
It's static code - it can go directly in template.html. The 1 is caused by the 'echo require_once' which shouldn't be there.
Title: Re: Extra "1" in my footer...
Post by: bobby131313 on August 08, 2006, 05:51:31 PM

It can't go in the template as far as I can see and go above the credit. It always goes below.

The faq's that come with the software says it has to go in the function that writes the footer. I guess my syntax is just wrong.
Title: Re: Extra "1" in my footer...
Post by: Nibbler on August 08, 2006, 05:52:41 PM
Just remove the echo then.
Title: Re: Extra "1" in my footer...
Post by: bobby131313 on August 08, 2006, 05:57:31 PM


Yep, I just came back to say I tried that and it worked.

Thank you!

Please mark solved.