Chrome/Firefox extension "Share to discourse"

I’m not interested in making a browser extension, but I’d like to try making a share to Discourse plugin for WordPress. A specific logo could be used to link to a specific forum, or clicking a general logo could open a modal window with a list of forums that had registered with the plugin. Once a forum was selected, it would be possible to offer a list of categories/groups/individuals to share the post with.

The end result would be to open a new browser tab with a link similar to the one @david posted. Doing it this way would let Discourse handle the most of the work.

I’ll try making a prototype of it and see if it makes any sense. Thanks for the idea.

4 个赞

I’m willing to support that idea Simon but I’m sure there is a audience for that.

Elsewhere on meta.discourse, I’ve posted my interest in a high-level, onebox integration of Diaspora* a privacy-aware, distributed, open source social network that can bring synergistic enhancement to Discourse such as a more feature rich User Profile but without adding complexity and dreaded Feature Fatigue.

Adding standard, and it is unquestionably a web standard, contempory social media share tools caters to web denizens whose lives online are entirely on the surface:

  • Instagram,
  • Snapchat,
  • YouTube,
  • Facebook
  • Oxford English Dictionary

The SUBVS.US proposal for the Diaspora of Discourse plugin with Diasora sidebars open and Discourse selected instead of the stock Diaspora Activity Stream


Instead of static sidebars these have Sliders ie Baby Hamburgers on each side that can be set to open and close automagically or manually. In this mockup we see the Discourse forum is “In Focus”, the Activity Stream is always a toggle away from use.

A social media button would be accessible at all times within the editor.

The iconic share buttons look and work the same on every website. All of them are connected, and I simply propose making acess to that ecosystem possible from within a Discourse paradigm.

Another long term project you probably will claim you don’t get, is Discourse for Google Docs, a version of WordPress for Google Docs it is one of my all time favorite chunks of code from Automatic.

1 个赞

This will be covered by the new Web API:

https://github.com/WICG/web-share-target/blob/master/docs/explainer.md

7 个赞

This is live in Chrome Canary/Dev. However Firefox and Chrome devs are discussing the string format of the URL and this will not land in stable browsers until it gets settled.

Here is how it will work when this lands:

7 个赞

This is what I have been looking for! A lot of people like to just click and share, I have a few web site owns will to place something like this on there website so our users can post on to our forums with ease

2 个赞

这对我帮助很大。

这将在新窗口中打开它,并添加一个链接类别:

javascript:window.open("https://www.example-forum.com/new-topic?category=links&title="+encodeURIComponent(window.location.href), "_blank");

现在我可以非常快速地将链接添加到我的论坛中,以便以后进行分类。考虑到我将论坛用作知识库或数字花园,这可以非常轻松地将链接转储到其中,以便以后进行优化。

3 个赞

顺便说一下,万一有人想知道如何使用它,将其保存为书签,然后您可以单击书签来执行操作

2 个赞

这是一个具有挑战性的主题……我怎样才能一键将有用的链接添加到 Discourse 中。

我想逻辑上应该与 iOS“分享”面板中的“发布到 Discourse”按钮差不多。

这可以按如下方式编程:

  • 从“分享”面板接收输入,分享面板上的按钮将是快捷方式的名称
  • 从快捷方式输入中获取 文本
  • 文本 ook(“Look”一词的一部分,如“Look what i found on”)
  • 文本 I(如“I found”)
  • 文本 Source:(如说明 URL 的来源)
  • 文本 heck(“Check”一词的一部分,如“Check out what i found”)
  • 如果以上任何文本是输入文本
  • 将 Source: 替换为 just want a link
  • 从中获取 URL
  • 获取主机
  • 获取路径
  • 获取查询
  • 将主机、路径、?以及查询编码为 URL
  • 文本 https://yourdomain.co.uk/new-topic?title=Shared%20from%20iOS&body=https://[encoded URL]
  • 在 Safari 中打开该文本

否则

  • 如果快捷方式输入文本包含 g.co
  • 在文本中匹配 https?://(.*)
  • 获取匹配项中的第 1 组
  • 文本 https://yourdomain.co.uk/new-topic?title=Shared%20from%20iOS&body=https://[the text]
  • 在 Safari 中打开该文本

否则

  • 如果快捷方式输入文本包含 youtube
  • 获取主机
  • 获取路径
  • 获取查询
  • 编码
  • 论坛 URL 的文本
  • 在 Safari 中打开

否则

  • 文本只是文本
  • 只让正文是文本

:rofl:

1 个赞