Welcome to Geeklog, Anonymous Tuesday, February 27 2024 @ 06:29 pm EST

Geeklog Forums

Google Adsense in the Article

Page navigation


Status: offline

geKow

Forum User
Full Member
Registered: 01/12/03
Posts: 445
Quote by SmackDaddy: If it's that simple, then thank you for that. Now on your site, it might look 'cleaner' if it were centered, but otherwise, I can see it works....

It isn't centered, because I want it to stay at one place. When I center it, it will move on pages without right blocks.

Of course geeklog won't strip code from template files Wink

geKow
 Quote

Status: offline

SmackDaddy

Forum User
Chatty
Registered: 05/04/05
Posts: 35
Location:Ohio
Great. Thanks for the info.
 Quote

flyingcats

Anonymous
Quote by SmackDaddy:

So, are you saying all you did was place the Adsense code in a file, name it adsense.js, and then where did you place the code exactly to have it be between the intro text and body text of an article?

Do you have to add anything to or modify Geeklog to allow it to run javascript files? If so, what and where needs modified?

Thanks in advance....


Yes, place adsense code in a file, js file(some hacking needed). name it whatever you want. Then upload this .js file to your server. When post article, you will only need to add the js file link to your article.

My link like this: (I also added a div tag to define ads position.)
Text Formatted Code

<div id="google-ads"><script src="http://www.mysite.com/referer-300x250.js"></script></div>


 


An additional thing you need to do is to enable script tag in article posting.
It's in your config.php. add this:
'Script' => array('type' => 1, 'src' => 1)

All done.
 Quote

flyingcats

Anonymous
Quote by geKow: But if you put 1 ad per article, you will have more than 3 ads per page (and I wouldn't visit a page like that a second time Wink )

geKow

p.s. why don't you give us the url as text? (without the http)


What we are discussing is to let ads display on Article Reading page, not homepage.
I have one in top (header.thtml, 728x90), the other in article body (300x250) and this one you can only see it when you cliclk the read more article link.
 Quote

Page navigation

All times are EST. The time is now 06:29 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content