Wp-discourse-shortcodes Plugin

I got some funding to do this recent work on it. It will be safe to use by the end of the week. Right now, it’s lacking documentation and the options page needs to be cleaned up. I’m supporting the plugin, so if people use it now and run into any problems, I’ll fix it.

9 „Gefällt mir“

I’m a newb to wordpress and discourse… coming from a good php background with other forum software.

I have WP and Discourse installed and working perfectly with the wp-discourse plugin and discourse acting as SSO.

I can’t get these shortcodes to work for me though. I installed by downloading the zip from git and uploading that zip as a plugin. It took it and it’s activated and the shortcode page shows up within the Discourse section of the WP admin. I’ve tried adding the discourse_topics and discourse_link shortcodes and I get nothing. I’ve tried a few different ways: in a text widget (with my theme modded to allow for short codes), in the shortcode widget itself, and within a normal post.

I’ve tested a couple other shortcodes to make sure shortcodes in general are working.

Anything I’m missing in the setup?

Really want to get some of the discourse embedded in wordpress and it looks like your shortcodes are the best option currently.

Many Thanks,
Mac

1 „Gefällt mir“

Is your forum private? If so, you need to check the Enable Private Topics checkbox on the Shortcodes options page.

If you’re still getting no output, try disabling the Webhook setting if you have it enabled, and using this as the shortcode: [discourse_topics cache_duration=0] It should give you some output. If not, please let me know.

4 „Gefällt mir“

YES. That was it. I had locked things down a bit as I’m converting to Discourse from my old forum software.

Awesome stuff. Thanks so much for the quick reply.

2 „Gefällt mir“

Are you planning to add an option to filter discourse_topics by categories and tags?

We love this plugin! Thank you very much for the work put in it. We use it very prominently at the https://confederac.io homepage.

I second @anon36484860, it would be useful to display items of a single category. For instance:

[discourse_topics source="top" category=" period="weekly" max_topics="5"]

On a different, there seems to be a minor bug. A category is not displayed in the widget:

Screenshot%20from%202018-10-01%2023-23-33

The category is “Anti-Represión” and is in fact a subcategory. The tilde seems to be fine, because the category “Colaboración” is rendered without problems. Maybe it’s the dash?

Have you recently added the category? If so, go to the Publishing options tab, select the Force Category Update checkbox and save the page. If that doesn’t solve the issue, I’ll take a look at what’s going on.

Yes, adding a Category option is a good idea.

2 „Gefällt mir“

Doh. OK, problem fixed. Thank you. :blush:

2 „Gefällt mir“

Is this plugin still maintained?

I would love to see the ability to make a list of topics by entering individual topic IDs

We are still very interested in this feature. Would it be complex to implement? Would the paid model be an option here?

1 „Gefällt mir“

Hello, Simon.

How to add a script to these ednpoints that will change them e.g. on the basis of api ?
For example:

On my wordspress blog:

Latest Topic discussion (imported from duscourse):
Topic 1 // My City is beauty
Topic 2 // How my Paris looks like
Topic 3 // My trip in New York

And i want to make it like this:
Topic 1 // My City is beauty – null (no city)
Topic 2 // How my Paris looks like + (weather from api for Paris)
Topic 3 // My trip in New York + (weather from api for New York)

etc

Wie ist der Status dieses Plugins?

Ich kann das Benutzer-Avatar-Bild nicht anzeigen lassen und kann auch die date_position nicht steuern. Das letztere ist in Ordnung, aber ich würde das Avatar-Bild wirklich gerne anzeigen können.

Ich habe diesen Code verwendet: [discourse_topics source="latest" tile=true excerpt_length="55" date_position=bottom]

Und ich erhalte diese Ausgabe:

Was mache ich falsch?

@simon bist du da draußen…? :smiley:

1 „Gefällt mir“

Kannst du prüfen, welcher Wert für das src-Element des Avatars festgelegt ist? Du findest dies über die Web-Inspektor-Funktion deines Browsers. Das gibt uns einen Hinweis darauf, worin das Problem besteht.

1 „Gefällt mir“

<img class="wpds-latest-avatar" src="">

Also kein Scr…

1 „Gefällt mir“

Ich werde das bis Montag nicht testen können. Ich werde mir eine Erinnerung setzen, mich dann darum zu kümmern. Bei einem schnellen Blick über den Code sollte das src-Attribut des Avatars für dich gesetzt werden. Ich sehe jedoch nirgendwo im Code, dass das Argument date_position=bottom verarbeitet wird. Macht es einen Unterschied, wenn du date_position aus den Shortcode-Argumenten entfernst?

Möglicherweise können die meisten Anwendungsfälle dieses Plugins jetzt über Embedding a list of Discourse Topics in another site abgedeckt werden.

Cool, ich habe versucht, es selbst zu beheben – aber ich war nicht in der Lage, das zu schaffen…

Im Moment …

…ist viel zu einfach.

Können Sie mir einen Link zu einem Beitrag schicken, auf dem Sie den Shortcode verwenden? Ich werde mir ansehen, was mit der Avatar-URL los ist.

Ich habe mir die Website angesehen, von der Sie die Themen abrufen. Das Problem besteht darin, dass das Plugin, um die Vorlage für den Avatar des Originalverfassers zu erhalten, durch die Poster jedes Themas iteriert, um den Poster mit der Beschreibung „Original Poster“ zu finden. Da Ihre Website auf Dänisch ist, sollte die Beschreibung, nach der gesucht werden muss, um den Originalverfasser zu finden, „Oprindelig forfatter“ lauten.

Ich bin mir nicht sicher, was ein besserer Weg wäre, um den Originalverfasser aus der Themenliste zu ermitteln. Wenn Sie versuchen möchten, das Problem auf Ihrer Website zu beheben, befindet sich der Code, der geändert werden muss, hier: wp-discourse-shortcodes/lib/discourse-topic-formatter.php at master · communiteq/wp-discourse-shortcodes · GitHub. Das Ersetzen des Musters '/Original Poster/' durch '/Oprindelig forfatter/' sollte das Problem für Sie beheben.

Ich werde das Problem mit date_position=bottom wahrscheinlich nicht beheben. Ich werde diesen Parameter aus der README-Datei des Plugins entfernen. Dieses Plugin gefällt mir sehr gut, aber meinem Verständnis nach sind Shortcodes auf WordPress nicht mehr der beste Ansatz für diese Art von Aufgabe. Ein neues Plugin, mit dem Sie einen Discourse-Themenliste-Block in einen WordPress-Beitrag einfügen könnten, wäre großartig.

4 „Gefällt mir“

Das hat es gelöst :smiley:

Danke!