Forum Moderators: martinibuster
Code ModificationAny AdSense ad code, search box code, or referral code must be pasted directly into Web pages without modification. AdSense participants are not allowed to alter any portion of the ad code or change the layout, behavior, targeting, or delivery of ads for any reason.
The phrase "must be pasted directly into Web pages" is what I'm talking about. Doesn't that mean you ought to be able to see the Adsense code using view source on the page that's showing the ads?
OK, well that sounds fine. However, the site I'm aware of using phpAdsNew to toggle between Adsense and YPN, there is no way to see the code.
If that is the case, then they are generating the code incorrectly. It should appear as though it were simply pasted onto the page. phpAdsNew has settings that allow for HTML ads (use), and for modifying the ad to track clicks (don't use).
Ad server programs, server-side includes, and php includes, used correctly, can all place the javascript ad code on the page within the TOS. Be aware that if multiple ad blocks are used, then the program needs to serve only AdSense or YPN blocks to that page and not intermix them.
If that is the case, then they are generating the code incorrectly. It should appear as though it were simply pasted onto the page. phpAdsNew has settings that allow for HTML ads (use), and for modifying the ad to track clicks (don't use).
Hmmm, I'm not sure that's true with PAN. I have it set up that way and I still get PAN code in the page source, rather than the original AdSense code. I've just had a quick look at the code at jensense too, seems to be the same.
I'm no expert though, perhaps I'm missing something?
Mac
Geez ... send an email to Adsense if you can't believe the folks who respond here. We've been using PAN for so long now and I have not been banned or anything. G says it was ok. Get it straight from the horse's mouth!
If you see all their codes, can you imagine how long your Javascript will look like?
I just figured that with 'PHP' in the name of the product, the code swap would be done server side. It's what I do. I also figured that a product of this nature would do well to comply with AS TOS.
If that is the case, then they are generating the code incorrectly. It should appear as though it were simply pasted onto the page. phpAdsNew has settings that allow for HTML ads (use), and for modifying the ad to track clicks (don't use).
Correction: I've checked, and it's the "Text Ad" setting in phpAdsNew that passes along the code unaltered (not "HTML Ad"). You also need to serve up the ad in "local mode" invocation. "Local mode" means the processing occurs on the back end php side (rather than "javascript invocation" which generates phpAdsNew javascript code).
Sorry for the mixup.
I'm sure you're right but that doesn't work for me (I'm getting the php code instead of HTML and no ads). Perhaps this is due to the way the CMS I use works and is nothing to do with PAN, but at the moment remote Javascript invocation of an HTML ad is the only way I can get ads to show...
It's tricky. If your CMS is template based, then you should be able to place the code in a variable with the "Store the banner inside a variable so it can be used in a template" option.
I haven't used this option, but perhaps the phpAdsNew docs give an example. Also, try googling "[your cms] and phpadsnew"; I'm sure that someone's already solved this problem.
I can't even use CHMOD command to enable writing to the config file.
It may be called "CHMOD", but most people use simple ftp clients, not *nix. To enable writing access in a file with an ftp client, select the file, then use the 'set permissions' command in your ftp client. You should see a dialog box with a matrix of choices:
user : [x]read [x]write [x]execute
group: [x]read [x]write [x]execute
world: [x]read [x]write [x]execute
and a textbox to enter a number. Check/tick all the choices (or enter "777"), click save or accept or OK. The file is now writable. Reset the access to "644" after you've completed the install.