View Full Version : Adsense not showing within the page
I am trying to place Adsense code between paragraphs of an article in a vBa CMPS page and it will not show up. The page is a BB Code Page that allows HTML. Is this not possible on that type of page, or is there another problem?
Thanks for any help.
Jim
RiSiCO
12-26-2007, 04:55 AM
Same problem here....
Brian
12-26-2007, 03:21 PM
I would *think* that adsense code would still work on a BB code page. If it's not though you may want to try either switching the page to a template page, or you could possibly just add the adsense code as a separate template module.
Modules work fine on the page, Brian, but I want to place Adsense ads IN the article, between paragraphs or something. There are a lot of article pages that I would like to do this to for myself and one of my clients. It would take a lot of work to recode all the pages. Isn't there something that can be done with the BB Code page setup to allow me to place a script ad (I am able to place text/image link ads) within the vBa pages?
Thanks,
Jim
Brian
12-26-2007, 06:28 PM
I just did a little more testing with this locally. It looks like if you remove all of the line breaks in the Adsense code so that everything is on one line, then it should work with a BB code page.
<script type="text/javascript"><!--
google_ad_client = "pub-0716287567211556";
//468x60, created 12/17/07
google_ad_slot = "6633235172";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
Thanks, Brian.
In the example above, where are the page breaks that I need to remove? Is it simply needed to delete one space at the end of each line so the lines above all run together?
Brian
12-28-2007, 12:05 PM
Yes, you just need to delete any spaces (or carriage returns) at the end of each line so that the entire code is on one line. This well prevent the BB code parser from converting those into <br /> tags.
Brian, thanks but that's not working. Is it possible that at least one of the spaces at the ends of the lines above are not page breaks and they must remain in order for the code to work. If so, can you tell me which ones are candidates?
RiSiCO
12-28-2007, 01:52 PM
try to replace " with ' ... i think that will work....
RiSiCO
12-28-2007, 01:57 PM
try first all then if that dosen't work keep fisrt " and the last " ....
Julian09
12-29-2007, 09:59 PM
<script type="text/javascript"><!--
google_ad_client = "pub-0716287567211556";
//468x60, created 12/17/07
google_ad_slot = "6633235172";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
Thanks, Brian.
In the example above, where are the page breaks that I need to remove? Is it simply needed to delete one space at the end of each line so the lines above all run together?
So in this example...should it look like this?
<script type="text/javascript"><!--google_ad_client = "pub-0716287567211556";//468x60, created 12/17/07google_ad_slot = "6633235172";google_ad_width = 468;google_ad_height = 60;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
So in this example...should it look like this?
<script type="text/javascript"><!--google_ad_client = "pub-0716287567211556";//468x60, created 12/17/07google_ad_slot = "6633235172";google_ad_width = 468;google_ad_height = 60;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
Please use the code BB Code to post code.
The above doesn't work either. I tried several variations and finally was able to get Adsense to display, but the format was all screwed up - the horizontal ad appeared to have 6 ads on top of each other in a tower like appearance. I also tried replacing double quotes with single quotes in a number of configurations, but nothing worked.
Adsense ads will not display properly on a CMPS BB Code page. I hope Brian will find some time to look into it, as it's prob'ly a PHP issue that he might be able to resolve.
Jim
Brian
12-31-2007, 12:10 PM
So in this example...should it look like this?
<script type="text/javascript"><!--google_ad_client = "pub-0716287567211556";//468x60, created 12/17/07google_ad_slot = "6633235172";google_ad_width = 468;google_ad_height = 60;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
Close, but your code seems to have a couple of comment lines in it that may be throwing things off. See if you get any better results with this:
<script type="text/javascript"><!-- google_ad_client = "pub-0716287567211556"; google_ad_slot = "6633235172"; google_ad_width = 468; google_ad_height = 60; //--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
eJM - Maybe try the same code I posted above, but of course with your Google clientid instead?
Thanks for the reply, Brian. I had tried that code before and it does get the Adsense on the page. My clientid, as well as the width and slot numbers are different, but I'm sure it would be a similar result with a wider ad (mine is 234px, not 468). Here's what mine looks like on the page (cropped for space savings):
http://www.enterprisejm.com/images/support/adsense-in-cmps-bb-page1.gif
That's 160x600px and I have NO idea how it was interpreted that way. http://www.grumpsplace.com/images/smilies/didnt_know.gif
Jim
Brian
12-31-2007, 01:12 PM
Huh... Can you post the exact code you're using? Of course you can omit the publisher id if you'd like though.
Hi Brian,
Shouldn't you be partying? :D
The code I use is nearly identical to the code you use, with the exception of the width, slot code and client ID. Maybe it would help if I posted the code for the whole page:
<table class="tborder" style="text-align:center;margin:0 auto;" border="1" cellpadding="0" cellspacing="0" width="100%"><tr><td class="alt2" style="border:1px solid #64878E;"><table style="text-align:left;"><tr><td style="text-align:left;"><div style="margin:10px;"><!-- CONTENT SPACE -->by Jim McClain - March 2007<h2>Patching Vinyl Floors</h2><h3>A small repair for the professional or do-it-yourselfer</h3>
<p class="smallfont" style="text-align:right;">View larger images in the "<a target="_blank" title="Photo Essay: Preparation." href="http://www.thefloorpro.com/how-to/patching_vinyl_floors1_photos.php"><strong>PHOTO ESSAY: Patching Vinyl Floors - Preparation</strong></a>" in a new window or tab.</p><p>I have not seen an older vinyl floor, in my more than 3 decades in this business, that hasn't sustained some kind of minor damage. Many of the dings, nicks, burns and tears go unrepaired and then they multiply. Repairing small damage to a vinyl floor is relatively easy and I have always felt that a moderately capable do-it-yourselfer could accomplish it. But it's surprising how many DIYers will tackle larger, more complicated tasks and not attempt patching their vinyl floor. What is even more surprising is to see the repairs done by professionals -- yes, see. The seams split, corners curl or the patch looks like it was outlined with a Magic Marker.</p>
<script type="text/javascript"><!-- google_ad_client = "pub-9810796004460131"; google_ad_slot = "6107466388"; google_ad_width = 234; google_ad_height = 60; //--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<p>This how-to will guide the home handyman (or woman) or the pro in the successful repair of today's sheet vinyl products sold for residential use. It's a method I have employed for many years -- long enough for me to see how it looks 5, 10 and even 15 years afterward. I believe a patched vinyl floor should not be seen. Of course, if you use a brand new scrap to patch a well worn area, you will see a difference in the luster, texture and clarity of the design. But the patterns and/or grout lines should blend so that when the area has received some traffic, you will not be able to notice the patch.</p><h3>Preparations</h3><p>Let's get on with the guide. For this project, you will need a few tools and supplies. The picture of the damage below is of a burn that includes two of the slate patterns, but this guide can be used for larger or smaller patches and for most other patterns. The list below includes professional tools. Alternative tools are in parenthesis.</p><div style="float:right;margin:0 0 6px 6px;clear:both;"><img style="width:236px;height:178px;border:0;" src="http://www.thefloorpro.com/images/how-to/patch_vinyl01s.jpg" alt="" /></div><ul><li>Clean cotton rags</li><li>Mineral Spirits</li><li>Your favorite vinyl knife (sharp utility knife)</li><li>Framing square</li><li>Wood chisel and/or small scraper</li><li>Fine notched trowel (throw-away paint brush)</li><li>Premium vinyl adhesive (multi-purpose adhesive)</li><li>Painters blue masking tape</li><li>Seam roller/stair tool (stiff putty knife)</li><li>Seam sealer kit</li><li>A scrap of the vinyl big enough to make the repair</li></ul><div style="float:right;margin:0 0 6px 6px;clear:both;"><img style="width:236px;height:178px;border:0;" src="http://www.thefloorpro.com/images/how-to/patch_vinyl02s.jpg" alt="" /></div><p>After gathering the scrap, your tools and supplies, the most obvious task is to clear and clean the area to be repaired. Using mineral spirits and a white cotton terry cloth rag will cut any buildup of dirt and floor finishes without damaging the vinyl flooring. The scrap must also be cleaned thoroughly in the same manner. Here, I also had a bi-fold door to remove and the bracket that it pivoted on.</p>
<div style="float:right;margin:0 0 6px 6px;clear:both;"><img style="width:236px;height:178px;border:0;" src="http://www.thefloorpro.com/images/how-to/patch_vinyl04s.jpg" alt="" /></div><p>Our pattern size may look equal on all sides, but it isn't. Because of vinyl's slight elasticity, the pattern elongated a small amount in the manufacturing process. You can see this plainly when you try to match grout lines along a seam. You must find the side of the scrap that matches the spacing of the grout lines. In this way, you will know the proper direction of the material.</p>
<div style="float:right;margin:0 0 6px 6px;clear:both;"><img style="width:236px;height:178px;border:0;" src="http://www.thefloorpro.com/images/how-to/patch_vinyl05s.jpg" alt="" /></div><p>Next, you must try to find the pattern that most closely matches the damaged portion. The nature of scraps is that you rarely will find an exact match, but if you can find an area that will blend well, your patch will not look like a patch. In this photo, I have found 2 side-by-side slate patterns that, while not being a perfect match of the damage, do tend to have grain patterns that are similar and are not duplicates of any of the slate tiles adjacent to the patch area.</p>
<div style="float:right;margin:0 0 6px 6px;clear:both;"><img style="width:236px;height:178px;border:0;" src="http://www.thefloorpro.com/images/how-to/patch_vinyl06s.jpg" alt="" /></div><p>This next step we will be cutting the patch to the exact size that we need. As you can see from the picture at right, I am cutting <em>on top of</em> another piece of scrap. Many times there is no good place to cut the scrap. It requires a smooth, flat surface and the knife must cut cleanly all the way through in a single pass without damaging the surface under it. Use protection - a scrap of vinyl, some plywood, anything disposable. Use a framing square to cut one side and one end. Then flip the square and cut the other side and end. Hold the knife straight up and down - no tilting allowed.</p>
<div style="float:right;margin:0 0 6px 6px;clear:both;"><img style="width:236px;height:178px;border:0;" src="http://www.thefloorpro.com/images/how-to/patch_vinyl07s.jpg" alt="" /></div><p>As you can see, I left the grout line on the patch piece. The grout could have also been taken completely off, or one side and end could have the grout line and the other side and end could have the grout line removed. What is more important is that you do not cut through the <em>middle</em> of the grout line. It will show if you do. The line where the patch and the existing vinyl must be nearly invisible. Do that by cutting at the very edge of the grout line. Most grout lines are not straight, so just get as close to the edge of the grout line as possible, without cutting into the sides of the pattern (in this case, slate tiles).</p>
<p style="clear:both;">We are ready to begin removing the damaged portion of the floor now. Please follow along on the next few pages, while we continue this repair.</p><p class="smallfont" style="text-align:center;">View larger images in the "<a target="_blank" title="Photo Essay: Preparation." href="http://www.thefloorpro.com/how-to/patching_vinyl_floors1_photos.php"><strong>PHOTO ESSAY: Patching Vinyl Floors - Preparation</strong></a>" in a new window or tab.</p>
<div style="text-align:center;margin:0 auto;clear:both;"><a title="No previous." href="##">Previous</a> - <small><a title="You are here." href="##">Page 1: Preparations</a> | <a title="Patching Vinyl Floors - Out With The Old" href="http://www.thefloorpro.com/how-to/patching_vinyl_floors2.php">Page 2: Out With The Old</a> | <a title="Patching Vinyl Floors - In With The New" href="http://www.thefloorpro.com/how-to/patching_vinyl_floors3.php">Page 3: In With The New</a></small> - <a title="Patching Vinyl Floors - Out With The Old" href="http://www.thefloorpro.com/how-to/patching_vinyl_floors2.php">Next</a></div>
<hr style="width:80%; text-align:center; margin:0 auto; clear:both;" />
If you would like to discuss this article, or any of the other articles you have found here at TheFloorPro.com, please join us in the <a href="http://www.thefloorpro.com/community/article-discussion-forum/1640-patching-vinyl-floors-by-jim-mcclain.html">Articles Discussion Forum</a>. If you are not yet a member of The Floor Pro Community, we invite you to <a href="http://www.thefloorpro.com/community/register.php">register now</a>, it's free and gives you the opportunity to enjoy all the features of the site.
<!-- /CONTENT SPACE --></div>
</td></tr></table></td></tr></table><br /><br />
For those interested in the page that refers to, here is a link to it, sans the Google ad inside the article body: http://www.thefloorpro.com/how-to/patching_vinyl_floors1.php
The screen shot I provided in my previous post, Brian, is exactly what that page looked like with the code used above. I use the BB Code page creation and allow HTML. All my articles were done the same way and one of my clients uses BB Code almost exclusively. Hopefully there is a way to make this work. Thanks for helping us out.
Jim
PS: I edited this post after I discovered there were 18 validation errors in my page. I corrected all the errors, it validates XHTML Transitional, but the Adsense code still has the same result. It's valid though. :D
Brian
01-02-2008, 04:12 PM
Hi Brian,
Shouldn't you be partying? :D
Partying? What's that again? :p
I tried doing some tests with your code locally with a template and BB code module, but got the same results with each. Couldn't really tell if it was working properly though, I assume since it's on my localhost. I'm not really sure what else might be causing that problem in your case, but if you would like to submit a support ticket I'll be glad to take a look at things for you.
Will do, okie-dokie, over 'n' out. :D
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.