AdSense plugin (request)
-
I got AdSense flawlessly working, but therefore had to disable Ajax and modify the Composer a bit.
-
I think Google AdSense would be distracting.
-
@Dog2puppy-MCPE Google AdSense is necessary to pay the sites cost.
Or do you have an idea how to pay for over 1.5Mio. visitors a month?
-
Here the guide:
- Open public/src/ajaxify.js and go to line 304, edit the code to this:
// if (window.history && window.history.pushState) { // Progressive Enhancement, ajaxify available only to modern browsers // ajaxifyAnchors(); // }
- Go to node_modules/nodebb-plugin-composer-default/static/lib/composer.js.
Search and replace:
history.back();
window.history.back();with this:
location.reload();
- You are basically done and now can insert your AdSense code into your template. Here how I did it:
- Go to node_modules/nodebb-theme-persona/templates/partials and create a file named ads.tpl.
- Insert the AdSense code into it.
- Open the location, where you want to add it. For example on the login page you can add this after the breadcrumb:
<!-- IMPORT partials/ads.tpl -->
- Restart NodeBB, your ads should work fine.
-
The AdSense plugin has now been republished under
nodebb-plugin-adsense
. It is maintained by the NodeBB Community OrganisationGitHub - NodeBB-Community/nodebb-plugin-adsense: adsense plugin
adsense plugin. Contribute to NodeBB-Community/nodebb-plugin-adsense development by creating an account on GitHub.
GitHub (github.com)
-
@julian said:
The AdSense plugin has now been republished under nodebb-plugin-adsense. It is maintained by the NodeBB Community Organisation
GitHub - NodeBB-Community/nodebb-plugin-adsense: adsense plugin
adsense plugin. Contribute to NodeBB-Community/nodebb-plugin-adsense development by creating an account on GitHub.
GitHub (github.com)
I've tested. There are some problems. Thank you again for your concern.
-
Just installed this yesterday, not having much luck with the ads displaying. Anyone else having issues?