GithubHelp home page GithubHelp logo

ajmalmsali / discourse-adsense Goto Github PK

View Code? Open in Web Editor NEW

This project forked from communiteq/discourse-adsense

0.0 1.0 0.0 72 KB

Google AdSense plugin for Discourse forum

License: GNU General Public License v2.0

HTML 23.48% JavaScript 68.57% Ruby 7.95%

discourse-adsense's Introduction

discourse-adsense

Google AdSense plugin for Discourse forum

Installation

  • Supported Discourse version: v1.3 and up

Non-docker installation

  • Run bundle exec rake plugin:install repo=http://github.com/discoursehosting/discourse-adsense in your discourse directory
  • In development mode, run bundle exec rake assets:clean
  • In production, recompile your assets: bundle exec rake assets:precompile
  • Restart Discourse

Docker installation

As seen in a how-to on meta.discourse.org, simply add the plugin's repo url to your container's app.yml file:

hooks:
  after_code:
    - exec:
        cd: $home/plugins
        cmd:
          - mkdir -p plugins
          - git clone https://github.com/discoursehosting/discourse-adsense.git
  • Rebuild the container
cd /var/discourse
git pull
./launcher rebuild app

Usage

  • Go to Admin -> Settings -> AdSense

  • Enter your AdSense publisher ID (ca-pub-xxxxxxxxxxxxxxxx)

  • Create new ad slots within your AdSense account (728x90 for desktop, 320x50 for mobile)

  • Copy the slot id # numbers (ten digits shown in the ID column) in the Discourse settings

  • Enable the slots you want to use

  • Remember to watch extra whitespace at the beginning and end of each field.

  • You can use the 'adsense_through_trust_level' to disable ads for users above a certain trust level.

  • 0 only shows to users that are not logged in
  • 1 shows ads to users that are not logged in, and to new and basic users
  • 2 shows ads to regular users as well, but not to leaders and elders
  • 3 shows ads to everyone but elders
  • 4 shows ads to everyone including elders

License

GPL v2

discourse-adsense's People

Contributors

ajmalmsali avatar communiteq avatar dandv avatar emaillenin avatar eviltrout avatar leblantoine avatar robertbrockie avatar thangngoc89 avatar vinothkannans avatar willkara avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.