Adsense

Creating and modifying plugins.
yazheirx
Regular
Posts: 6
Joined: Tue Apr 12, 2005 4:48 am
Location: Chicago
Contact:

Post by yazheirx »

I have been mulling over the potential hurdle I found in the Google AdSense Policy page:
"Code Modification - Any AdSense ad code or search box code must be pasted directly into Web pages without modification. AdSense participants are not allowed to alter the ad code for any reason, include changing the ad layout, behavior, or delivery of ads."
To ensure that I do not get any s9y users in trouble I have written to Google to ensure that my latest plan is legal and acceptable. I have posted the current status and email.
Justin G. Cramer

Shameless Plugs
Ludicrous Intellect.com - fun
Best Way Technologies, Inc - paycheck
labels2you - paycheck
Guest

google ads adsense in between posts

Post by Guest »

Is there an existing plugin or other way to insert google adsene code between posts. I don't mean in a post but in between posts so you can place text ads periodically on a page not just in the sidebar?
MySchizoBuddy
Regular
Posts: 340
Joined: Sun Jun 12, 2005 5:28 am

Post by MySchizoBuddy »

If u want to place the ad on the bottom of content or footer etc, then just use html-nugget

If u want it after a specified number of posts then here is ur answer
http://www.s9y.org/forums/viewtopic.php?p=16900
Image
Hello McFly
Regular
Posts: 12
Joined: Thu Feb 02, 2006 5:53 pm
Contact:

Nugget problem for newbies...

Post by Hello McFly »

I think the problem that newbies were having with the HTML NUGGET plug-in was that they had the WYSIWYG editor turned on. Hence when they pasted their code into the plug-in it looked like code.

You need to enter the code in text mode. Hope this helps people who'd like to continue using the "Nugget" plug-in.

Cheers,
Mcfly
Darryl
Regular
Posts: 12
Joined: Thu Mar 09, 2006 3:43 am

Post by Darryl »

You may want to take a look at the adsense plugins that are available for Wordpress (sorry no link, check codex.wordpress.org). There is one that follows all of Google's rules (as far as I can tell) and seems to work quite well, from the feedback that has been generated.

Those plugins may even be able to be ported to s9y....which would be cool. I wish I could do it myself, but when it comes to programming, I'm all thumbs.

Darryl
dragon47
Regular
Posts: 7
Joined: Thu Mar 30, 2006 11:16 pm
Location: Baton Rouge, LA
Contact:

Post by dragon47 »

I edited the template index.php and entries.tpl files to include my ads -- my own ads at the top of the entries (in the index.php file) and Adsense ads at the end of the first 3 entries.

You can see my two blogs here:
http://www.TheNextWindow.com and
http://blog.terryscomputertips.com

If you want a copy of the index.php or entries.tpl file to see how I did it, PM me. The Adsense ads are dropped straight into the .tpl file, in order to be compliant with Google's Adsense Terms and Conditions.

If your chosen template doesn't have its own index.php file, just copy it from the Default template into your template's folder.

I"m trying to figure out how to include a few variable lines -- preferably generated by php -- at the end of each entry. Theoretically, I could do this with {php} but "secure mode" is turned on - and I don't want to turn it off.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi dragon47!

You could try to use the "config.inc.php" file of your template, as indicated in our technical documentation on s9y.org to pass variables to smarty, which you can then output using {$...}. See the "Advanced Smarty example" in the technical docs.

HTH,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
dragon47
Regular
Posts: 7
Joined: Thu Mar 30, 2006 11:16 pm
Location: Baton Rouge, LA
Contact:

Post by dragon47 »

Thanks, Garvin. I had been trying to make a big jump with config.inc.php, and had tried using config.inc.php. But, I didn't understnad what was happening and kept ending up with a blank page, which wasn't good.

Finally, I did it with baby steps, starting with your sample and then tweaking and tweaking to understand and change it. And succeeded.

I was trying to output HTML fron the function in the config.inc.php file. When I put the HTML into a variable and returned the variable, all was great.

See how I added a single "Ads by Terry" affiliate ad at the end of each blog entry. My php code in the config.inc.php file has 10 different sets of ad data and randomly picks one.

I use the same code elsewhere on my www.terryscomputertips.com site to display multiple ads -- must set one variable to change the number of ads displayed.
dragon47
Regular
Posts: 7
Joined: Thu Mar 30, 2006 11:16 pm
Location: Baton Rouge, LA
Contact:

Post by dragon47 »

I was just looking around for solving some trackback failures. Guess what I found in the FAQ!

The answers to using PHP in templates --
--> http://www.s9y.org/11.html#A30

I think I'll redo my config.inc.php file to "include" my regular "1 ad" php file -- that will make ad maintenance easier.
danmanchester
Posts: 1
Joined: Thu Aug 24, 2006 3:45 pm

Adsense Error

Post by danmanchester »

I am trying to put some adsense ads into an HTML nugget, however every time I try to save it, I get the following error page.

Not Acceptable
An appropriate representation of the requested resource /serendipity//serendipity_admin.php could not be found on this server.

Is there something I am doing wrong?

Cheers, Dan
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Adsense Error

Post by garvinhicking »

Hi!

Please ask your server provider about this. He seems to be using some kind of mod_security module that is not accepting your HTTP form values! It is unrelated to serendipity itself.

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply