自定义 discourse-crowd 登录屏幕 html

Hi Everyone.

I’m newbe on Discourse, and I must to change something in Login page but I don’t know where is the target and is content.

The URL looks like this: my.domain.com/auth/crowd and I get a Login page but I’m not able to edit its content.
I saw something in the discourse conf file (crowd_custom_html) but the content is not really the same as displayed on the page.
I wonder where I can change this content.

Also, I checked if there were any redirection on /auth/crowd, Nothing (I guess).

Is someone can help me please?

Thanks

Franck

Your discourse is probably using Atlassian Crowd for sso

You should check the crowd documentation for any changes to your login page.

2 个赞

Ok thanks for your help. :slight_smile:

在进一步深入研究代码后(我不会 Ruby),看起来代码中有某些内容阻止了 HTML 内容。

我想这可能是设置 DISCOURSE_CROWD_CUSTOM_HTML 的原因:这将在此处显示内容?

1 个赞

是的,这应该可行——您应该在 app.yml 文件中配置 DISCOURSE_CROWD_CUSTOM_HTML 环境变量。

不幸的是,它不起作用。
也许内容必须用引号括起来?
目前,内容没有用引号括起来。

是的,我刚刚在本地试了一下,看起来我们在解析包含引号的 GlobalSetting 值时遇到了一些问题(自定义 HTML 几乎总是包含引号)。我刚刚推送了这个变通方法:

如果更新你的站点,现在应该会好很多。这是我现在可以正常工作的示例值:

DISCOURSE_CROWD_CUSTOM_HTML: "<a href='https://example.com' style='display: block; margin: 0.5em 0; text-align: center'>Sign up for an example.com account!</a><a style='display: block; text-align: center' href='https://example.com/forgot_password'>Forgot Password</a>"

非常感谢你,大卫。
我明天会更新网站。
现在就做吧,现在不是好时机。

我可以通过图形用户界面(GUI)更新网站吗?

我会通知你。

1 个赞

如果你不更改 app.yml 中的值,那么你应该可以通过 /admin/upgrade 来升级 discourse-crowd 插件。:+1:

论坛不会停止?

这与其他任何更新都一样——更新运行时可能会有几秒钟/几分钟的停机/缓慢。如果可能,最好等到您的网站访问量较低时再进行更新。

好的,明白了。
谢谢!我会通知您的 :slight_smile:

1 个赞

@david 请教一个问题。

我看到有 crowd_popup_titlecrowd_title

它们之间的区别是,前者显示在弹出窗口中,后者显示在整页中,对吗?

“popup”一词有点过时了。我们不再使用弹出窗口进行身份验证,因此该值实际上用作身份验证期间选项卡的 <title>

(即,这部分:)

crowd_title 用作登录按钮上的标签(如果您启用了多种登录方法)。

如果您不提供 crowd_popup_title,则 crowd_title 将用于登录选项卡的 <title>

好的。
我这么说是因为,确实,更新后没有用于登录的弹出窗口。我们现在有一个完整的登录页面。

顺便说一句,有没有办法自定义这个页面,比如背景……等等?

1 个赞

是的,您可以使用 DISCOURSE_CROWD_CUSTOM_CSS 向页面添加自定义 CSS 规则。

1 个赞

早上好 @david

这可行。
非常感谢。

祝您有愉快的一天。 :slight_smile:

1 个赞

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.