PDA

View Full Version : how add google adsense


peticito
01-02-2008, 03:32 PM
hello i test vivvo csm, is great...

but how add google adds?

any ideas?

dcei
01-02-2008, 11:35 PM
I am curious as well. I see that in forums for v3.x, it is possible to do by modifying the article_Full.tpl where you place floated div inside article_body div like this:

<div class="plainTxt" id="article_body">

<div style="float:right; padding:5px;">Ad sense code</div>

{ARTICLE_BODY}

</div>

That would float the google code to the top right, inside your article. But now we're using latest version, and unable to find file called article_Full.tpl. Does anyone know how to do this within the new vivvo version?

Micha
01-03-2008, 08:13 AM
You can find article template in templates\xhtml\article\default.tpl folder.

azednet
01-03-2008, 09:56 AM
You can find article template in templates\xhtml\article\default.tpl folder.

and how to ad adsense javascript code to homepage template please ?

andy77
01-03-2008, 10:22 AM
/templates/xhtml/homepage/default.tpl

I suggest you refer to http://www.vivvo.net/doc/v4/developer_manual/templates_system.php

azednet
01-03-2008, 10:48 AM
/templates/xhtml/homepage/default.tpl

I suggest you refer to http://www.vivvo.net/doc/v4/developer_manual/templates_system.php

i see. but how to add the code. i am adding the adsense code, but nothing showing !

dcei
01-03-2008, 04:46 PM
Looking at code in default.tpl - can you show exactly where the google adsense code should be placed? And is there a way to make it display midway down in the article, on the right side - instead of floating right top as shown in v3.x version in earlier thread replies?

</div>
<vte:include file="{VIVVO_TEMPLATE_DIR}box/font_size.tpl" />
<div id="article_body">
<vte:if test="{article.image}">
<div class="image" style="width:{VIVVO_ARTICLE_MEDIUM_IMAGE_WIDTH}px;">
<img src="{VIVVO_URL}thumbnail.php?file={article.image}&amp;size =article_medium" alt="image" />
<span class="image_caption"><vte:value select="{article.get_image_caption}" /></span>
</div>
</vte:if>
<vte:if test="{article.image}">
<p><strong><vte:value select="{article.get_abstract}" /></strong></p>
</vte:if>
<vte:value select="{article.get_body}" />
</div>
<vte:if test="{article.get_document}">
<div class="content_attachment">
<img src="{VIVVO_THEME}img/attachment.gif" alt="{LNG_DOWNLOAD_ATTACHMENT}" />
<vte:value select="{LNG_DOWNLOAD_ATTACHMENT}" /> >>
<a href="{article.get_document_href}"><vte:value select="{article.get_document}" /></a>
</div>

Micha
01-04-2008, 08:36 AM
Place it right above <vte:value select="{article.get_body}" /> line:

<p><strong><vte:value select="{article.get_abstract}" /></strong></p>
<div style="float:right; padding:5px; width:250px;">Ad sense code</div>
<vte:value select="{article.get_body}" />

I'm afraid it's not possible to place it in the middle of an article.

azednet
01-04-2008, 08:16 PM
i see. but how to add the code. i am adding the adsense code, but nothing showing !

:rolleyes:

azednet
01-04-2008, 08:17 PM
how to add adsense in header ? thank you

Micha
01-05-2008, 10:56 AM
how to add adsense in header ? thank you

Place it inside templates/xhtml/box/header.tpl template.

i see. but how to add the code. i am adding the adsense code, but nothing showing !

Can you post your ad sense code?

azednet
01-05-2008, 02:28 PM
the code

<script type="text/javascript"><!--
google_ad_client = "pub-xxxxxxxxxxxxxxxxxxx";
google_ad_slot = "xxxxxxxxxxxxxxxxx";
google_ad_width = 728;
google_ad_height = 90;
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

Micha
01-08-2008, 09:40 AM
Can you please share the URL of your website where you inserted the code?

Also, can you share exact code of your google ad sense?

azednet
01-08-2008, 09:41 AM
no one can help ?

azednet
01-08-2008, 09:42 AM
here is my code :

<script type="text/javascript"><!--
google_ad_client = "pub-xxxxxxxxxxxxxxxxxxx";
google_ad_slot = "xxxxxxxxxxxxxxxxx";
google_ad_width = 728;
google_ad_height = 90;
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

how can i insert it in template, thank you.

maverickrz
01-08-2008, 02:14 PM
i need add google adds under polls:

how?

http://www.imagehosting.gr/upload4/out.php/i58156_myvvi.bmp

Alex
01-08-2008, 02:23 PM
in homepage template find this snippet (lines 8-14):

<div id="dynamic_box_left">
<div id="box_left_holder">
<vte:include file="{VIVVO_TEMPLATE_DIR}box/sections.tpl" />
<vte:include file="{VIVVO_TEMPLATE_DIR}box/plugin_newsletter.tpl" />
<vte:include file="{VIVVO_TEMPLATE_DIR}box/plugin_poll.tpl" />
</div>
</div>

...and put AdSense code below include for poll.tpl

I suggest you read the documentation on Vivvo templates...

peticito
01-09-2008, 07:21 PM
Sorry for my ignorance...

i have this code google adds.

<script type="text/javascript"><!--
google_ad_client = "pub-xxxxxxxxxxxxxxxxxxx";
google_ad_slot = "xxxxxxxxxxxxxxxxx";
google_ad_width = 728;
google_ad_height = 90;
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

HOW APLICATE IN MAIN PAGE:

<div id="dynamic_box_left">
<div id="box_left_holder">
<vte:include file="{VIVVO_TEMPLATE_DIR}box/sections.tpl" />
<vte:include file="{VIVVO_TEMPLATE_DIR}box/plugin_newsletter.tpl" />
<vte:include file="{VIVVO_TEMPLATE_DIR}box/plugin_poll.tpl" />
</div>
</div>

See example...please...

Micha
01-10-2008, 07:54 AM
Your google ad format is 728x90 so I don't think it will fit good in left or right column.

Maybe the best place for this ad sense is bellow ticker.
You can place that code in your default.tpl for homepage just bellow this line of code:

<vte:include file="{VIVVO_TEMPLATE_DIR}box/ticker.tpl" />

azednet
01-10-2008, 01:51 PM
Micha, cant display the adsense code corectly, in the generated html code i have only <script type="text/javascript" />

Sola
01-14-2008, 11:31 PM
Place it inside templates/xhtml/box/header.tpl template.This dosen't show. Its just the usual Google code like people have posted above. It shows in the other places, but not in Header template

djbeatz
02-14-2008, 12:37 AM
thanks for shring