Let’s say you want to add a link of User’s main profile page on Discourse user profile page and user card, clicking on that link will take user to main (external) website.
The link of main website user profile page will be like:
http://site.com/username
Where username is the Discourse username of that user. (It should be same on both main site and Discourse forum)
Let’s get started!
Add custom CSS
Paste this CSS code in Admin > Customize > CSS/HTML > CSS section:
Dear Arpit, does this approach really update userfield siteLink?
We used it “as is” and siteLink in empty under user/preferences siteLink although it is visible over user card
thx
Any chance this example could get an update? Apparently it will not work, since api.container.lookupFactory is a private API and will break stuff
I asked the same a long time ago. You’d have to write a plugin that exposes external_id - I asked recently if it had become enabled, since they changed a lot of stuff, but haven’t received an answer, so I guess it still requires a plugin…
@techAPJ, 이 코드는 훌륭합니다. 작은 수정을 하나 하고 싶은데 혹시 아시는 분이 있을까요… URL 끝에 있는 external_id(예: const url = 'http://site.com/${external_id}')를 어떻게 가져올 수 있을까요? 사용자 객체에서 external_id를 가져오도록 코드를 변경해 보았지만 해당 속성이 정의되지 않았다고 합니다.
이 코드는 비추천(deprecated) 상태입니다. 업데이트해 주시겠어요? 직접 수정을 시도해 봤지만 작동하지 않았습니다.
[관리자 공지] 플러그인 또는 테마 컴포넌트 중 하나가 Discourse 3.2와 호환되지 않아 업데이트가 필요합니다.
자세한 내용은 Communiteq 지식 베이스에서 확인할 수 있습니다.
상세 정보: [THEME 1 ‘Default’] 함수 프로토타입 확장 기능이 비추천(deprecated)되었으므로, function(){}.property(‘bar’)에서 computed(‘bar’, function() {})로 마이그레이션해 주세요.