AdSense plugin (request)
-
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.
-
@julian said:
The AdSense plugin has now been republished under nodebb-plugin-adsense. It is maintained by the NodeBB Community Organisation
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?
-
@MarximusMG plenty. But I modified some code and sacrificied Ajax for it.
-
@AOKP thanks - I'll give your modifications a try. Wasn't sure if this was still working out of the box or not.
-
Hi guys!
I've tried adsense plugin with nodebb ver. 1.0.0(Persona) and encounter that ads are not displayed for mobile devices. On desktop is fine.
The same ads blocks are worked on previous version 0.6.0(Lavender).
Don't you know what's might went wrong?