Please do NOT post requests for help here. Use the Help forum for that.
  • Page:
  • 1

TOPIC:

Google AdSense on Webtrees? 2 weeks 2 days ago #1

  • mappymapperson
  • mappymapperson's Avatar Topic Author
  • Offline
  • New
  • New
  • Posts: 2
Hello all, looking to learn more about how AdSense works and my family tree is the only personal site i'm running. I'm familiar with light HTML/CSS work but webtrees seems to be building the PHP page in a way that i'm totally unfamiliar with. I need to add the AdSense script to the header of my page but index.php isn't looking familiar to me. Is this a quick, "your header is in here" or is this beyond my scope? Running 2.0.10

Please Log in or Create an account to join the conversation.

Google AdSense on Webtrees? 2 weeks 2 days ago #2

  • bertkoor
  • bertkoor's Avatar
  • Offline
  • Platinum
  • Platinum
  • Greetings from Utrecht, Holland
  • Posts: 2110
Forum search result:
www.webtrees.net/index.php/en/forum/help...ga-integration#70458

Seems to me it's hardly worth it, but if you really want it maybe Greg can give pointers.
Where do you want to place the adds?
stamboom.BertKoor.nl runs on webtrees v1.7.13

Please Log in or Create an account to join the conversation.

Google AdSense on Webtrees? 2 weeks 2 days ago #3

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 13716
You'd need to create a module to do this.

It will require some basic PHP coding skills.

There are several examples (with inline comments and documentation) in the folder modules_v4.

If you want your advert in the footer, then there is an example footer module which should be easy to modify. Just copy/paste your code (script, and placeholder) into the template.

If you want your advert anywhere else, it gets a little more complicated. You'd need to create a replacement for the HTML page template with your advert in your chosen location. There's an example showing how to create replacement versions of the built-in HTML templates in one of the examples.
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

Google AdSense on Webtrees? 2 weeks 2 days ago #4

  • mappymapperson
  • mappymapperson's Avatar Topic Author
  • Offline
  • New
  • New
  • Posts: 2
Ah module was what I was thinking. I think Bertkoor is probably right, hardly worth the effort but I might give it a spin for fun. Thanks for the info guy and thanks for the work put into Webtrees Mr. Fish. Really great/easy platform.

Please Log in or Create an account to join the conversation.

Last edit: by mappymapperson.
  • Page:
  • 1
Powered by Kunena Forum