Adding Banner to Coppermine script

mysoldier

New Member
Messages
8
Reaction score
0
Points
0
To be in compliance with the corporate free hosting, a banner has to be added to every page. How do I do this with the Coppermine script in Fantastico. I tried the custom header feature but it did not work.
 

dyfuse

Member
Messages
395
Reaction score
0
Points
16
mysoldier said:
To be in compliance with the corporate free hosting, a banner has to be added to every page. How do I do this with the Coppermine script in Fantastico. I tried the custom header feature but it did not work.
For coppermine gallery it is probably easiest to add the advertisements after installation. You can do it through the administration panel ("Config") after logging in. Check out the category "Themes Settings", and in the "Path to custom header include" or "Path to custom footer include" box, enter in the name of the file which contains your ad code, i.e. footer.php.

Copy the ad code to the file (Notepad is great for doing this) and name it footer.php, and upload it to your coppermine directory...It works for me.
 

mysoldier

New Member
Messages
8
Reaction score
0
Points
0
Thanks for the reply. I tried as you instructed but must be missing something as it didn't work.

I c/p the corporate php code into a wordpad file and named that file header.php. The file was uploaded to /public_html/header.php (coppermine is installed in the root directory). From Config/Theme Settings I pointed to both /header.php and /public_html/header.php but never did a banner appear at the top of the page.

Clue me in on what I did wrong :biggrin:
 

dyfuse

Member
Messages
395
Reaction score
0
Points
16
mysoldier said:
Thanks for the reply. I tried as you instructed but must be missing something as it didn't work.

I c/p the corporate php code into a wordpad file and named that file header.php. The file was uploaded to /public_html/header.php (coppermine is installed in the root directory). From Config/Theme Settings I pointed to both /header.php and /public_html/header.php but never did a banner appear at the top of the page.

Clue me in on what I did wrong :biggrin:
No problem. (Just in case you were wondering I am on the advanced plan, so that's why I was quoting footer.php)

Have you made sure you copied the corporate ad code correctly? Maybe it has a slight error in it, and therefore doesn't end up displaying anything at all! Just in case you want to compare, here is a copy of the code I put into footer.php (remember it's for advanced):

Code:
<br>
<p>
<script language='JavaScript' type='text/javascript' src='http://x10hosting.com/advert/adx.js'></script>
<script language='JavaScript' type='text/javascript'>
<!--
	if (!document.phpAds_used) document.phpAds_used = ',';
	phpAds_random = new String (Math.random()); phpAds_random = phpAds_random.substring(2,11);

	document.write ("<" + "script language='JavaScript' type='text/javascript' src='");
	document.write ("http://x10hosting.com/advert/adjs.php?n=" + phpAds_random);
	document.write ("&amp;what=zone:3&amp;target=_blank");
	document.write ("&amp;exclude=" + document.phpAds_used);
	if (document.referrer)
		document.write ("&amp;referer=" + escape(document.referrer));
	document.write ("'><" + "/script>");
//-->
</script><noscript><a href='http://x10hosting.com/advert/adclick.php?n=a915c788' target='_blank'><img src='http://x10hosting.com/advert/adview.php?what=zone:3&amp;n=a915c788' border='0' alt=''></a></noscript>
</p>
<br>

Just check to make sure your corporate code is ok and has no 'flaws' or errors. That's probably the most obvious thing you can do. The second could be trying testing that the "Path to custom header include" function in coppermine actually works for your installation!!

You could try adding some test code to the start of your header.php file to see whether it will display it in your header section of the gallery. For example, maybe:

Code:
<p>Testing</p>
<br />

See whether it is actually displayed on your page. Hope this helps, and actually ends favourably. :happysad:

EDIT: Try checking the codes out here: http://forums.x10hosting.com/ads.php
 
Last edited:

mysoldier

New Member
Messages
8
Reaction score
0
Points
0
Thanks ffadmin! Works great now. I was using the php code instead of the javascript code :lol:
 

dyfuse

Member
Messages
395
Reaction score
0
Points
16
mysoldier said:
Thanks ffadmin! Works great now. I was using the php code instead of the javascript code :lol:
No problem!! That was probably the most likely reason. I suppose Coppermine was trying to do a php include on a file that actually had a php include function in it. Glad to be of help. :)
 
Top