기능
검색 후 관련 GIF로 구성된 무한 스크롤 벽을 볼 수 있습니다:
하나를 클릭하면 현재 작성기에 삽입되며, 다음과 같은 모습입니다:
이것은 ReplyGif: Adding reaction GIF easily 의 오래된 포크를 기반으로 하고 있으므로 @cpradio에게 감사드립니다.
주요 차이점은 다음과 같습니다:
GIF 대신 애니메이션 webp를 사용할 수 있어 대역폭 효율이 훨씬 높습니다.
테마 컴포넌트이므로 설치와 업데이트가 훨씬 쉽습니다.
Giphy API 또는 Tenor API 중 하나를 선택할 수 있습니다.
결과물에 대한 무한 스크롤 지원
결과 GIF는 Discourse의 네이티브 bitrot 보호 기능을 사용하여 Discourse에 다운로드됩니다. 공간이 걱정된다면 기존 설정을 사용하여 이 동작을 비활성화할 수 있습니다.
HTTPS 프록시를 설정하기 위해 nginx를 조정할 필요가 없습니다
Giphy API 키 가져오기
컴포넌트가 작동하려면 Dashboard | GIPHY Developers 를 방문하고 다음과 같이 클릭해야 합니다:
양식을 작성하면 API 키가 다음과 같이 표시됩니다:
Tenor API 키 가져오기
공식 Tenor 사이트에서 키를 가져오세요: GIF API - Better, Faster & Free | Get Your GIFs with Tenor
그 후 Discourse에서 테마 컴포넌트 페이지를 방문하여 설정을 입력하세요. 예:
설정
이름
설명
api provider
어떤 GIF 제공업체를 사용할까요?
giphy api key
GIPHY: API 키
giphy file format
GIPHY: 사용할 이미지 형식. WEBP는 파일 크기가 작아 더 빠르게 로드되며, GIF는 구식 브라우저와의 호환성을 제공합니다.
giphy content rating
GIPHY: 검색 결과의 콘텐츠 등급. 자세한 정보는 https://developers.giphy.com/docs/optional-settings#rating 에서 확인하세요.
giphy locale
GIPHY: 검색에 사용할 언어. 지역 콘텐츠에 맞게 검색을 조정하는 데 사용됩니다. 기본 포럼 로케일로 설정하세요.
limit infinite search results
사용자가 무한히 스크롤할 때 반환되는 GIF 결과 수를 제한하여 API Rate Limiting을 방지합니다.
max results limit
Tenor & GIPHY: "limit infinite search results"가 활성화되면 이 최대 GIF 결과 수를 얻을 때까지 검색합니다. 각 API 호출은 24개의 결과를 가져오며, 예: 240 Max Limit: 240 / 24 = 10 API Calls .
tenor api key
Tenor: V2 API Key. 키를 얻는 방법은 Discourse Meta - Discourse Gifs 에서 찾을 수 있습니다.
tenor client key
Tenor: (선택 사항) 통합을 나타내는 클라이언트 지정 문자열
tenor file detail
Tenor: 사용할 이미지 형식
tenor content filter
Tenor: Tenor 결과의 콘텐츠 안전 수준. 자세한 정보는 Tenor API Guides 에서 확인하세요.
tenor country
Tenor: 요청의 두 글자 국가 코드. 국가 코드는 Wikipedia - ISO_3166-1 에서 찾을 수 있습니다.
tenor locale
Tenor: 검색에 사용할 언어. 방언을 구별하기 위해 국가 코드(선택 사항)를 제공할 수 있습니다.
번역
기본값
gif.modal_title
GIF 검색
gif.query
검색어
gif.insert
선택한 이미지 삽입
gif.composer_title
GIF 검색
gif.no_results
GIF를 검색하려면 위의 입력 상자에 키워드를 입력하세요.
gif.bad_api_key
$api_provider API 키가 잘못되었습니다. 사이트 관리자는 키 및/또는 $api_provider 계정을 확인해 주세요.
gif.error_rate_limit
$api_provider API Rate Limit에 도달했습니다. 잠시 후 다시 시도해 주세요. 이 문제가 지속되면 사이트 관리자에게 문의하세요.
gif.error_search_too_long
검색어를 50자 이하로 줄여서 다시 시도해 주세요.
우리가 호스팅하나요? 테마 컴포넌트는 Standard, Business, Enterprise 플랜에서 사용할 수 있습니다.
84개의 좋아요
Falco
(Falco)
1월 14, 2021, 4:17오후
115
Hey @Heather_Dudley ,
I added a new site setting to allow you to force the component to use the GIF format instead of webp.
Just be aware that it uses more than double the disk space / network bandwidth while having less quality.
This gif here:
GIF: 3.5MB
WEBP: 1.4MB
MP4: 1MB
AVIF: 276.8 KB
For everyone else I added autofocus on the search modal!
17개의 좋아요
awesome, thank you so much! was looking for such a feature
3개의 좋아요
Where is the setting, @Falco ? I haven’t been able to find it to enable it.
1개의 좋아요
Okay, I am not blind then, I don’t have that option. I just have the api key:
repository I’m linked to: https://github.com/discourse/discourse-gifs/tree/giphy
1개의 좋아요
Falco
(Falco)
4월 2, 2021, 11:00오후
135
Oh you are installed into the old branch, re-install using the main branch at GitHub - discourse/discourse-gifs · GitHub
3개의 좋아요
Aaaah, that would do it. Thank you. I don’t forsee issues, but I’ll let you know if I have any!
4개의 좋아요
Is it not possible to use Google’s Tenor platform? After Facebook acquired Giphy , I stopped using it and switched over to Tenor.
3개의 좋아요
Falco
(Falco)
4월 3, 2021, 2:29오후
139
This component used Tenor in the first version, but I moved to Giphy because using WEBP gifs is a lot better for usability over other formats. And Tenor doesn’t support WEBP gifs.
4개의 좋아요
orenwolf
(Ken Snider)
4월 3, 2021, 4:43오후
140
Ironic considering who created the webp format, and who now owns Tenor.
8개의 좋아요
Falco
(Falco)
4월 4, 2021, 2:47오전
141
Maybe they go straight for animated avif ? It’s already live on Chrome, and will be soon everywhere modern.
I added it to this post above, the file size is amazing:
Hey @Heather_Dudley ,
I added a new site setting to allow you to force the component to use the GIF format instead of webp.
Just be aware that it uses more than double the disk space / network bandwidth while having less quality.
This gif here:
GIF: 3.5MB
[giphy]
WEBP: 1.4MB
[Detective Pikachu Reaction GIF]
MP4: 1MB
AVIF: 276.8 KB
[pikachu.avif|]
For everyone else I added autofocus on the search modal!
5개의 좋아요
How is development of that format going? How long do you think it’ll take for other companies to adopt it (including Discourse )?
2개의 좋아요
Falco
(Falco)
4월 4, 2021, 12:51오후
143
Discourse can support it easily as soon as browser support happens: AVIF image format | Can I use... Support tables for HTML5, CSS3, etc
4개의 좋아요
Falco
(Falco)
4월 6, 2021, 8:20오후
145
Heather_Dudley:
On some mobile resolutions, the gear icon is obscured by the gif icon:
Thanks to @eviltrout we now render the GIF button in a better place in mobile so this won’t happen anymore!
10개의 좋아요
mstm
(mstm)
4월 6, 2021, 8:48오후
146
Thanks @Falco , is it possible to hide the gif button while previewing the message?
Thanks
1개의 좋아요
Richie
(Richie Rich)
4월 6, 2021, 8:53오후
147
I’m not that familiar with theme components, is it possible to enable this on only one category?
We have a random / off topic / fun category where this would be a brilliant addition, but if I add it to all categories then all hell will let loose
4개의 좋아요
You could try with css but since the composer stays open when we navigate on the forum, I’m not sure it would work 100%
It would be something like this
:not(.category-your_category_id) .d-icon-discourse-gifs-gif-icon {
display: none
}
4개의 좋아요
Falco
(Falco)
4월 6, 2021, 9:21오후
149
Good idea. Added it in last version, please update!
8개의 좋아요
DogeRTX
(ǝɹıɐuoıllıᙠoʇdʎɹƆ / threadripper.eth)
5월 26, 2021, 9:16오후
166
This is awesome! Nice job, just got this added to my forum!
4개의 좋아요