Forums

Unfortunately no one can be told what FluxBB is - you have to see it for yourself.

You are not logged in.

#1 2009-12-13 13:55:51

Snake
Member
From: Somewhere
Registered: 2009-12-11
Posts: 17
Website

Google Adsence?

I have searched the forum but found no answer, unless I happened to miss a topic I didn't see.

But how would I use Google Adsence in FluxBB 1.2.22?

I don't know exactly where to place the adsence code at.
I want it in the footer if I can.

Offline

#2 2009-12-13 14:32:58

Franz
Lead developer
From: Germany
Registered: 2008-05-13
Posts: 6,686
Website

Re: Google Adsence?

You can place it in the template file at include/template/main.tpl. You can also add it to the other templates, although I don't think you need it for redirecting, maintenance and administration...

EDIT: Maybe you didn't find anything in your search because of the typo: I find plenty of topics for "adsense".

Last edited by Franz (2009-12-13 14:33:31)


fluxbb.de | develoPHP

"As code is more often read than written it's really important to write clean code."

Offline

#3 2009-12-13 14:39:35

Snake
Member
From: Somewhere
Registered: 2009-12-11
Posts: 17
Website

Re: Google Adsence?

Thanks.
Yeah, I made a typo. lol

Where exactly in main.tpl do I add the code at, or does it matter?

Offline

#4 2009-12-13 14:41:22

Franz
Lead developer
From: Germany
Registered: 2008-05-13
Posts: 6,686
Website

Re: Google Adsence?

It usually doesn't matter, but it should be added just in front of the closing body tag for performance reasons, I believe.


fluxbb.de | develoPHP

"As code is more often read than written it's really important to write clean code."

Offline

#5 2009-12-13 14:46:13

Snake
Member
From: Somewhere
Registered: 2009-12-11
Posts: 17
Website

Re: Google Adsence?

So I add the code here:

</div>
</div>

</body>
</html>

Right above the </body> tag?
That's at the very bottom.

Sorry, but I've only added the adsense code to phpbb before.

Offline

#6 2009-12-13 15:57:55

Franz
Lead developer
From: Germany
Registered: 2008-05-13
Posts: 6,686
Website

Re: Google Adsence?

Yes, that's what I meant.


fluxbb.de | develoPHP

"As code is more often read than written it's really important to write clean code."

Offline

#7 2009-12-13 16:05:12

Reines
Administrator
From: Scotland
Registered: 2008-05-11
Posts: 3,197
Website

Re: Google Adsence?

Where you add it depends where you want the ads to show up?

Offline

#8 2009-12-13 16:30:42

Franz
Lead developer
From: Germany
Registered: 2008-05-13
Posts: 6,686
Website

Re: Google Adsence?

Oops. Sorry about that. For some reason I had Google Analytics in my mind. Stupid me...


fluxbb.de | develoPHP

"As code is more often read than written it's really important to write clean code."

Offline

#9 2009-12-13 17:30:08

Snake
Member
From: Somewhere
Registered: 2009-12-11
Posts: 17
Website

Re: Google Adsence?

I want the ads to show up in the footer.

Where at in the footer don't really matter as long as there easy to spot.

Last edited by Snake (2009-12-13 17:32:04)

Offline

#10 2009-12-13 17:57:10

Reines
Administrator
From: Scotland
Registered: 2008-05-11
Posts: 3,197
Website

Re: Google Adsence?

Put them somewhere near <pun_footer> then tongue probably above I'd say.

Offline

#11 2009-12-13 18:04:30

Snake
Member
From: Somewhere
Registered: 2009-12-11
Posts: 17
Website

Re: Google Adsence?

In the footer.php file?

If you do mean the footer.php file, I see a couple <pun_footer> in there.

One close to the top at

START SUBST - <pun_footer>

And one at the bottom

END SUBST - <pun_footer>

hmm

Last edited by Snake (2009-12-13 18:13:10)

Offline

#12 2009-12-13 18:13:06

Reines
Administrator
From: Scotland
Registered: 2008-05-11
Posts: 3,197
Website

Re: Google Adsence?

No the in include/template/main.tpl file that lie2815 said.

Offline

#13 2009-12-13 18:14:00

Snake
Member
From: Somewhere
Registered: 2009-12-11
Posts: 17
Website

Re: Google Adsence?

Reines wrote:

No the in include/template/main.tpl file that lie2815 said.

Oh, OK.

That's where I got confused at.

Offline

#14 2009-12-13 18:15:02

Snake
Member
From: Somewhere
Registered: 2009-12-11
Posts: 17
Website

Re: Google Adsence?

Thanks

Offline

#15 2012-03-03 03:24:15

iatkrox
Member
From: US
Registered: 2012-03-03
Posts: 91
Website

Re: Google Adsence?

If someone write a plugin to add adsense ads to fluxbb ?


Web Design Resources, Freebies, Articles & More… New To Design

Offline

#16 2012-03-27 20:06:59

cyberman
Member
From: Germany
Registered: 2010-01-11
Posts: 297
Website

Re: Google Adsence?

Offline

#17 2012-05-20 16:55:05

iatkrox
Member
From: US
Registered: 2012-03-03
Posts: 91
Website

Re: Google Adsence?

What was that ? yikes


Web Design Resources, Freebies, Articles & More… New To Design

Offline

#18 2012-05-21 12:26:24

arw
Member
Registered: 2012-03-20
Posts: 117

Re: Google Adsence?

it seems like a correct answer to your post :

iatkrox wrote:

If someone write a plugin to add adsense ads to fluxbb ?

^^

Offline

#19 2012-12-01 14:02:38

Ats
New member
Registered: 2012-12-01
Posts: 4

Re: Google Adsence?

Hi everyone, I'm new here. I'm making a website with FluxBB integrated to PluXml and it's almost done. One problem though... Google adsense shows up everywhere but in the forum.
I searched through your forum and on the internet. I tried things for days now but nothing works.

The last thing I tried was to add a pun_include in the main.tpl

<pun_include "adsense.php">

just before

<div id="pun<pun_page>" class="pun">

so the ad is on top of the page.

Here is adsense.php :

<?php echo '
<div class="sponsor radius">
test php echo
<script type="text/javascript"><!--
google_ad_client = "ca-pub-#myadnumber#";
google_ad_slot = "#myadslot#";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
'; ?>

I also tried adding it directly to main.tpl and also testing without echo '' without results...
If you browse the sourcecode of the forum page txori.com/forum the code is there, but not the ad... I don't have addblock or things like that and it's working everywhere else...
Do you have any idea of what's happening here ?

Thanks for you help.

EDIT: I've just realized that by using the search tool, I responded to a 1.2 general support topic... It should be for 1.5 in fact.

Last edited by Ats (2012-12-01 15:04:12)

Offline

#20 2012-12-01 16:37:19

Visman
Member
From: Siberia
Registered: 2010-07-10
Posts: 1,289
Website

Re: Google Adsence?

@Ats, error:

Ошибка: ReferenceError: $ is not defined
Источник: http://www.txori.com/themes/txori/scripts.js
Строка: 1

Offline

#21 2012-12-01 16:46:38

Ats
New member
Registered: 2012-12-01
Posts: 4

Re: Google Adsence?

Thanks Visman.
I forgot about that script (which is not working under FluxBB either, but that will be for another topic). I deleted that line but the ad still not appearing...

Offline

#22 2012-12-01 17:23:07

Visman
Member
From: Siberia
Registered: 2010-07-10
Posts: 1,289
Website

Re: Google Adsence?

It is result of work of this script wink
32e265f63615aae7c91f39d52167d5fb.jpg

Offline

#23 2012-12-01 19:59:40

Ats
New member
Registered: 2012-12-01
Posts: 4

Re: Google Adsence?

Ok so after some more research with a friend of mine, it appears to be a problem coming from the doctype of FluxBB. I managed to force the ad to showing up by using an object wrapper method: cromwell-intl.com/technical/google-adsense-and-xhtml.html

I doubt that the ad content will match anything in the page using that weird method... Does someone have an example of a FluxBB forum with a working google ad included in the main.tpl ?

Last edited by Ats (2012-12-01 20:07:42)

Offline

#24 2012-12-01 20:42:25

cyberman
Member
From: Germany
Registered: 2010-01-11
Posts: 297
Website

Re: Google Adsence?

Have you checked the path of adsense.php?

Look here

http://fluxbb.org/forums/viewtopic.php?pid=41267#p41267

Offline

#25 2012-12-01 21:05:11

Ats
New member
Registered: 2012-12-01
Posts: 4

Re: Google Adsence?

Yes, the path was correct. I putted the adsense.php in the include/user folder, and called it in main.tpl using <pun_include "adsense.php">.

I even added a little text in adsense.php to see if the path was correct. You can see it in Visman's screenshot just above: adsense ?

I also tried to put the google code directly into main.tpl without luck.

Offline

Board footer

Powered by FluxBB