XF 1.2 Implement Google Adsense [XF 1.2.9]

All I do is add the Adsense code to the xenForo advertising position. Then it all works. I don't know what xenPorta is, but I don't use or need it for ads, that I do know.

If you don't yet have Adsense ads then I think you do need something in the header to get them to approve, however it's easier to just have the ad.

What you may find, and a reason to keep everything simple and just us xenForo, is the new Adsense GDPR consent requirements which could mean the xenForo advanced Cookie consent being enabled. I think they are giving you until April 2023 to comply.
All I do is add the Adsense code to the xenForo advertising position. Then it all works. I don't know what xenPorta is, but I don't use or need it for ads, that I do know.
I don't think in XF 1.2 (which is the long EOL'd version he is using) there were ad positions available at that time.

Basically the same issue. I am not sure where to add this code:
Since I haven't ran XF 1.2.x in a LONG time... I'm not sure, but I think that code would need to be placed iin the page_container template in the head section. And as for "how to enter it"..... well, as I said, it's 1.2 and it's not going to be done the same in 2.1/2.2, so you aren't probably going to get a lot of help there as the majority are on fairly recent code revisions.

You have to realize, you are using such an OLD version, not many people are going to be able to help you, as many of them are not even likely to have even ran that version it is so old.

I really don't understand why you are so insistent on running code that is THAT out of date and has been EOL for a while. To renew your license to get the current code base, if only using XF, is only around $50. Most of people spend well over that in a month on simple drinks.
If you take the time to read the link I included in the thread someone mentions not to edit the page container. I explained myself already on my reasons why I refuse to upgrade right now. Not everyone has money to throw at a side project while being a full time student and working just to pay the bills. My goal is to do this completely free. If you want to see why you can click my profile and read the replies there.
The point remains... running 1.2.X you are NOT going to get a lot of assistance... that version is coming up one a decade old, and not many people even REMEMBER how to integrate things, since the concentration is on the current version.
And as I have told you (repeatedly) relying on how it is done in 2.x code will usually NOT work in 1.2.... there's about 9 years of difference in coding philosophy involved.

You asked (in this thread) SPECIFICALLY
I am not sure where to add this code:
You were told that the format used to do such in the CURRENT version was not the same as in the 1.2 version.
And sorry, I'm not going to dig through your replies.... even as a student, I can almost guarantee you blow in a 2 month period what renewing would cost. It's simply a matter of priorities... you want to try to learn on a script that will NOT apply to the real world, so it's like using a instructional book from the days of tube radio to work on a solid state device.

Have you even used the search feature here (or via google) to try to find out the answers to your question?
I seriously doubt it...... as I found this in about 10 seconds in a Google search specifically using Adsense Xenforo 1.2 (and a similar example of the script segment you provided)
It specifically shows you how to use that script segment in an ad position.
Now, as to the use of it in XenPorta.....
Did you go specifically to the XENPORTA discussion thread to ask for help on that there since you specifically commented that it is a feature of XenPorta. That IS the expected process to use, if it's related to an add-on, ask in that add-on discussion thread. Not everyone uses XenPorta, so asking in the appropriate area is more likely to get you help.

But you also answered part of your own question.. your script segment HAS your CA-publisher code.... THAT is what you have to put into that XenPorta area.
Last edited:
I honestly don't understand why you would even take the time to reply and nit even offer any help. Seems like you want to condemn me. You could easily ignore my post ESPECIALLY if you don't have anything to offer.
Simple... I answer questions here... should not be up to me to have to delve into your post history.
Maybe you need to start asking the questions in the appropriate area as you were advised to do.... you have a question on how to implement something pertaining to an add-on... ask in that add-on thread. Pretty sure that's been a "suggestion" for a while here by the developers.
As for "lazy".... well, that 10 second search quickly showed who that is.

Welcome to the club as the 3rd ignored member here.
Can you show me where I was "advised" to post in a proper forum? For all I know, I posted it in the correct spot.
Third sticky in this VERY area.... so apparently it's not important enough for you to read the stickies?
Some of those stickies contain information that remains pertinent... in fact, one of them even had some hints on what you asked about.
No, you said nothing about that.
You have to delve into his posting history... he can't be troubled by the fact that he's running a LONG outdated version that MOST admins don't remember, and MANY have never even ran that participate here (it's been almost a decade since that was released).
This is not the first time he's gotten like he is... so I've simply put him on ignore and he can lose a resource that HAS been around for over a decade. Maybe he can develop his Google'Fu to an adequate level, since it's readily apparent he can't take the time to read stickies posted in areas, some of which link to info on what he asks.
He apparently has some other issues... as was brought forth when he asked the same question several times and commented that he apparently "forgot" due to some "personal habit/issue" that apparently results in memory issues that he commented on in an earlier post. I got a sneaking suspicion on what those issues involve, and if correct, the purchase of which product causes those issues would likely go easily towards a new license renewal so he could be working with current code and not something around a decade old.
Last edited:
Top Bottom