How would I ad this code so the ad shows on every page, like were would I put it in RC2 ???
Quote<?php include('http://staff.x10hosting.com/adCode.php?ad=advanced'); ?>
You would put that code (without the <?php and ?> tags) in index.template.php. However, the exact place where you would put that code depends on where you want it to appear.
well either at the very top or the very bottom would be nice.
Ok.
To put it at the very top (before anything else gets output):
Find
<body>';
And add it after that.
If it's not already centered and you want it to be centered:
Replace the above code with this:
<body><div align="center">';
Then put your ad code after that, and add a </div> right after the first echo '.
To add it at the very bottom:
Find
echo '
</div>
</body></html>';
Replace
echo '
</div>';
include('http://staff.x10hosting.com/adCode.php?ad=advanced');
echo '</body></html>';
Or (if you want to center it and it isn't already centered)
echo '
</div><div align="center">';
include('http://staff.x10hosting.com/adCode.php?ad=advanced');
echo '</div></body></html>';
i will be releasing a mod in the next day or so that will do exactly what you want, so if you wish to wait, you can.
Both ideas are great. If its ok I would like to post the changes that Oldiesmann has made to the support forum I work on for our members to use if they need it.
@ electrohome88: I might just wait for it myself but I do know of a couple ppl that might find this useful now.
im sick as a dog, so im fixing it all up right now. so in like an hour it should be done, or less. just have to give me time to test it out, and assume theres no glitches
Ok I will wait for you and test it out. I have a new smf 1.1 rc2 forum unmodded waiting for it.
@ Oldiesmann: is it ok to take your changes and put them on the hosting company I work for. Incase anyone needs the changes ?
i have uploaded it and tested it on RC2 with the default theme.
http://mods.simplemachines.org/index.php?mod=255
I cant download it. All I get is a white screen.
donno why then
try this and upload it with the package manager
ok got it that time. I`ll report about this in a minute.
cool thanks, till im able to post images up in the mod section about this mod
go into features and settings, you will see an "ads" menu, click then, and the rest should explain itself
It installed great but I cant seem to get the ad code I posted to work with or without the php tags. Code is in the first post, any ideas.
thats the one thing i didn't test.. the includes
but what you can do is grab the code in the includes file and put that there instead
<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 ("&what=zone:3&target=_blank");
document.write ("&exclude=" + document.phpAds_used);
if (document.referrer)
document.write ("&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&n=a915c788' border='0' alt='' /></a></noscript>
stick that in there
ok thats got it. It shows up good. Only theres 2 of them now.
http://ang.x10hosting.com/forum/index.php
lol ya, thats one thing i should add to the read me or the help or something
you have everything checked
to have it displayed on all the pages, just check index
to have it display just on the specific pages like board index, thread index, thread, have those checked. theeres no need to have all 4 of them checked
i put that there cause in googles TOS, you can't have it display ads on all the pages. so ya
Ok its an awesome mod and it works good. Now I know this is not your problem and I will try to get this solved. Let me try to explain. On the hosting company I work for they have made a script that automatically checks accounts for ad codes. I wonder if the script we use would pick up on this. Would you have any ideas ??
glad it worked, your my first official tester lol
and im guessing your hosting company doesn't want you to put ads up?.. i wouldn't know how to make it so that its not noticed. you can try first by not using "key words" such as ads or ad or adverts. thats probably how the script works. that is, if im understanding your question
Oh yes it is in the T.O.S. that all accounts on the server other than the ones on the static plan have to have ads showing on all pages (ads from x10) You are also allowed to have your own ads but they can be no bigger than the one we place. The script I am talking about checks all accounts on the free server for the ad code if it does not show that account gets put in a list for suspension.
oh, so your just asking if the script will pick up the fact you have their ads on your page
and in which case it will
ok, I will also get this tested at our site to make sure this script of ours can pick up on it, Thank you sir for all your help. it has been most enlightening. Glad I could help test it for you.
Would this code work the same way as the other ???
Quote<?php include('http://staff.x10hosting.com/adCode.php?ad=corporate'); ?>
ya, you should be able to grab the source code of that file,
and just stick it under or on top of the ads that are already there. or work with some html codes and make it beside.. however you want
If I took the bit of script you wrote for the other ad and changed the line in it to reflect this line it should work in your mod right. (Hope that was clear,lol)
ya, not really sure what your asking
you can just play around with the code and see what you get. wont cause harm towards you. you can always hit the back button if it screws up the webpage
You posted this script for the first line of code O presented:
Quote<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 ("&what=zone:3&target=_blank");
document.write ("&exclude=" + document.phpAds_used);
if (document.referrer)
document.write ("&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&n=a915c788' border='0' alt='' /></a></noscript>
How would I put this in it:
Quote<?php include('http://staff.x10hosting.com/adCode.php?ad=corporate'); ?>
I guess its not to hard to figure once I look at it. (Yes, I`m still learning) Thanks for all your help.
ah okay, sorry. thought you knew a bit of html. its okay
try this out:
<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 ("&what=zone:3&target=_blank");
document.write ("&exclude=" + document.phpAds_used);
if (document.referrer)
document.write ("&referer=" + escape(document.referrer));
document.write ("'><" + "/script>");
//-->
</script>
<br />
<noscript><a href='http://x10hosting.com/advert/adclick.php?n=a915c788' target='_blank'><img src='http://x10hosting.com/advert/adview.php?what=zone:3&n=a915c788' border='0' alt='' /></a></noscript>
<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 ("&what=zone:1&target=_blank");
document.write ("&exclude=" + document.phpAds_used);
if (document.referrer)
document.write ("&referer=" + escape(document.referrer));
document.write ("'><" + "/script>");
//-->
</script><noscript><a href='http://x10hosting.com/advert/adclick.php?n=a7fb3e9d' target='_blank'><img src='http://x10hosting.com/advert/adview.php?what=zone:1&n=a7fb3e9d' border='0' alt=''></a></noscript>
that will put your ads one on top of each other
ops, i mean side by side
i updated it for you.. now its one on top of each other
Well I know a bit of html, thanks to all the websites and that I screw with. The 2 codes I posted are for seperate "Plans" on x10. the first goes to one ad and the second goes to another so in both instances each code should show up by itself, not together. But that code will work to for ppl who want both to show I guess.
EDIT: have to run out for a quick sec, brb.
Thank you very much for this, its great. If I have any problems I will post back here. Your mod is just what I needed.
This code breaks the forum. The ad shows up and the top half of the forum but thats it.
Quote from: electrohome88 on January 05, 2006, 02:35:49 PM
ah okay, sorry. thought you knew a bit of html. its okay
try this out:
<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 ("&what=zone:3&target=_blank");
document.write ("&exclude=" + document.phpAds_used);
if (document.referrer)
document.write ("&referer=" + escape(document.referrer));
document.write ("'><" + "/script>");
//-->
</script>
<br />
<noscript><a href='http://x10hosting.com/advert/adclick.php?n=a915c788' target='_blank'><img src='http://x10hosting.com/advert/adview.php?what=zone:3&n=a915c788' border='0' alt='' /></a></noscript>
<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 ("&what=zone:1&target=_blank");
document.write ("&exclude=" + document.phpAds_used);
if (document.referrer)
document.write ("&referer=" + escape(document.referrer));
document.write ("'><" + "/script>");
//-->
</script><noscript><a href='http://x10hosting.com/advert/adclick.php?n=a7fb3e9d' target='_blank'><img src='http://x10hosting.com/advert/adview.php?what=zone:1&n=a7fb3e9d' border='0' alt=''></a></noscript>
that will put your ads one on top of each other
ops, i mean side by side
i updated it for you.. now its one on top of each other