Support Forums

Adsense issue

This is a discussion on Adsense issue within the TemplateCodes forums, part of the Third Party Support category; What version of 68 Classifieds are you running? C68 version: v4.2.1 Developer, template Sigma What template are you using? Sigma ...


Go Back   68 Classifieds Forums > Third Party Support > TemplateCodes

Reply
 
Thread Tools Display Modes
Old 01-17-2011, 02:46 PM   #1
Customer
 
Join Date: Oct 2010
Posts: 53
Rep Power: 5
zooi is on a distinguished road
Post Adsense issue

What version of 68 Classifieds are you running?
C68 version: v4.2.1 Developer, template Sigma
What template are you using?
Sigma

Please describe in detail the issue you are having:

I have added Google Adsense in the listings via adsens code in viewlisting.tpl, see below code:

Code:
<table  width="100%" border="0" cellspacing="3" cellpadding="3">
				{if $description<>""}
                <h3>{$smarty.const.LANG_DESCRIPTION}:</h3><hr class="mystyle" />
  				<tr valign="top">
                <td>{$description|nl2br}</p>{mycheckbox id=$view fid=2}</td>
   			    <td align="right">
                {literal}
                <script type="text/javascript"><!--
				google_ad_client = "ca-pub-xxxxx";
				/* Kidsspullen_in_ads */
				google_ad_slot = "xxxxxx";
				google_ad_width = 336;
				google_ad_height = 280;
				//-->
				</script>
				<script type="text/javascript"
				src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
				</script>
                {/literal}
                </td>
  				</tr>
			{/if}
            </table>
Now it appear in Firefox and Safari that during placing a listing
http://www.mydomain.nl/modules.php?m...&cmd=checkout1
....some problems appear.

In firefox it stops with page loading and a blank page appear and in safari only a blank page with the adsense ads. in chrome and IE it works ok and the listing will be placed.

When I remove the adsense code it worked perfect in all browsers

Is the adsense code placed wrong? it is between {literal} adsense code{/literal}

Thank you for any suggestions

Last edited by zooi; 01-17-2011 at 02:49 PM.
zooi is offline   Reply With Quote
Old 01-17-2011, 03:56 PM   #2
Developer & Moderator
 
 
Join Date: Jan 2007
Location: Pennsylvania, USA
Posts: 2,324
Rep Power: 70
Mike-N-Tosh is just really nice Mike-N-Tosh is just really nice
Default

I moved this post to the TemplateCodes support, because this is not an issue with 68 Classifieds. This issue is specific to Quick Checkout.

I don't know specifically, but I would believe that this is most likely a conflict or incompatibility with the javascript. The Quick Checkout module uses a one page checkout system that is controlled through javascript and will only show each section of content when the prior section has been completed.

The link you posted isn't going to work for anyone as it is a link that is during the checkout process which would require that one is already logged into your site with a registered user account and a current session.

Something that I believe you should take into serious consideration is...
Why would you post a Google ad within your customer's ad listing??? If I were a seller on your site, I would be pretty upset that you were showing a third party ad within my ad listing that I am paying for. It's one thing to have ads in the standard layout, but within my ad is a completely different story in my opinion. Have you considered that?
__________________
Mike-N-Tosh
IndianaPC.org - A community website (v3.1.10 Developer - heavily modified & used as the CMS)
Sandbox [localhost(v3.1.10, v4.0.9, 4.1.10,4.2,5.0)] for development and customization
Visit My blog: reviews, tips, tricks, tutorials and my store with Templates, Mods & Docs
Web Hosting | Web Design & Development | 68 Classifieds Customizations
I am not a 68C employee, just a user and try to help out
Mike-N-Tosh is offline   Reply With Quote
Old 01-17-2011, 04:44 PM   #3
All Hands On Deck
 
 
Join Date: Mar 2008
Posts: 3,362
Rep Power: 85
seymourjames is a jewel in the rough
Default

Correct - there is a javascript conflict if you place adsense within the actual viewlisting template file - this shows up when you are using the quick checkout process because it is making use of that file. Basically you can't do it - I tried once myself on a site I own and had to remove the adsense to the the layout.tpl file. This only happened fairly recently and was not always the case.
__________________
"The fool doth think he is wise, but the wise man knows himself to be a fool.".

TemplateCodes.com for 68C, Version 4 Templates & Modules
Get the Best U.S Hosting, Best U.K Hosting
seymourjames is offline   Reply With Quote
Old 01-18-2011, 02:23 PM   #4
Customer
 
Join Date: Oct 2010
Posts: 53
Rep Power: 5
zooi is on a distinguished road
Default

@Mike,

Thank you for moving the post. You are right.
furthermore I don't put the Adsense code directly in the ad. I have splitted the part where the lisitng appear in two coloumns so that the listing is showed at left and the adsens at the right side of the listing.
The content of adsens sows directly relevant links or ads in relation to the ad and in this way the conversion will be much higher (I have done this on some other websites of my with good results)
As I try to keep placing listings for free I need Adsense to cover the costs and to earn some little money.

@Seymourjames
I'm confused. This means a big disadvantage for my site and for my actual plan.
Adsense income is realy important for me and now it seems I have to skip this plan...................
If you see a possible solution, then please let me know.

Thank you all for your input.

Zooi
zooi is offline   Reply With Quote
Old 01-18-2011, 03:08 PM   #5
Developer & Moderator
 
 
Join Date: Jan 2007
Location: Pennsylvania, USA
Posts: 2,324
Rep Power: 70
Mike-N-Tosh is just really nice Mike-N-Tosh is just really nice
Default

Quote:
Originally Posted by zooi
@Seymourjames
I'm confused. This means a big disadvantage for my site and for my actual plan.
Adsense income is realy important for me and now it seems I have to skip this plan...................
If you see a possible solution, then please let me know.
I don't know if this would work and I have not tested this in any way, shape or form. Have you tried using smarty itself to only show this if it is being shown as the "main template file"?

Something like this:
{If $body == "viewlisting.tpl"}
Your code for google adsense
{/if}

When you are in the checkout the body assign wouldn't be to the viewlisting.tpl, so it shouldn't try to show the code. Again, I have not tested this and don't know if it will work, but it's worth a try.

Otherwise, I would simply suggest that you don't use the quick checkout. Just deactivate it in the admin and then you can still use "YOUR PLAN".
__________________
Mike-N-Tosh
IndianaPC.org - A community website (v3.1.10 Developer - heavily modified & used as the CMS)
Sandbox [localhost(v3.1.10, v4.0.9, 4.1.10,4.2,5.0)] for development and customization
Visit My blog: reviews, tips, tricks, tutorials and my store with Templates, Mods & Docs
Web Hosting | Web Design & Development | 68 Classifieds Customizations
I am not a 68C employee, just a user and try to help out
Mike-N-Tosh is offline   Reply With Quote
Old 01-18-2011, 03:44 PM   #6
Customer
 
Join Date: Oct 2010
Posts: 53
Rep Power: 5
zooi is on a distinguished road
Default

Mike,

Thank you!! it works in IE, Chrome, Safari and Firefox
I'm so happy that this is solved. Thank you very much
zooi is offline   Reply With Quote
Old 01-18-2011, 04:59 PM   #7
Developer & Moderator
 
 
Join Date: Jan 2007
Location: Pennsylvania, USA
Posts: 2,324
Rep Power: 70
Mike-N-Tosh is just really nice Mike-N-Tosh is just really nice
Default

Quote:
Originally Posted by zooi
Mike,

Thank you!! it works in IE, Chrome, Safari and Firefox
I'm so happy that this is solved. Thank you very much
No problem. I'm glad it worked for you. It just goes to show you that when there's a will there's... upset relatives!
__________________
Mike-N-Tosh
IndianaPC.org - A community website (v3.1.10 Developer - heavily modified & used as the CMS)
Sandbox [localhost(v3.1.10, v4.0.9, 4.1.10,4.2,5.0)] for development and customization
Visit My blog: reviews, tips, tricks, tutorials and my store with Templates, Mods & Docs
Web Hosting | Web Design & Development | 68 Classifieds Customizations
I am not a 68C employee, just a user and try to help out
Mike-N-Tosh is offline   Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Where Does the Adsense Code Go? howinfo Customizations 4 10-05-2009 06:44 PM
Google AdSense HorseOptions Site Marketing 22 02-09-2009 07:16 AM
Adsense for Search teg Modules / Plugins / Modifications 2 03-17-2008 08:42 AM


All times are GMT -4. The time now is 05:32 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2011, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0