From cd1c965f0f376d60f58956b226ed894ff001e6ed Mon Sep 17 00:00:00 2001 From: Brett Stevenson Date: Fri, 8 Jan 2021 11:31:11 -0800 Subject: [PATCH 1/3] Add issue and pull request templates --- .github/ISSUE_TEMPLATE/bug_report.md | 27 +++++++++++++++++++ .github/ISSUE_TEMPLATE/feature_request.md | 16 ++++++++++++ .github/ISSUE_TEMPLATE/question_template.md | 6 +++++ .github/PULL_REQUEST_TEMPLATE.md | 29 +++++++++++++++++++++ 4 files changed, 78 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md create mode 100644 .github/ISSUE_TEMPLATE/question_template.md create mode 100644 .github/PULL_REQUEST_TEMPLATE.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..5298169 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,27 @@ +--- +name: Bug report +about: Create a report to help us address an issue +--- + +### Describe the bug +A clear and concise description of what the bug is. + +### To Reproduce +Steps to reproduce the behavior: + 1. Go to '...' + 2. Click on '....' + 3. Scroll down to '....' + 4. See error + +### Expected behavior +A clear and concise description of what you expected to happen. + +### Screenshots +If applicable, add screenshots to help explain your problem. + +### Specifications: + - Wordpress version: + - Plugin version: + +### Additional context +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..abb0a00 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,16 @@ +--- +name: Feature request +about: Suggest an new feature for this plugin +--- + +### Is your feature request related to a problem? Please describe. +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +### Describe the solution you'd like +A clear and concise description of what you want to happen. + +### Describe alternatives you've considered +A clear and concise description of any alternative solutions or features you've considered. + +### Additional context +Add any other context or screenshots about the feature request here. diff --git a/.github/ISSUE_TEMPLATE/question_template.md b/.github/ISSUE_TEMPLATE/question_template.md new file mode 100644 index 0000000..5eead52 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/question_template.md @@ -0,0 +1,6 @@ +--- +name: Question +about: Ask a question about the package +--- + +Please make sure to check for [duplicate questions](https://github.com/disqus/disqus-wordpress-plugin/issues?q=label%3Aquestion) and the [Disqus Knowledge base](https://help.disqus.com/) before submitting a new question. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..b38687e --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,29 @@ + + +## Description + + +## Motivation and Context + + + +## How Has This Been Tested? + + + + +## Screenshots (if appropriate): + +## Types of changes + +- [ ] Bug fix (non-breaking change which fixes an issue) +- [ ] New feature (non-breaking change which adds functionality) +- [ ] Breaking change (fix or feature that would cause existing functionality to change) + +## Checklist: + + +- [ ] My code follows the code style of this project. +- [ ] My change requires a change to the documentation. + - [ ] I have updated the documentation accordingly. +- [ ] All new and existing tests passed. From 3dcfe801863b1111f0294635521a7ca785b4a63c Mon Sep 17 00:00:00 2001 From: Brett Stevenson Date: Fri, 8 Jan 2021 11:31:39 -0800 Subject: [PATCH 2/3] Add CHANGELOG.md --- docs/CHANGELOG.md | 334 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 334 insertions(+) create mode 100644 docs/CHANGELOG.md diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md new file mode 100644 index 0000000..1552ac7 --- /dev/null +++ b/docs/CHANGELOG.md @@ -0,0 +1,334 @@ +# Changelog + +### 3.0.18 +* Tested plugin with WordPress 5.6 and updated documentation +* Fixed count.js script being loaded on unnecessary pages +* Fixed comments showing sync date instead of creation date in WordPress admin + +### 3.0.17 +* Bumping version for WP 5.1 version bump. (Changes to README versions and main php file's version) +* Fixed Undefined index bug where HTTP_HOST could not find web server + +### 3.0.16 + +* Add a manual syncing option that allows retroactive syncing within a selected date range +* Fixed bug where SSO avatar URLs were malformed (Thanks to [klaufel](https://github.com/disqus/disqus-wordpress-plugin/pull/49)) + +### 3.0.15 + +* Fixed bug preventing sites from importing WordPress comments to Disqus + +### 3.0.14 + +* Add a prompt to create a secret key if missing. Fixes issue preventing some sites from using automatic installation and enabling syncing +* Made it easier to reinstall the same site without having to select a new one +* Bug fix for some browsers from autofilling site configuration forms +* Bug fix for sites whose admin URL was different than their public site URL +* Prevent Disqus from loading on pending and scheduled posts + +### 3.0.13 + +* Added a new option for rendering comments javascript directly into page markup +* Fixed warning that stated "cannot access private method Disqus_Rest_Api::dsq_get_settings_schema()" +* A few small copy changes in plugin's admin UI + +### 3.0.12 + +* Disabled browser autocomplete for site configuration form +* Fixed an issue where admin JavaScript bundle was missing for sites with WP_DEBUG enabled +* Implemented a dsq_can_load filter for custom control of when Disqus loads + +### 3.0.11 + +* Improved UX on updating the site configuration manually +* Fixed an issue causing a site crash with PHP version 5.2 +* Added additional information to support diagnostics + +### 3.0.10 + +* Lowered minimum-supported version of PHP to 5.4 +* Fixed a syntax issue in PHP version 5.3 + +### 3.0.9 + +* Added a check to deactivate plugin if PHP version is earlier than the minimum-supported version 5.6. + +### 3.0.8 + +* Fixed a bug that prevented automatic installation when upgrading from version 2.86 or earlier. + +### 3.0.7 + +* Plugin has been completely rewritten to support modern and secure WordPress features. +* Added new Automatic Installation for installing Disqus on your site. This also creates the API application required for enabling comment syncing. +* Completely redesigned plugin settings page. Disqus replaces the Comments menu link in your WordPress admin and includes shortcut links to popular settings. + +### 2.86 + +* Don't attempt to use cURL on IIS servers +* Check is dsq_sync_forum is scheduled before scheduling +* Add updates for Travis CI +* Fixes a bug in the upgrade process + +### 2.85 + +* Fixes deprecation warnings on sites running PHP7 +* Removes a javascript alert from the admin + +### 2.84 + +* Fixes a bug where the comment count won't work on some themes + +### 2.83 + +* Fix errors when using SSO and rendering javascript inline + +### 2.82 + +* Fix PHP errors when there are no comments to sync +* Adds a new option to render Disqus javascript directly in page markup + +### 2.81 + +* Fix for automatic comment syncing +* Make sure all markup validates for HTML5 + +### 2.80 + +* Move all scripts to separate files instead of rendering them in php +* Added a hook to attach custom functions to disqus_config in javascript +* Fixed exporting bug introduced in 2.78 (Thanks to mkilian) +* Numerous small compatibility and security enhancements + +### 2.79 + +* Reinstate changes removed by 2.78 + +### 2.78 + +* Security fixes +* Compatibility for Wordpress version 4.0 + +### 2.77 + +* Fixes login by email issue +* Make sure Disqus is enabled after installation +* Additional security fixes + +### 2.76 + +* Security fixes (Thanks to Nik Cubrilovic, Alexander Concha and Marc-Alexandre Montpas) +* Bump tested Wordpress version to 3.9.1 +* Remove obsolete SSO button uploader +* Enable 'Output javascript in footer' by default during installation +* Fix for 'Reset' function not completely working the first time + +### 2.75 + +* Bump supported WordPress version to 3.8. +* Properly encode site name for SSO login button. +* Increased timeout for comment exporter to 60 seconds. +* Use https: for admin pages +* Miscellaneous bug fixes and improvements. + +### 2.74 + +* Updated settings UI +* Add filter hook for setting custom Disqus language +* For WP >### 3.5, use new media uploader +* Disable internal Wordpress commenting if Disqus is enabled (thanks Artem Russakovskii) +* Cleaned up installation and configuration flow +* Added link to WP backup guide in README +* Fix admin bar comments link +* Added a check to avoid a missing key notice when WP_DEBUG=TRUE (thanks Jason Lengstorf) +* Prevent 404 errors for embed.js from being reported by Google Webmaster Tools (missed in 2.73 README) + +### 2.73 + +* Apply CDATA patch from Wordpress 3.4 to dsq_export_wxr_cdata() (thanks Artem + Russakovskii for the patch). +* Added Single Sign-On log-in button and icon to options (only for sites using SSO) +* Output user website if set in SSO payload +* Added plugin activation statuses to debug info +* Bump supported WordPress version to 3.4.1 +* Fixed issue where disqus_dupecheck won't properly uninstall +* Load second count.js (output-in-footer version) reference via SSL too +* Added screenshots + +### 2.72 + +* Load count.js via SSL when page is accessed via HTTPS +* Fixed styling issue with Disqus admin. + +### 2.71 + +* Fixed issue where embed wasn't using SSL if page was loaded via HTTPS +* Fixed issue with syncing where to user's without a display_name would + revert back to Anonymous (really this time). +* Fixed issue where Google Webmaster Tools would incorrectly report 404s. +* Fixed issue with Disqus admin display issues. + +### 2.70 + +* Properly uninstall disqus_dupecheck index when uninstalling plugin. +* Fixed issue with syncing where to user's without a display_name would + revert back to Anonymous. +* Fixed issue where IP addresses weren't being synced properly. +* Allow non-Administrators (e.g., editors) to see Disqus Moderate panel + inline (fixes GH-3) + +### 2.69 + +* Bumped version number. + +### 2.68 + +* Removed debugging information from web requests in CLI scripts (thanks + Ryan Dewhurst for the report). +* Reduced sync lock time to 1 hour. +* Fixed an issue which was not allowing pending posts (for sync) to clear. +* Fixed an issue with CLI scripts when used with certain caching plugins. + +### 2.67 + +* Bumped synchronization timer delays to 5 minutes. +* wp-cli.php now requires php_sapi_name to be set to 'cli' for execution. +* Fixed a bug with imported comments not storing the correct relative date. +* Added a lock for dsq_sync_forum, which can be overriden in the command line script + with the --force tag. +* dsq_sync_forum will now handle all pending post metadata updates (formerly a separate + cron task, dsq_sync_post). + +### 2.66 + +* Fixed issue with jQuery usage which conflicted with updated jQuery version. + +### 2.65 + +* Corrected a bug that was causing posts to not appear due to invalid references. + +### 2.64 + +* Added an option to disable Disqus without deactivating the plugin. +* Added a second check for comment sync to prevent stampede race conditions in WP cron. + +### 2.63 + +* Added command line script to import comments from DISQUS (scripts/import-comments.php). +* Added command line script to export comments to DISQUS (scripts/export-comments.php). +* The exporter will now only do one post at a time. +* The exporter now only sends required attributes to DISQUS. +* Moved media into its own directory. + +### 2.62 + +* Changed legacy query to use ### operator instead of LIKE so it can be indexed. + +### 2.61 + +* Fixed an issue which was causing invalid information to be presented in RSS feeds. + +### 2.60 + +* Added support for new Single Sign-On (API version 3.0). +* Improved support for legacy Single Sign-On. + +### 2.55 + +* Added support for get_comments_number in templates. + +### 2.54 + +* Updated URL to forum moderation. + +### 2.53 + +* Fixed an issue with fsockopen and GET requests (only affects certain users). + +### 2.52 + +* Fixed issue with Disqus-API package not getting updated (only affecting PHP4). + +### 2.51 + +* Added CDATA comments for JavaScript. +* Syncing comments will now restore missing thread information from old imports. +* Install and uninstall processes have been improved. +* Fixed an issue in PHP4 with importing comments. +* Fixed an issue that could cause duplicate comments in some places. +* Added an option to remove existing imported comments when importing. + +### 2.50 + +* Added missing file. + +### 2.49 + +* Database usage has been optimized for storing comment meta data. + +You can perform this migration automatically by visiting Comments -> Disqus, or if +you have a large database, you may do this by hand: + +CREATE INDEX disqus_dupecheck ON `wp_commentmeta` (meta_key, meta_value(11)); +INSERT INTO `wp_options` (blog_id, option_name, option_value, autoload) VALUES (0, 'disqus_version', '2.49', 'yes') ON DUPLICATE KEY UPDATE option_value ### VALUES(option_value); + +### 2.48 + +* Comment synchronization has been optimized to be a single call per-site. +* disqus.css will now only load when displaying comments + +### 2.47 + +* Fixed a security hole with comment importing. +* Reverted ability to use default template comments design. +* Comments will now store which version they were imported under. +* Added an option to disable server side rendering. + +### 2.46 + +* Better debugging information for export errors. +* Added the ability to manual import Disqus comments into Wordpress. +* Added thread_identifier support to exports. +* Cleaned up API error messages. +* Fixed a bug which was causing the import process to not grab only the latest set of comments. +* Added an option to disable automated synchronization with Disqus. + +### 2.45 + +* Comments should now store thread information as well as certain other meta data. +* Optimize get_thread polling to only pull comments which aren't stored properly. + +### 2.44 + +* Fixed JavaScript response for comments sync call. +* Comments are now marked as closed while showing the embed (fixes showing default respond form). + +### 2.43 + +* Fixed a JavaScript syntax error which would cause linting to fail. +* Correct an issue that was causing comments.php to throw a syntax error under some configurations. + +### 2.42 + +* Correct a bug with saving disqus_user_api_key (non-critical). +* Added settings to Debug Information. +* Adjusting all includes to use absolute paths. +* Adjusted JSON usage to solve a problem for some clients. + +### 2.41 + +* Correct a bug with double urlencoding titles. + +### 2.40 + +* Comments are now synced with Disqus as a delayed asynchronous cron event. +* Comment count code has been updated to use the new widget. (Comment counts + must be linked to get tracked within "the loop" now). +* API bindings have been migrated to the generic 1.1 Disqus API. +* Pages will now properly update their permalink with Disqus when it changes. This is + done within the sync event above. +* There is now a Debug Information pane under Advanced to assist with support requests. +* When Disqus is unreachable it will fallback to the theme's built-in comment display. +* Legacy mode is no longer available. +* The plugin management interface can now be localized. +* The plugin is now valid HTML5. From 691670e39df2ccf115fb1234c75c65b50818efb9 Mon Sep 17 00:00:00 2001 From: Brett Stevenson Date: Fri, 8 Jan 2021 11:31:54 -0800 Subject: [PATCH 3/3] Add CONTRIBUTING.md --- docs/CONTRIBUTING.md | 101 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 docs/CONTRIBUTING.md diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md new file mode 100644 index 0000000..1a08789 --- /dev/null +++ b/docs/CONTRIBUTING.md @@ -0,0 +1,101 @@ +# Contributing to the Disqus Wordpress plugin + +:+1::tada: First off, thanks for taking the time to contribute! :tada::+1: + +The following is a set of guidelines for contributing to Disqus and its packages, which are hosted in the [Disqus Organization](https://github.com/disqus) on GitHub. These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request. + +#### Table Of Contents + +[Code of Conduct](#code-of-conduct) + +[I don't want to read this whole thing, I just have a question!](#i-dont-want-to-read-this-whole-thing-i-just-have-a-question) + +[How Can I Contribute?](#how-can-i-contribute) + * [Reporting Bugs](#reporting-bugs) + * [Suggesting Enhancements](#suggesting-enhancements) + * [Your First Code Contribution](#your-first-code-contribution) + * [Pull Requests](#pull-requests) + +[Styleguides](#styleguides) + * [Git Commit Messages](#git-commit-messages) + * [JavaScript Styleguide](#javascript-styleguide) + * [CoffeeScript Styleguide](#coffeescript-styleguide) + * [Specs Styleguide](#specs-styleguide) + * [Documentation Styleguide](#documentation-styleguide) + +[Additional Notes](#additional-notes) + * [Issue and Pull Request Labels](#issue-and-pull-request-labels) + +## Code of Conduct + +This project and everyone participating in it is governed by the [Code of Conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. + +## I don't want to read this whole thing I just have a question!!! + +> ***Note:*** **Please don't file an issue to ask a question about Disqus as a whole**. You'll get faster results by using the resources below. + +We have an official message board with a detailed FAQ and where the community chimes in with helpful advice if you have questions. + +* [Disqus FAQ](https://help.disqus.com/en/) +* [Disqus Discuss](https://disqus.com/home/channel/discussdisqus/) + +Before sumbitting a question: +* **Perform a [cursory search](https://github.com/disqus/disqus-wordpress-plugin/issues?q=label%3Aquestion)** to see if the problem has already been reported. If it has **and the question still open**, add a comment to the existing issue instead of opening a new one. + +## How Can I Contribute? + +### Reporting Bugs + +This section guides you through submitting a bug report for Disqus. Following these guidelines helps maintainers and the community understand your report :pencil:, reproduce the behavior :computer: :computer:, and find related reports :mag_right:. + +Before creating bug reports, please check [this list](#before-submitting-a-bug-report) as you might find out that you don't need to create one. When you are creating a bug report, please [include as many details as possible](#how-do-i-submit-a-good-bug-report). Fill out [the required template](https://github.com/disqus/disqus-wordpress-plugin/blob/master/.github/ISSUE_TEMPLATE/bug_report.md), the information it asks for helps us resolve issues faster. + +> **Note:** If you find a **Closed** issue that seems like it is the same thing that you're experiencing, open a new issue and include a link to the original issue in the body of your new one. + +#### Before Submitting A Bug Report + +* **Check the [FAQ](https://github.com/disqus/disqus-wordpress-plugin/wiki/Frequently-Asked-Questions)** for a list of common questions and problems. +* **Perform a [cursory search](https://github.com/disqus/disqus-wordpress-plugin/issues?utf8=%E2%9C%93&q=is%3Aissue)** to see if the problem has already been reported. If it has **and the issue is still open**, add a comment to the existing issue instead of opening a new one. + +#### How Do I Submit A (Good) Bug Report? + +Bugs are tracked as [GitHub issues](https://guides.github.com/features/issues/). After you've determined that your there isn't already an open issue, create an issue that includes the necessary information by filling in [the bug template](https://github.com/disqus/disqus-wordpress-plugin/blob/master/.github/ISSUE_TEMPLATE/bug_report.md). + +Explain the problem and include additional details to help maintainers reproduce the problem: + +* **Use a clear and descriptive title** for the issue to identify the problem. +* **Describe the exact steps which reproduce the problem** in as many details as possible. For example, start by explaining or sharing a link to your implementation of the disqus-wordpress-plugin package. +* **Provide specific examples to demonstrate the steps**. Include links to files or GitHub projects, or copy/pasteable snippets, which you use in those examples. If you're providing snippets in the issue, use [Markdown code blocks](https://help.github.com/articles/markdown-basics/#multiple-lines). +* **Describe the behavior you observed after following the steps** and point out what exactly is the problem with that behavior. +* **Explain which behavior you expected to see instead and why.** +* **Include screenshots and animated GIFs** which show you following the described steps and clearly demonstrate the problem. You can use [this tool](https://www.cockos.com/licecap/) to record GIFs on macOS and Windows, and [this tool](https://github.com/colinkeenan/silentcast) or [this tool](https://github.com/GNOME/byzanz) on Linux. + +### Your First Code Contribution + +Unsure where to begin contributing? You can start by looking through the [open issues](https://github.com/disqus/disqus-wordpress-plugin/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen). + +### Pull Requests + +The process described here has several goals: + +- Maintain the package's quality +- Fix problems that are important to users +- Enable a sustainable system for Disqus' maintainers to review contributions + +Please follow these steps to have your contribution considered by the maintainers: + +1. Follow all instructions in [the template](PULL_REQUEST_TEMPLATE.md) +2. Follow the [styleguides](#styleguides) +3. After you submit your pull request, verify that all [status checks](https://help.github.com/articles/about-status-checks/) are passing
What if the status checks are failing?If a status check is failing, and you believe that the failure is unrelated to your change, please leave a comment on the pull request explaining why you believe the failure is unrelated. A maintainer will re-run the status check for you. If we conclude that the failure was a false positive, then we will open an issue to track that problem with our status check suite.
+ +While the prerequisites above must be satisfied prior to having your pull request reviewed, the reviewer(s) may ask you to complete additional design work, tests, or other changes before your pull request can be ultimately accepted. + +## Styleguides + +### Git Commit Messages + +* Use the present tense ("Add feature" not "Added feature") +* Use the imperative mood ("Move cursor to..." not "Moves cursor to...") +* Limit the first line to 72 characters or less +* Reference issues and pull requests liberally after the first line +