Main
Index
Search
Posts
Who's
Online
Log
In

Home: Discontinued/Classic Products: Article Manager 2:
Adsense tutorial

 

 


johnniefp
User

Jan 9, 2007, 3:26 AM

Post #1 of 21 (9683 views)
Shortcut
Adsense tutorial Can't Post

Hello,

Could we have an adsense intergration tutorial please.
I know adsense usage is simple but something that expands into whats possible with AM2 & Adsense would be great. (best practices?)

thanks
john


ross
Staff / Moderator


Jan 10, 2007, 11:10 AM

Post #2 of 21 (9663 views)
Shortcut
Re: [johnniefp] Adsense tutorial [In reply to] Can't Post

Hi John

Thanks for posting!

I actually think there are going to be more options for adsense than I think would fit into one tutorial so I was curious if you could give me some more details about how you wanted to work with adsense.

That way, I can narrow down a better tutorial for you. How does that sound? I look forward to hearing from you Smile.
-----------------------------------------------------------
Cheers,
Ross Fairbairn - Product Specialist
support@interactivetools.com

Hire me!  Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/



johnniefp
User

Jan 10, 2007, 11:36 AM

Post #3 of 21 (9660 views)
Shortcut
Re: [ross] Adsense tutorial [In reply to] Can't Post

Hello Ross.

Well the first thing that has me wondering is how askthebuilder managed to get ads *within* the content on this page:
http://www.askthebuilder.com/How_to_Make_a_Video.shtml

I see two rectangle adsense blocks, the first I think is just placeing the code before the content placeholder in the template, how have they managed the second block? (4 para's below the video clip)

Thanks
John


ross
Staff / Moderator


Jan 11, 2007, 2:45 PM

Post #4 of 21 (9648 views)
Shortcut
Re: [johnniefp] Adsense tutorial [In reply to] Can't Post

Hi John

Thanks for getting back to me!

With Ask the Builder, they are actually adding the adsense code right into the content box as they create the article. Same thing with the google video. You'll also be able to do this so that won't be a problem.

There are other options for the adsense code as well though. For example, you could setup your template so that it displays a google add after the 4 paragraph automatically if you like.

By adding it to the content though, you'll have complete control over where it appears as you create the article. Putting it onto template means you won't need to worry about it each time you create an article. It's also easier to update because you would only have to go to one template instead of potentially thousands of templates.

Does that all help? Feel free to post up anymore questions you have Smile.
-----------------------------------------------------------
Cheers,
Ross Fairbairn - Product Specialist
support@interactivetools.com

Hire me!  Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/



johnniefp
User

Jan 12, 2007, 3:38 AM

Post #5 of 21 (9638 views)
Shortcut
Re: [ross] Adsense tutorial [In reply to] Can't Post


Quote
There are other options for the adsense code as well though. For example, you could setup your template so that it displays a google add after the 4 paragraph automatically if you like.

That sounds like what we're after.
How can you do this?

Thanks
john

p.s. any tips on what else can be done would be great.


ChetW
Staff


Jan 13, 2007, 4:42 PM

Post #6 of 21 (9618 views)
Shortcut
Re: [johnniefp] Adsense tutorial [In reply to] Can't Post

Hi John,

Thanks for the follow-up!

I have put together a tutorial here that will make use of the limitParagraphs placeholder modifier. This modifier will let you tell Article Manager that between paragraphs three and four you would like to have Adsense code appear! Does this sound like a solution that might work for you John? If so follow the steps below:

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-4)$

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

<br/>

Place you Adsense code here

<br/>

<-- /templateIf -->

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

What the above code will do is place your Adsense ads after the articles fourth paragraph, then move on to finish the rest of the article. :)

Give this a try John and if you have any other questions please feel free to ask!


Cheers,
Chet Woodside - Product Specialist
support@interactivetools.com

[hr][i][url "http://www.interactivetools.com/consulting/"][b]Hire me![/b][/url]
Save time by getting our experts to help with your project. Template changes, advanced features, full integration, whatever you need. Whether you need one hour or fifty, get it done fast with [url "http://www.interactivetools.com/consulting/"][b]Priority Consulting[/b][/url].[/i]


barkhad
User

Jun 25, 2007, 10:20 PM

Post #7 of 21 (9419 views)
Shortcut
Re: [ChetW] Adsense tutorial [In reply to] Can't Post

Hey Guys,

I came across this post and I implemented the same concept....However i got this result.

http://www.garoweonline.com/artman2/publish/Opinion_20/Global_Insecurity_Conflicts_heat_up.shtml

I can't seem to get the text to come on the right side of the adsense etc.

If iam doing anythign wrong let me know please.

Here is the code:

===================================

<span class="general_text">

<table border=0 cellspacing=0 cellpadding=0 width=100%>

<tr>

<td><span class="article_text">

<span class="article_title">$article.title$</span><Br>

<span class="article_date_time">$article.date:format(d)$ $article.date$</span>

<br>


<br>

</span><p></p></td>
</tr>
</table>

<span class="article_text">



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

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

<br/>

<script type="text/javascript"><!--
google_ad_client = "pub-9706227828388982";
google_ad_width = 300;
google_ad_height = 250;
google_ad_format = "300x250_as";
google_ad_type = "text_image";
//2007-06-25: Garowe Online
google_ad_channel = "0936817755";
google_color_border = "FFFFFF";
google_color_bg = "FFFFFF";
google_color_link = "0066CC";
google_color_text = "000000";
google_color_url = "0066CC";
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

<br/>

<!-- /templateIf -->

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




<!-- templateCell : pageDefault.embeddedMedia -->

<!-- templateIf : $file.caption$ ne '' -->
<table border=0 cellspacing=2 cellpadding=0 width=$file.width$ align=$file.align$>

<tr><td><img src="$file.webUrl$" height="$file.height$" width="$file.width$" border=1></td></tr>

<tr><td><span class="image_caption">$file.caption$</span></td></tr>
</table>
<!-- /templateIf -->

<!-- templateIf : $file.caption$ eq '' -->
<table border=0 cellspacing=2 cellpadding=0 width=$file.width$ align=$file.align$>

<tr><td><img src="$file.webUrl$" height="$file.height$" width="$file.width$" border=1></td></tr>
</table>
<!-- /templateIf -->

<!-- /templateCell : pageDefault.embeddedMedia -->




</span>


====================================

Cheers
Barkhad


Jake
Staff


Jun 27, 2007, 9:47 AM

Post #8 of 21 (9381 views)
Shortcut
Re: [barkhad] Adsense tutorial [In reply to] Can't Post

Hi barkhad,

Thanks for posting!

This looks like something that's being caused by your stylesheet. You'll want to check your "article_text" or "general_text" classes to make sure that they're set up correctly to wrap text to the right side of your page.

Let us know if you have any other questions. Smile
-----------------------------------------------------------
Cheers,
Jake Marvin - Product Specialist
support@interactivetools.com

[hr][i][url "http://www.interactivetools.com/consulting/"][b]Hire me![/b][/url]
Save time by getting our experts to help with your project. Template changes, advanced features, full integration, whatever you need. Whether you need one hour or fifty, get it done fast with [url "http://www.interactivetools.com/consulting/"][b]Priority Consulting[/b][/url].[/i]


thatscountry
User

Jul 4, 2007, 6:37 PM

Post #9 of 21 (9293 views)
Shortcut
Re: [barkhad] Adsense tutorial [In reply to] Can't Post

You need to put your adsense code in a floating table in order to have your content wrap around your ads.

***************

Marti Clayton
[url "http://www.thatscountry.com"]That's Country[/url] 


aeadviser
User

Sep 25, 2007, 7:07 PM

Post #10 of 21 (9033 views)
Shortcut
Re: [ross] Adsense tutorial [In reply to] Can't Post

When I tried to add the Google adsense code directly into the article within the AM WYSWYG source editor, the source editor changes the code so the adsense code does not work. However if I use a different editor, using the same adsense code, it does work just fine.

Can someone tell me why the AM WYSWYG editor changes the Google code? And is there a way to avoid this.

Below is an example, the changes are surrounded by ????:
<table align="left">
???????<tbody>?????
<tr>
<td align="left">
<script type="text/javascript">
?????//<![CDATA[ ?????
<!--
google_ad_client = "pub-xxxxxx";
google_ad_width = 250;
google_ad_height = 250;
google_ad_format = "250x250_as";
google_ad_type = "text_image";
//2007-09-25:
google_ad_channel = "xxxxxx";
google_color_border = "FFFFFF";
google_color_bg = "FFFFFF";
google_color_link = "214B63";
google_color_text = "214B63";
google_color_url = "214B63";
google_ui_features = "rc:0";
//-->
?????//]]>?????
</script>
<script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript">
?????//<![CDATA[ //]]>???????
</script>
????<br>?????
</td>
</tr>
?????</tbody>????
</table>

thanks,


Jake
Staff


Sep 26, 2007, 12:52 PM

Post #11 of 21 (9021 views)
Shortcut
Re: [aeadviser] Adsense tutorial [In reply to] Can't Post

Hi aeadviser,

Thanks for your post!

Unfortunately there's no way to disable the extra code that the WYSIWYG editor introduces. The best way to address this problem is to either change your WYSIWYG field to a plain text field, or to set up a new plain text field in the Database Editor for adding the AdSense code.

Let us know if you'd like more specifics on either of these approaches. Smile
-----------------------------------------------------------
Cheers,
Jake Marvin - Product Specialist
support@interactivetools.com

[hr][i][url "http://www.interactivetools.com/consulting/"][b]Hire me![/b][/url]
Save time by getting our experts to help with your project. Template changes, advanced features, full integration, whatever you need. Whether you need one hour or fifty, get it done fast with [url "http://www.interactivetools.com/consulting/"][b]Priority Consulting[/b][/url].[/i]


aeadviser
User

Sep 26, 2007, 7:17 PM

Post #12 of 21 (9017 views)
Shortcut
Re: [Jake] Adsense tutorial [In reply to] Can't Post

Hi Jake,

Could you explain your statement "or to set up a new plain text field in the Database Editor for adding the AdSense code" a little more? Do you mean have both the WYSIWYG and plain text editors showing up, in two separate fields?

I assume by doing this the article would contain two separate areas; one from the WYSIWYG content box and one from the plain text box.

I am not a HTML coding expert, can you enter HTML code into the plain text box and get the formating to display?

thanks,


MikeB
Staff


Sep 27, 2007, 4:36 PM

Post #13 of 21 (9007 views)
Shortcut
Re: [aeadviser] Adsense tutorial [In reply to] Can't Post

Hi,

Thanks for posting! Smile

Yes, this is what Jake is referring to, you'll create a new field in the "Database Editor" section of Article Manager and this new field is where you can paste your AdSense code.

When you add HTML code to this field you should find that the software will output this as HTML code on the live site and your AdSense should show up fine.

I hope this helps! Smile

Cheers,
Mike Briggs - Product Specialist
support@interactivetools.com

[hr][i][url "http://www.interactivetools.com/consulting/"][b]Hire me![/b][/url]
Save time by getting our experts to help with your project. Template changes, advanced features, full integration, whatever you need. Whether you need one hour or fifty, get it done fast with [url "http://www.interactivetools.com/consulting/"][b]Priority Consulting[/b][/url].[/i]


Kimber
User

Nov 28, 2007, 3:05 AM

Post #14 of 21 (8480 views)
Shortcut
Re: [ChetW] Adsense tutorial [In reply to] Can't Post


In Reply To
Hi John,

Thanks for the follow-up!

I have put together a tutorial here that will make use of the limitParagraphs placeholder modifier. This modifier will let you tell Article Manager that between paragraphs three and four you would like to have Adsense code appear! Does this sound like a solution that might work for you John? If so follow the steps below:

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-4)$

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

<br/>

Place you Adsense code here

<br/>

<-- /templateIf -->

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

What the above code will do is place your Adsense ads after the articles fourth paragraph, then move on to finish the rest of the article. :)

Give this a try John and if you have any other questions please feel free to ask!




Hello,



I by ftp to /artman2/templates/articlePages and download articlePage.html



I made a back up copy incase so if made a mistake I could replace it back to the orginal



I then use find and replace to replace $article.content$ with



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



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



<br/>



<script type="text/javascript"><!--

google_ad_client = "pub-000000000000";

google_ad_width = 300;

google_ad_height = 250;

google_ad_format = "300x250_as";

google_ad_type = "text_image";

//2007-11-28: Article Inside

google_ad_channel = "9990973764";

google_color_border = "FFFFFF";

google_color_bg = "C3D9FF";

google_color_link = "003366";

google_color_text = "000000";

google_color_url = "0066FF";

google_ui_features = "rc:10";

//-->

</script>

<script type="text/javascript"

src="http://pagead2.googlesyndication.com/pagead/show_ads.js">

</script>



<br/>



<-- /templateIf -->



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



And the ad showed but I lost my template all together see http://www.momsbreak.com/articles/School_53/Creating_a_Successful_School_Christmas_Program.shtml for an example.



I tired to put the old back up file in to put it back to before I added the codes but that did no good. Still not template on the article themselves.

-- -



I redownloaded the articlepage file at and check it line by line and it looks fine:



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">



<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>

<title>$my.siteName$ $article.title$</title>



<meta name="Description" content="$my.siteDescription$" />

<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />

<link rel="stylesheet" href="../$settings.webfolder_url$style/stylesheet.css" type="text/css" />

<link rel="alternate" type="application/rss+xml" title="$my.siteName:textOnly:htmlEncoded$ $my.siteDescription:textOnly:htmlEncoded$" href="../$published.globalRSS.webpath$" />



</head>



<body>

<!-- wrap starts here -->

<div id="wrap">



<!--header -->

<!--#include virtual="$published.siteHeader.webpath$" -->





<!-- menu -->

<div id="breadcrumb">

<span><a href="../$published.globalIndex.url$">$my.homepageName$</a> :

<!--#include virtual="$published.categoryBreadcrumb.webpath$" -->

</span>

</div>



<!-- content-wrap starts here -->

<div id="content-wrap">



<div id="sidebar">





<!--#include virtual="$published.categoryMenu.webpath$" -->





</div><!-- ends sidebar -->



<div id="main">

<h1>$article.title$</h1>

<div class="art-info-1">

Posted in: <!-- template insert : $article.categoryList$ -->

<!-- templatecell : categoryRow -->

<!-- templateIf: $isLastCategory$ != "1" -->

<a href="../$published.categoryIndex.url$">$category.name$</a>,

<!-- /templateIf -->

<!-- templateIf: $isLastCategory$ == "1" -->

<a href="../$published.categoryIndex.url$">$category.name$</a>

<!-- /templateIf -->

<!-- /templatecell : categoryRow --><br/>



By $article.art_field1$<br/>

$article.date$</div>

<div class="art-info-2">

<a href="http://digg.com/submit?phase=2&amp;url=$published.articlePage.url:urlEncoded$&amp;title=$article.title:urlEncoded$&amp;bodytext=$article.summary:maxWords(40):textOnly:urlEncoded$" class="digg">Digg this story!</a><br/>



<a href="mailto:?subject=$article.title:urlEncoded$&amp;body=$published.articlePage.url:urlEncoded$" class="email">Email this article</a><br/>

<a href="../$published.articlePrinterPage.url$" class="print">Printer friendly page</a>

</div><br style="clear: both;" />





<div class="content">

$article.content$

<br>

<u>$article.art_field1$'s Bio:</u>

<em>$article.authorBio$</em>

</div>





<!-- templateIf : $article.attachments$ ne "" -->

<br style="clear: both;" />

<ul>

<li style="list-style-type:none;"><b>Click to download the attached file(s):</b></li>

<!--templateInsert : $article.attachments$ -->

</ul>

<!-- /templateIf -->

<!-- templatecell : article.attachments.row -->

<li><a href="../$file.weburl$">$file.title$</a></li>

<!-- /templatecell : article.attachments.row -->



<br style="clear: both;" />











<!-- main ends here -->

</div>



<!-- content-wrap ends here -->

</div>



<!--#include virtual="$published.siteFooter.webpath$" -->



<!-- wrap ends here -->

</div>



</body>

</html>



Why did I loose my template? I did exactly what this said!



HELP! - I also email on you on this.



Thank you

Kimberly


Jake
Staff


Nov 29, 2007, 4:28 PM

Post #15 of 21 (8438 views)
Shortcut
Re: [Kimber] Adsense tutorial [In reply to] Can't Post

Hi Kimberly,

I tried to look at the page that you provided a link to, but it returned a "Not Found" error. It's probably best to handle this through email so expect to hear back from us that way. Smile
-----------------------------------------------------------
Cheers,
Jake Marvin - Product Specialist
support@interactivetools.com

[hr][i][url "http://www.interactivetools.com/consulting/"][b]Hire me![/b][/url]
Save time by getting our experts to help with your project. Template changes, advanced features, full integration, whatever you need. Whether you need one hour or fifty, get it done fast with [url "http://www.interactivetools.com/consulting/"][b]Priority Consulting[/b][/url].[/i]


Kimber
User

Nov 29, 2007, 5:46 PM

Post #16 of 21 (8437 views)
Shortcut
Re: [Jake] Adsense tutorial [In reply to] Can't Post


In Reply To
Hi Kimberly,

I tried to look at the page that you provided a link to, but it returned a "Not Found" error. It's probably best to handle this through email so expect to hear back from us that way. Smile



Thanks, I worked with Ross and he got it all moved to a better place. My article manager had been migrated and I think the migration company messed it up in the move it but all running great now,

Thanks


carminejg3
User

Mar 31, 2009, 11:40 PM

Post #17 of 21 (5758 views)
Shortcut
Re: [Kimber] Adsense tutorial [In reply to] Can't Post

do you know if there is a way to do an if check to see if the article has more then a certain number of paragraphs, then insert an adsense block.

like check to see if it has 8 paragraphs or more if it does add a code snippet after paragraph 5?


Webmaster [wink]
http://news.carjunky.com


Donna
Staff / Moderator


Apr 2, 2009, 2:14 PM

Post #18 of 21 (5734 views)
Shortcut
Re: [carminejg3] Adsense tutorial [In reply to] Can't Post

Hi there,

Yep, Article Manager has a "limitParagraphs" modifier. See this page for details:

http://www.interactivetools.com/docs/doc.cgi?/articlemanager2/templates/modifiers_limitParagraphs.html

Basically, to use this, you would have something like this:

$article.content:limitParagraphs(1-5)$

Your Adsense Code

$article.content:limitParagraphs(5+)$

Let me know if that works for you. :)

Donna

--
support@interactivetools.com


carminejg3
User

Apr 8, 2009, 9:11 PM

Post #19 of 21 (5655 views)
Shortcut
Re: [Donna] Adsense tutorial [In reply to] Can't Post

what im trying to see is if there is anything to count the total amount of paragraphs first...

then if there are more then say 8 paragrahps to add a code snippet like you posted, at postition between paragraph 5


Webmaster [wink]
http://news.carjunky.com


Donna
Staff / Moderator


Apr 10, 2009, 11:44 AM

Post #20 of 21 (5621 views)
Shortcut
Re: [carminejg3] Adsense tutorial [In reply to] Can't Post

Hmm. Not by default, no. Although you could add in a field where you could manually say whether or not the adsense code should be published, and then setup a templateIf that pops it in if that flag is set.

Would that work for you?

Donna

--
support@interactivetools.com


carminejg3
User

Apr 10, 2009, 11:48 AM

Post #21 of 21 (5619 views)
Shortcut
Re: [Donna] Adsense tutorial [In reply to] Can't Post

well it will work, i was just looking to try a second adsense block about 8 paragraphs down if the article was over 10... but at least there is the option of setting the field and i could scan the files to see the file size, this way I could go check the box on the larger files knowing they have more text.



Thank you.


Webmaster [wink]
http://news.carjunky.com