Since I can't add Ad Code that uses Javascript directly into my Content field (gets remarked out during the publish step), is there a way a placeholder could be added so that the code could be added there, then a placeholder like ***ad1*** could be stuck into the content area (like ***image#*** and it gets processed when published? The code added into the Ad placeholder would be in PHP that would run through my Ad Manager software to display an Ad that would be either Javascript or HTML.

The purpose would be to put an Ad Group code into the content. This Ad Group code would be in PHP to be able to display ALL types of ad code. That Group Code would be a group related to that particular article's content, like fishing. Only fishing related Ads would display and would be either random or contextual based depending on what my Ad Management software figured would be best.

I've added the PHP code in the template of the Article Page, but all the ads appear a the bottom of the article, I'd rather have them in the content area itself.

Any suggestions?

Re: [gwiley] Placeholder for Ad Code

I wrap ad codes of google adsense using

https://docs.google.com/Doc?docid=0AR2-8_4-7slRZGY5emY3NGRfM2NmZmJic2N3&hl=en

I put the codes right above the content placeholder I want the ads to appear in and the ads appear in the content.

Re: [Kimber] Placeholder for Ad Code

Thanks for the reply, Kimber! Unfortunately, I don't fully understand what you're doing, though. Are you using the My Placeholders page, creating a new placeholder, i.e. my.googlead, and adding your google ad code and inserting that placeholder, i.e. $my.googlead$, directly into the content area where you type the article?

If not, do you have sample code of what you're doing?

Thanks!

Re: [gwiley] Placeholder for Ad Code

In Admin > Template Editor > articlePages/articlePage.html

I put:

<div style="display:block;float:right;margin: 5px;">
My Google Codes
</div>
<div class="content">
<br> $article.content$
</div>

I am not using placeholder for the ad codes. I am wrapping them directly in the page.

Example: http://www.momsbreak.com/printable/craftpaper/balloonpaper3.shtml

Does that help?

Re: [Kimber] Placeholder for Ad Code

I see what you're doing. It's not *exactly* what I was looking for, but closer than what I have now. Thanks very much for your input! I was hoping more for placing it anywhere in the content area just not wrapped around the top or the bottom in some fashion. But, that'll bring my Ad up from the bottom of the page and make it look more integrated than in the disjointed fashion it is now.

Thank you very much! I owe ya one!

Re: [gwiley] Placeholder for Ad Code

I use to use Article Manager as my primary web site software and that is the closest I have ever gotten to getting the ads in the content. I know some place on the forum, if you search, there is an article on making ad show up much ever so many paragraphs so you might try searching the forum for that article.

Re: [Kimber] Placeholder for Ad Code

I found the article you're talking about. I can use that to do EXACTLY what I wanted. Thanks!

For those that need it, here's what I did. It wrapped the text in the content area around a 250x250 Google Ad with a right-justify a couple paragraphs down. Embedded all snug.

1. Connect with your web server and look for the "articlePage.html" template file, this file can be found inside the /templates/articlePages/ directory. :)

2. Open up this template file and look for this bit of code:

$article.content$

Change it to this:

<p>$article.content:limitParagraphs(1-2)$

<!-- templateIf: $article.content:limitParagraphs(2)$ ne "" -->


<div style="display:block;float:right;margin: 5px;">
<!-- Place your Adsense code here BEGIN-->
!!!Google Code HERE!!!
<!-- Place your Adsense code here END-->
<br>
</div>

<!-- /templateIf -->

$article.content:limitParagraphs(3+)$</p>

This is what it looks like: http://funreviews.net/publish/SportsandRecreation/Les_Baer_s_Tactical_Recon.php

Re: [gwiley] Placeholder for Ad Code

Happy to help