Actually it was an update pushed in the last couple of hours which have solved the issue. At least on one of the plugins which I have tested. I hope it will be the same way on all the plugins. Thanks for your help.
AdSense plugin (request)
-
DFB works. But difficult to use. And earnings is reduced.
I think it should be a plug-in for AdSense. He must have a special box. And it can be renewed on 3 pages. (regardless of site)
-
I got AdSense flawlessly working, but therefore had to disable Ajax and modify the Composer a bit.
-
@lombisi said:
And it can be renewed on 3 pages. (regardless of site)
This is the biggest blocker. Disabling ajaxify (read: crippling a site feature) is not a solution to getting adsense working imo...
-
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?
-
@julian said:
This is the biggest blocker. Disabling ajaxify (read: crippling a site feature) is not a solution to getting adsense working imo...
reply
What can be done so? Does it have any solution? Adsense is essential because
-
@AOKP Can I see your site?
-
@lombisi check my profile. It has a link.
-
@AOKP How did you do?
-
@lombisi how do you do what?
-
-
-
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.
-
@AOKP thank you so much.
- Do the changes are not lost after the update? (public/src/ajaxify.js)
- How true?
-
@lombisi just backup them before upgrading. Mine stayed though (composer and template need to be re-edited!).
Before I forget it:
Only replace the second history.back(); . -
@AOKP There's actually an easier way... all you have to do is edit
ajaxify.go
and addreturn true;
to the first line, I believe, and ajaxification is disabled. -
The AdSense plugin has now been republished under
nodebb-plugin-adsense
. It is maintained by the NodeBB Community Organisation -
@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.
-
@julian thanks! good job!
-
Just installed this yesterday, not having much luck with the ads displaying. Anyone else having issues?