# 个人资料中的可点击社交图标链接

**URL:** <https://meta.discourse.org/t/clickable-social-icon-links-on-profile/158136>\
**Category:** Theme component\
**Created:** [2020年七月18日 17:03 UTC](https://meta.discourse.org/t/clickable-social-icon-links-on-profile/158136 "2020-07-18T17:03:21Z")\
**Posts on this page:** 20\
**Page:** 3

<div class="post-metadata">

**Author:** ![xan2622](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/xan2622/32/156912_2.png) [@xan2622](https://meta.discourse.org/u/xan2622)\
**Post date:** [2022年十一月6日 09:20 UTC](https://meta.discourse.org/t/clickable-social-icon-links-on-profile/158136/43 "2022-11-06T09:20:31Z")

</div>

是否可以添加其他社交链接，例如：

- Mastodon - [Mastodon Icon | Font Awesome](https://fontawesome.com/icons/mastodon?s=solid&f=brands)
- Twitch - [Twitch Icon | Font Awesome](https://fontawesome.com/icons/twitch?f=brands)
- ArtStation - [Artstation Icon | Font Awesome](https://fontawesome.com/icons/artstation?f=brands&s=solid)
- BlenderMarket - [https://blendermarket.com/page/branding-assets](https://blendermarket.com/page/branding-assets)
- Gumroad - [https://www.stickpng.com/img/icons-logos-emojis/tech-companies/gumroad-logo-thumbnail](https://www.stickpng.com/img/icons-logos-emojis/tech-companies/gumroad-logo-thumbnail)
- Github - [Github Icon | Font Awesome](https://fontawesome.com/icons/github?f=brands)

---

<div class="post-metadata">

**Author:** ![cogdog](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cogdog/32/116536_2.png) [@cogdog](https://meta.discourse.org/u/cogdog)\
**Post date:** [2022年十一月14日 23:47 UTC](https://meta.discourse.org/t/clickable-social-icon-links-on-profile/158136/44 "2022-11-14T23:47:09Z")

</div>

我只能猜测如何实现这一点，但可以看到诀窍是将像 `@frodo@hobbit.town` 这样的 Mastodon 用户名（可能很容易用双“@”进行 grep 匹配？我讨厌 grep）转换为 `https://hobbit.town/@frodo`。

看起来可行？

除非用户只输入一个 Mastodon 链接的 URL（我更喜欢前者，因为我已经让用户在个人资料字段中输入 fediverse 用户名）。

---

<div class="post-metadata">

**Author:** ![Roi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/roi/32/130587_2.png) [@Roi](https://meta.discourse.org/u/Roi)\
**Post date:** [2023年二月8日 16:49 UTC](https://meta.discourse.org/t/clickable-social-icon-links-on-profile/158136/45 "2023-02-08T16:49:10Z")

</div>

@weallwegot 我刚刚为您的主题组件创建了一个拉取请求，其中包含一些更改：

> <https://github.com/weallwegot/discourse-social-links-clickable/pull/12>
>
> Please accept this PR to add Facebook support and also include some fixed in bas…e URLs. Thank you!

请接受此 PR 以添加 Facebook 支持，并包含一些基本 URL 的修复。谢谢！

---

<div class="post-metadata">

**Author:** ![Roi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/roi/32/130587_2.png) [@Roi](https://meta.discourse.org/u/Roi)\
**Post date:** [2023年二月8日 17:36 UTC](https://meta.discourse.org/t/clickable-social-icon-links-on-profile/158136/46 "2023-02-08T17:36:46Z")

</div>

谢谢 @weallwegot，速度真快！ 😃

---

<div class="post-metadata">

**Author:** ![weallwegot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/weallwegot/32/124753_2.png) [@weallwegot](https://meta.discourse.org/u/weallwegot)\
**Post date:** [2023年二月8日 17:37 UTC](https://meta.discourse.org/t/clickable-social-icon-links-on-profile/158136/47 "2023-02-08T17:37:24Z")

</div>

抱歉缺席——我对所有这些都持开放态度，欢迎提交拉取请求！

另外，如果有人比我更聪明，对如何推广 vvvvvv 有好主意，也欢迎提出。

> [@weallwegot](#):
>
> 如果……有人有兴趣尝试推广——你可以为每个社交媒体设置的另一个功能是颜色。  
> [推广添加新社交媒体的 Github 问题](https://github.com/weallwegot/discourse-social-links-clickable/issues/5)

---

<div class="post-metadata">

**Author:** ![weallwegot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/weallwegot/32/124753_2.png) [@weallwegot](https://meta.discourse.org/u/weallwegot)\
**Post date:** [2023年二月8日 17:42 UTC](https://meta.discourse.org/t/clickable-social-icon-links-on-profile/158136/48 "2023-02-08T17:42:12Z")

</div>

哦，哇，看起来有人fork了但从未提交PR——我会检查这个版本，但对于那些询问的人来说，可以看看这个fork

> **[GitHub - hlissner/discourse-social-links-clickable: make social links clickable](https://github.com/hlissner/discourse-social-links-clickable)**
>
> make social links clickable

---

<div class="post-metadata">

**Author:** ![Roi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/roi/32/130587_2.png) [@Roi](https://meta.discourse.org/u/Roi)\
**Post date:** [2023年二月8日 19:13 UTC](https://meta.discourse.org/t/clickable-social-icon-links-on-profile/158136/49 "2023-02-08T19:13:59Z")

</div>

> [@weallwegot](#):
>
> 将检查此版本，但对于那些询问的人，可以查看此分支

最好将所有内容都包含在您的“官方”版本中。我对 Github 不太了解，所以这个问题可能很愚蠢：任何人都可以从分叉的存储库向原始存储库请求 PR 吗？

---

<div class="post-metadata">

**Author:** ![commercial](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/commercial/32/121112_2.png) [@commercial](https://meta.discourse.org/u/commercial)\
**Post date:** [2023年三月7日 17:09 UTC](https://meta.discourse.org/t/clickable-social-icon-links-on-profile/158136/50 "2023-03-07T17:09:09Z")

</div>

我在控制台中遇到一个错误，是不是我的设置漏了什么？

> plugin-api.js:19 [THEME 9 ‘discourse-social-links-clickable’] 为了防止测试出错，请在 `modifyClass` 调用中添加 `pluginId` 键。这将确保修改只应用一次。  
> be @ plugin-api.js:19

---

<div class="post-metadata">

**Author:** ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)\
**Post date:** [2023年三月21日 14:18 UTC](https://meta.discourse.org/t/clickable-social-icon-links-on-profile/158136/51 "2023-03-21T14:18:21Z")

</div>

我没有尝试过该组件，但这听起来很熟悉。

我认为这是一个警告，而不是错误。它不会阻止组件工作，但应该更新它：[https://github.com/weallwegot/discourse-social-links-clickable/blob/master/common/head\_tag.html#L172](https://github.com/weallwegot/discourse-social-links-clickable/blob/master/common/head_tag.html#L172)

改为：

```js
api.modifyClass('component:user-card-contents', {
  pluginId: "someArbitraryValue",
  hasLocationOrWebsite: true
})

```

---

<div class="post-metadata">

**Author:** ![anon36484860](https://avatars.discourse-cdn.com/v4/letter/a/b782af/32.png) [@anon36484860](https://meta.discourse.org/u/anon36484860)\
**Post date:** [2023年四月26日 10:13 UTC](https://meta.discourse.org/t/clickable-social-icon-links-on-profile/158136/52 "2023-04-26T10:13:54Z")

</div>

Discord 个人资料链接存在问题。它总是显示我论坛的 URL，并将 Discord 用户名附加为个人资料链接的值。

 ![Screenshot 2023-04-26 at 12.13.02](https://global.discourse-cdn.com/meta/original/4X/4/8/0/48077f1a0db0190b3bfb674695f7d8c2048306bb.jpeg)

发生在 3.1.0.beta4 版本

---

<div class="post-metadata">

**Author:** ![digitaldominica](https://avatars.discourse-cdn.com/v4/letter/d/97f17d/32.png) [@digitaldominica](https://meta.discourse.org/u/digitaldominica)\
**Post date:** [2023年十二月18日 02:04 UTC](https://meta.discourse.org/t/clickable-social-icon-links-on-profile/158136/53 "2023-12-18T02:04:56Z")

</div>

感谢您的插件，但如果用户没有任何字段，它似乎会破坏用户卡片设计。

---

<div class="post-metadata">

**Author:** ![Roi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/roi/32/130587_2.png) [@Roi](https://meta.discourse.org/u/Roi)\
**Post date:** [2023年十二月18日 22:51 UTC](https://meta.discourse.org/t/clickable-social-icon-links-on-profile/158136/54 "2023-12-18T22:51:48Z")

</div>

是否可以将 X/Twitter 图标显示为 _temporary-twitter-x_ 而不是 _fab-twitter_？

---

<div class="post-metadata">

**Author:** ![sok777](https://avatars.discourse-cdn.com/v4/letter/s/82dd89/32.png) [@sok777](https://meta.discourse.org/u/sok777)\
**Post date:** [2024年一月11日 22:11 UTC](https://meta.discourse.org/t/clickable-social-icon-links-on-profile/158136/55 "2024-01-11T22:11:10Z")

</div>

在最近的更新中似乎由于 Ember JS 而损坏？

---

<div class="post-metadata">

**Author:** ![weallwegot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/weallwegot/32/124753_2.png) [@weallwegot](https://meta.discourse.org/u/weallwegot)\
**Post date:** [2024年一月11日 22:23 UTC](https://meta.discourse.org/t/clickable-social-icon-links-on-profile/158136/56 "2024-01-11T22:23:36Z")

</div>

抱歉，未能及时回复其他消息。我目前没有可以进行测试/更新的实例，因此不幸地落后于一些维护工作。不过，如果有人有快速修复或有能力在最新版本上进行测试，我可以审查任何 PR！

请告知，非常抱歉给您带来不便！

---

<div class="post-metadata">

**Author:** ![sok777](https://avatars.discourse-cdn.com/v4/letter/s/82dd89/32.png) [@sok777](https://meta.discourse.org/u/sok777)\
**Post date:** [2024年一月11日 22:25 UTC](https://meta.discourse.org/t/clickable-social-icon-links-on-profile/158136/57 "2024-01-11T22:25:00Z")

</div>

我不是 Ember 方面的专家，但如果有人有解决方案，我很乐意进行测试并分享控制台日志！

---

<div class="post-metadata">

**Author:** ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)\
**Post date:** [2024年一月11日 22:37 UTC](https://meta.discourse.org/t/clickable-social-icon-links-on-profile/158136/58 "2024-01-11T22:37:40Z")

</div>

我现在将添加#broken标签，但希望它只是暂时的，有人会提供你需要的PR。🤞

---

<div class="post-metadata">

**Author:** ![sok777](https://avatars.discourse-cdn.com/v4/letter/s/82dd89/32.png) [@sok777](https://meta.discourse.org/u/sok777)\
**Post date:** [2024年一月11日 22:54 UTC](https://meta.discourse.org/t/clickable-social-icon-links-on-profile/158136/59 "2024-01-11T22:54:20Z")

</div>

希望这能有所帮助。

 ![Screenshot 2024-01-11 at 22.52.22](https://global.discourse-cdn.com/meta/original/4X/2/0/6/2069fc480644a7485ce24bd4659559ac4b36dced.png)  
 ![Screenshot 2024-01-11 at 22.52.44](https://global.discourse-cdn.com/meta/original/4X/9/2/b/92b0657a4327732714343f2166622c64ec8c16b0.png)

---

<div class="post-metadata">

**Author:** ![Roi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/roi/32/130587_2.png) [@Roi](https://meta.discourse.org/u/Roi)\
**Post date:** [2024年一月16日 22:11 UTC](https://meta.discourse.org/t/clickable-social-icon-links-on-profile/158136/60 "2024-01-16T22:11:16Z")

</div>

我刚刚提交了一个 PR。虽然不是关于当前问题的，但它是关于将 Twitter 替换为 X 的。与当前问题相比，这根本不重要，但也许仍然有用。而且可能有助于保持对重要修复的关注。 😉

> <https://github.com/weallwegot/discourse-social-links-clickable/pull/15>
>
> Name and icon, but only the visible part on the frontend. Rest is untouched and …still "Twitter". Also the default field name is still "Twitter".

---

<div class="post-metadata">

**Author:** ![bartv](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bartv/32/130052_2.png) [@bartv](https://meta.discourse.org/u/bartv)\
**Post date:** [2024年一月25日 15:14 UTC](https://meta.discourse.org/t/clickable-social-icon-links-on-profile/158136/61 "2024-01-25T15:14:14Z")

</div>

有人弄清楚了吗？

---

<div class="post-metadata">

**Author:** ![cogdog](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cogdog/32/116536_2.png) [@cogdog](https://meta.discourse.org/u/cogdog)\
**Post date:** [2024年一月31日 21:17 UTC](https://meta.discourse.org/t/clickable-social-icon-links-on-profile/158136/62 "2024-01-31T21:17:05Z")

</div>

我仍然收到警告：

 ![Screen Shot 132](https://global.discourse-cdn.com/meta/original/4X/3/b/5/3b58f3a2f8f3084de0338d1813908c83a3820ddb.jpeg)

引用 [Ember 5 更改](https://meta.discourse.org/t/preparing-for-discourses-upgrade-to-ember-5/287211)，该更改 [我已在此插件中报告了一个问题](https://github.com/weallwegot/discourse-social-links-clickable/issues/14)。

如果我正确理解了这个帖子，似乎该插件很可能需要更新（这超出了我的代码能力范围）。这并非非常关键，我最有可能放弃它。我一直希望添加更多服务（尤其是 Mastodon）。

[上一頁](https://meta.discourse.org/t/clickable-social-icon-links-on-profile/158136.md?page=2)

[下一頁](https://meta.discourse.org/t/clickable-social-icon-links-on-profile/158136.md?page=4)
