WP Discourse 1.0.0 release

wordpress

(Simon Cossar) #1

The wp-discourse plugin 1.0.0 has just been added to the WordPress plugin repository.

Changes from version 0.9 include:

  • Breaking the settings page into tabbed sections
  • Adding a ‘Text Content’ option for customizing all user-facing text
  • Improving the plugin’s options descriptions
  • Moving WooCommerce support into a separate plugin
  • Displaying the Discourse username, instead of the full name, in the comments template
  • Syncing post title changes from WordPress to Discourse
  • Improving support for displaying the Discourse comments number on WordPress
  • Adding a longer sync period for syncing the comments number on WordPress archive pages (this can be configured in your functions.php file)

You can install the new version from the WordPress plugin repository, download it from github, or install it with Composer.

For complete instructions on installing, upgrading, and setting up the plugin, see the WP Discourse plugin installation and setup #howto.

For details on how to customize the plugin’s HTML templates see the WP Discourse template customization #howto


Discourse WordPress plugin version 0.6.6
Blog post plugin
What version is the Wordpress plugin relative to standalone, and how will this be handled?
Discourse WordPress plugin version 0.7.0
#2

Hello,

First of all thanks for the awesome plugin!

Although I have a little issue with the time displayed on the comments, the plugin seems to have a hard time getting it and it just displays the defaut January 1st 1970, which isn’t really right :smiley:

Here is an exemple:

Do you have any idea how to fix the time issue by chance?

There is another little word that isn’t in the translation part of the plugin, the “says”, even tho I guess it is easy to fix in the php files.

Thanks!


(Simon Cossar) #3

I will fix both those issues in the next update, later this week.

Edit: I’ll try to get it done today.

The datetime issue has, hopefully, been fixed in version 1.0.2. Let me know if it isn’t working.

That word is only supposed to be available to screen-readers. It is in a span that has the 'says' class applied to it. In the default WordPress theme’s css, that class has this rule:

/* Text meant only for screen readers */
.says,
.screen-reader-text {
	clip: rect(1px, 1px, 1px, 1px);
	height: 1px;
	overflow: hidden;
	position: absolute !important;
	width: 1px;
	/* many screen reader and browser combinations announce broken words as they would appear visually */
	word-wrap: normal !important;
}

It seems that using the class '.screen-reader-text' is a more standard way to do it. I’ve added that class to the span, and also internationalized the word. If it is still showing up in your theme and you don’t want it there, try adding the above css to your theme’s css.


#4

Awesome, thank you :slight_smile:


(Алексей Копаев) #5

is there any possibility to implement the publication of various record types in different branches discourse?
And just from different columns in different branches discourse.


(Simon Cossar) #6

Do you mean, can each WordPress post-type be set so that it publishes to a specific category on Discourse?

You can now choose the category to publish to when you create a post. But all the available categories are displayed for each post-type. If you want to control what categories can be used for a post-type, I think the plugin could a filter the Discourse categories that are displayed in the ‘publish to Discourse’ meta box. That filter could be used in a theme to only allow publishing to specific categories for each post-type.

This would only require a small change in the plugin’s code, but would require some custom code in the WordPress theme.


(Алексей Копаев) #7

The fact that the publication of news, you can manually choose is understandable, but to automatically?
Example:
Wordpress post record type, the default publish in the discourse of Category "NEWS"
Wordpress post type event, the default publish in the discourse of the category “Events”

And it would be nice:
Wordpress category sports, by default publishes Discourse "sports"
etc.

Just plug this widget nehvateet last comments.


(Kevin) #8

Is there any way to translate/change the “1 Discourse comment and 1 Wordpress comment” string via functions.php, so that it only shows the comment count for discourse? Our website layout was designed to just show the number of comments, so right now it looks a bit broken for older articles…


(Simon Cossar) #9

Yes, there is, but maybe the plugin could handle the case where there are both WordPress and Discourse comments a bit better. The two numbers could be added together, so the above example would just return ‘2 comments’. I’m doing an update today, so I’ll try that out.

Edit: this is fixed in the latest version (1.0.2)

Note: the Discourse comments numbers are cached for 24 hours on archive pages. See the WP Discourse Plugin Tips and Tricks #howto for information on how to adjust this.


(Simon Cossar) #10

This can now be made to work with custom_post_types. To do it with categories is more difficult, because the category isn’t available before you create the post. See WP Discourse Plugin Tips and Tricks #howto ‘Filtering the available categories for a custom post type’ section for more details.


(Kevin) #11

Perfect, thank you so much for the quick update! :tada: