Placing ads in e107

Status
Not open for further replies.

Doomgaze

New Member
Messages
40
Reaction score
0
Points
0
CRITICAL_ERROR:
Line 378 /backup/home/shadowfi/public_html/main/class2.php

Error reported as: Unable to find file: e107_themes/templates/header.php
CRITICAL_ERROR:
Line 379 /backup/home/shadowfi/public_html/main/class2.php

Error reported as: Unable to find file: e107_themes/templates/footer.php

So then I made a copy and renamed the footer/header_default to the listed missing, and it worked to an extent. The background changed to a greenish color, which was the background color for the theme. But this appeared in place of the main page:

Fatal error: Call to undefined function: tablestyle() in /backup/home/shadowfi/public_html/main/class2.php on line 279

How should I fix this problem for the php ads?
 

Phil

Retired Staff
Messages
7,344
Reaction score
0
Points
36
Were did you put the ad's? Should try at put the code at the VERY top of the header.php
 

Doomgaze

New Member
Messages
40
Reaction score
0
Points
0
I put it in the header of e107/themes/templates and it doesn't work.

I put it in the theme.php of e107/themes/clan and it still doesn't work.

I still need help.
 

Phil

Retired Staff
Messages
7,344
Reaction score
0
Points
36
I don't think they would go in the theme.php... But I thought they would go in the header.php. Did you use the PHP ad code and did you PUT the code at the BEGENING of the header.php?

It's probley won't work anyware eles in the header.php.
 

oscar.j4l

New Member
Messages
362
Reaction score
0
Points
0
What i would try to do is put it in the index page at the very top before the <?php quotes, that should work.
 

Doomgaze

New Member
Messages
40
Reaction score
0
Points
0
echo "\n"; echo "\n"; echo "\n"; echo "\n";

The site is fine, but those words appeared at the top of the page. And still no ad. At least the ad script is on the file.
 

motogawa

Member
Messages
306
Reaction score
0
Points
16
Change

PHP:
echo "<script language='JavaScript' type='text/javascript' src='http://x10hosting.com/advert/adx.js'></script>\n";
echo "<script language='JavaScript' type='text/javascript'>\n";
echo "<!--\n";
echo "if (!document.phpAds_used) document.phpAds_used = ',';\n";
echo "phpAds_random = new String (Math.random());\n";
echo "phpAds_random = phpAds_random.substring(2,11);\n";
echo "document.write (\"<\" + \"script language='JavaScript' type='text/javascript' src='\");\n";
echo "document.write (\"http://x10hosting.com/advert/adjs.php?n=\" + phpAds_random);\n";
echo "document.write (\"&amp;what=zone:3&amp;target=_blank\");\n";
echo "document.write (\"&amp;exclude=\" + document.phpAds_used);\n";
echo "if (document.referrer)\n";
echo "document.write (\"&amp;referer=\" + escape(document.referrer));\n";
echo "document.write (\"'><\" + \"/script>\");\n";
echo "//-->\n";
echo "</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>\n";
echo "\n";
echo "\n";

Please add <?php and ?> when inserting php script. Updating version should look like this

PHP:
<?
echo "<script language='JavaScript' type='text/javascript' src='http://x10hosting.com/advert/adx.js'></script>\n";
echo "<script language='JavaScript' type='text/javascript'>\n";
echo "<!--\n";
echo "if (!document.phpAds_used) document.phpAds_used = ',';\n";
echo "phpAds_random = new String (Math.random());\n";
echo "phpAds_random = phpAds_random.substring(2,11);\n";
echo "document.write (\"<\" + \"script language='JavaScript' type='text/javascript' src='\");\n";
echo "document.write (\"http://x10hosting.com/advert/adjs.php?n=\" + phpAds_random);\n";
echo "document.write (\"&amp;what=zone:3&amp;target=_blank\");\n";
echo "document.write (\"&amp;exclude=\" + document.phpAds_used);\n";
echo "if (document.referrer)\n";
echo "document.write (\"&amp;referer=\" + escape(document.referrer));\n";
echo "document.write (\"'><\" + \"/script>\");\n";
echo "//-->\n";
echo "</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>\n";
echo "\n";
echo "\n";
?>
 

Doomgaze

New Member
Messages
40
Reaction score
0
Points
0
It works. Once again, I would like to thank you for helping me.
 

jensen

Active Member
Messages
1,167
Reaction score
22
Points
38
I'll try it too so that I can put up my e107 site.
 
Status
Not open for further replies.
Top