GithubHelp home page GithubHelp logo

joel-james / disqus-conditional-load Goto Github PK

View Code? Open in Web Editor NEW
23.0 4.0 6.0 4.83 MB

Advanced plugin for Disqus WordPress

Home Page: https://dclwp.com

License: GNU General Public License v2.0

PHP 73.49% JavaScript 25.54% SCSS 0.97%
disqus disqus-comments wordpress-plugin wordpress-comments disqus-widget lazy-loading

disqus-conditional-load's Introduction

Disqus Conditional Load - for WordPress

Disqus commenting system for WordPress with advanced features like like lazy load, shortcode etc.


Contributors: Joel James
Requires at least: WordPress 5.0
Tested up to: WordPress 6.2
Stable tag: 11.1.0

Before starting development make sure you read and understand everything in this README.

Also, don't forget to document your code properly.

Working with Git

Clone the plugin repo and checkout the dev branch

# git clone [email protected]:Joel-James/disqus-conditional-load.git
# git fetch && git checkout dev

Installing dependencies and initial configuration

Install Node

# curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
# sudo apt-get install -y nodejs build-essential

Install the necessary npm modules and packages

# npm install

After that for the first time, run below command to create updated assets.

# npm run compile

Set up username and email for Git commits

# git config user.email "<your email>"
# git config user.name "<your name>"

Build tasks (npm)

Everything (except unit tests) should be handled by npm. Note that you don't need to interact with Grunt in a direct way.

Command Action
npm run translate Build pot and mo file inside /languages/ folder
npm run compile Compile and then generates assets (js & css)
npm run build Build release version, useful to provide for testing

Versioning

Follow semantic versioning http://semver.org/ as package.json won't work otherwise. That's it:

  • X.X.0 for mayor versions
  • X.X.X for minor versions
  • X.X[.X||.0]-rc.1 for release candidates
  • X.X[.X||.0]-beta.1 for betas

Workflow

Do not commit on master branch (if you are on a forked repo, no need to worry). dev is the code that accumulates all the code for the next version.

  • Create a new branch from dev branch: git checkout -b branch-name origin/dev. Try to give it a descriptive name. For example:
    • release/X.X.X for next releases
    • new/some-feature for new features
    • enhance/some-enhancement for enhancements
    • fix/some-bug for bug fixing
  • Make your commits and push the new branch: git push -u origin branch-name
  • File the new Pull Request against dev branch
  • Once the PR is approved it will be merged to the dev branch.

If you are sending pull requests from your forked repo, follow the same steps.

Important Links and Documentation

disqus-conditional-load's People

Contributors

irazasyed avatar joel-james avatar planetjon avatar tomgillett avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

disqus-conditional-load's Issues

CloudFlare "Rocket Loader" not working

Hi,

When enabled Rocket Loader, the comment is not loading. Chrome shows error:

Uncaught ReferenceError: embedVars is not defined
at embed-scroll.min.js?ver=11.0.1:1

Thank you.

comment count on loader button

Is there a way to display the number of comments in the "Load Comments" button when plugin is set to load disqus on click?

wp 4.5.3 Cannot redeclare dsq_options()

on wp v4.5.3 i get the following error when trying to activate this plugin

Plugin could not be activated because it triggered a fatal error.

Fatal error: Cannot redeclare dsq_options() (previously declared in /var/www/html/wp-content/plugins/disqus-comment-system/disqus.php:30) in /var/www/html/wp-content/plugins/disqus-conditional-load/disqus-core/disqus.php on line 38

Intermittent issues when minifying page HTML output

Not an issue with your plugin, per se, but a heads up.

When running HTML minification on page output using a plugin or other method, due to two inline JavaScript comments, occasional JavaScript errors present that prevent DISQUS from loading due to lack of EOL.

https://github.com/joel-james/disqus-conditional-load/blob/master/public/dcl-functions.php#L48

https://github.com/joel-james/disqus-conditional-load/blob/master/public/dcl-functions.php#L52

Update Disqus to latest version

Disqus started updating its plugin again. It would be nice to update Disqus in this plugin to the latest version as it fixes some bugs.

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.