Foren / Cotonti / Skins / Advertising with Gameportal?

Swooshy
#1 2. März 2010, 23:35
Hello there. I use Gameportal skin with Cotonti, and I have account at Google AdSense. I would like to place an advert to my site. I got the code from Google, but I don't understand much about PHP or CSS. Could someone tell me how to place the vertical advert to the place I have highlighted with red and white in this picture:

Kingsley
#2 3. März 2010, 00:31
If I remember correctly, menu slot {PHP.cfg.freetext9} is reserved for that.

so dump your google link in there and update..
Swooshy
#3 3. März 2010, 00:52
Hmm that didn't work. I must add {PHP.cfg.freetext9} to .tpl files? I tried to add it to index.tpl earlier. I wanted to have three columns on home page. I edited gameportal.css so that it says

#sidebar { float: left; display: inline; width: 226px; }
#content { float: right; display: inline; width: 657px; }
#sidebar2 { float: right; display: inline; width: 120px; }

and then added code

<!-- SB2 -->
<div id="sidebar2">
<script type="text/javascript"><!--
google_ad_client = "pub-0329715766745367";
/* 120x600, created 3/2/10 */
google_ad_slot = "1888461973";
google_ad_width = 120;
google_ad_height = 600;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>

<!-- / SB2 -->

to index.tpl, but somehow it doesn't let the three columns to be next to each other, but it forces one of them to be below the 2 others. Sorry I hope you understand what I mean.
pieter
#4 3. März 2010, 01:56
#content { float: right; display: inline; width: 657px; }
#sidebar2 { float: right; display: inline; width: 120px; }

they both float right. not possible.
You need to give the content a fix place from the left.

Added 7 minutes later:

try:
#content { position: absolute; left: 250px; display: inline; width: 657px; }

let me know if it works.
... can we help you ...

Dieser Beitrag wurde von pieter (am 3. März 2010, 02:05, vor 14 Jahre) bearbeitet
Swooshy
#5 3. März 2010, 02:05
Thank you for replies. I've seen some cotonti or seditio pages with 3 columns... Maybe I'll learn how to do it some day.

Is it any possible to put the ad outside of the main area of the page? I mean right from the area that has search, recent additions new in forums and news.
pieter
#6 3. März 2010, 02:06
yes it is. I need to go to eat and maybe after this I will check it, if you have time.

Added 41 minutes later:

Something like this?

http://cotonti.broens.be/index.php

add this in CSS:
#sidebar2 { position: absolute; left: 920px; display: inline; width: 120px; }



Add
<!--  SB2 -->
	<div id="sidebar2">
<script type="text/javascript"><!--
google_ad_client = "pub-0329715766745367";
/* 120x600, created 3/2/10 */
google_ad_slot = "1888461973";
google_ad_width = 120;
google_ad_height = 600;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>

<!-- / SB2 -->

just before <div id="sidebar"> in index.tpl
... can we help you ...

Dieser Beitrag wurde von pieter (am 3. März 2010, 02:48, vor 14 Jahre) bearbeitet
Swooshy
#7 3. März 2010, 03:08
Thank you really much, Pieter! It works like a dream :)
pieter
#8 3. März 2010, 03:09
-------------------------------
With this you only get it on the index.
If you want it on every page, do the following:

css:
#sidebar2 { position: absolute; top: 180px;left: 920px; display: inline; width: 120px; }

Add this
	  <!--  SB2 -->
	<div id="sidebar2">
<script type="text/javascript"><!--
google_ad_client = "pub-0329715766745367";
/* 120x600, created 3/2/10 */
google_ad_slot = "1888461973";
google_ad_width = 120;
google_ad_height = 600;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>

<!-- / SB2 -->

After:
    <!-- / Top Navigation -->
    <div id="top-nav">


Added 49 seconds later:

if you give a link we can see and help

Added 1 minute later:

I founded: http://performanx.com/index.php
... can we help you ...
Swooshy
#9 3. März 2010, 03:21
It works perfectly. I tried to find a solution for so many hours today. I can't thank you enough. Thank you! :)
pieter
#10 3. März 2010, 03:23
No prob, I converted the skin, so I know a little bit of the structure.
... can we help you ...
Kort
#11 3. März 2010, 03:41
Quicksearch box has double border (Opera)
SED.by - создание сайтов, разработка плагинов и тем для Котонти