can one of the admins help me

Status
Not open for further replies.

bigguy

Retired
Messages
10,984
Reaction score
10
Points
38
I`m running the same software and am having the same problem looking for a place to put the ad ... I know it goes in one of the index files ...probably a template.index or something like that

EDIT: have you been here yet smf
 

wwfn

New Member
Messages
70
Reaction score
0
Points
0
i have tried and tired to add it and everytime i add it i break it. i am at a lost on what to do now. Maybe i should just unstall the sucker and use that on my Fleet hosting account.
 

bigguy

Retired
Messages
10,984
Reaction score
10
Points
38
Well I`m still trying to find away I`ll let you know if I do ... :)
 

wwfn

New Member
Messages
70
Reaction score
0
Points
0
thanks,
I am probably gonna call it quits for tonight and start back on it when i have had some sleep and will be refreshed
 

nicholas

New Member
Messages
772
Reaction score
0
Points
0
(*after looking at MicrotechXP's example) you can put the ads at themes/default/index.template.php all the way at the bottom after ?>. but it will make the font in the forum become bigger :laughing:

But i am very sure there are better ways. :eek:riginal:
 

Corey

I Break Things
Staff member
Messages
34,553
Reaction score
204
Points
63
Will using a PHP include instead of the java work?

-Corey
 

wwfn

New Member
Messages
70
Reaction score
0
Points
0
it might work. But what should i use for the php code. i know it will be <?php include("");?>
 

Willmaker

New Member
Messages
134
Reaction score
0
Points
0
Take a look at my SMF forums:

http://wilmaker.x10hosting.com/sforums

If you want the banner up the very top then I could help you.

You can find this part of code in all of the themes for SMF. It is in between the template_main_above and template_main_below. It should look like this:

Code:
	// The main content should go here.  A table is used because IE 6 just can't handle a div.
	echo '
	<table width="100%" cellpadding="0" cellspacing="0" border="0"><tr>
		<td id="bodyarea" style="padding: 1ex 20px 2ex 20px;">';
}

function template_main_below()
{
	global $context, $settings, $options, $scripturl, $txt;

Assuming you are on the advanced plan just ad the code where the bold part is:

Code:
	// The main content should go here.  A table is used because IE 6 just can't handle a div.
	echo '
	<table width="100%" cellpadding="0" cellspacing="0" border="0"><tr>
		<td id="bodyarea" style="padding: 1ex 20px 2ex 20px;">';
}
echo "<center>";
[B]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:2&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=a4f0eec1' target='_blank'><img src='http://x10hosting.com/advert/adview.php?what=zone:2&amp;n=a4f0eec1' border='0' alt=''></a></noscript>\n";
echo "\n";
echo "\n";[/B]
echo "</center>";

function template_main_below()
{
	global $context, $settings, $options, $scripturl, $txt;

As you can see, I added the echo <center> lines just to center the banner.

Hope this helps.
 
Status
Not open for further replies.
Top