Extra "1" in my footer... Extra "1" in my footer...
 

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

Extra "1" in my footer...

Started by bobby131313, August 08, 2006, 04:27:38 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

bobby131313

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?


eruss

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?

bobby131313



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.



Nibbler

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.

bobby131313


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.

Nibbler


bobby131313



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

Thank you!

Please mark solved.