Summary | Discourse Gifs adds a button to the composer that allows you to search for gifs and easily add the best one to your post. | |
Repository Link | https://github.com/discourse/discourse-gifs | |
New to Discourse Themes? | Beginnerās guide to using Discourse Themes |
Install this theme component
Features
After searching you get an infinite scrolling wall of related gifs:
Clicking one one inserts it on your current composer, which looks like:
This is heavily based on a old fork of ReplyGif: Adding reaction GIF easily, so thanks to @cpradio.
The big differences are:
-
It can use animated webp instead of gifs, so itās a lot more efficient for bandwidth.
-
It is a theme-component, so it is way easier to install and update.
-
It offers the choice of Giphy API or the Tenor API.
-
Infinite Scrolling for results
-
Resulting gifs are downloaded to Discourse using our native bitrot protection. You can disable this behavior using existing settings if space is a concern.
-
No need to fiddle with nginx to setup a proxy for HTTPS
Obtaining a Giphy API Key
For the component to work you need to visit Dashboard | GIPHY Developers and click like:
Fill up the form and the API key will be show as:
Obtaining a Tenor API key
Get that key at the official Tenor site: GIF API - Better, Faster & Free | Get Your GIFs with Tenor
After that visit the theme-component page in Discourse and fill up the settings, e.g:
Settings
Name | Description |
---|---|
api provider | Which GIF provider should we use? |
giphy api key | GIPHY: API key |
giphy file format | GIPHY: Image format to use. WEBP has smaller files that load quicker while GIF provides compatibility with old browsers. |
giphy content rating | GIPHY: Content rating for search results. Find more info at https://developers.giphy.com/docs/optional-settings#rating . |
giphy locale | GIPHY: Language to use on the search. Used to cater search to regional content. Set to your default forum locale. |
limit infinite search results | Limit the number of GIF results returned as the user scrolls infinitely to prevent API Rate Limiting. |
max results limit | Tenor & GIPHY: When ālimit infinite search resultsā is enabled, we will search until we get this number of maximum GIF results. Each API call retrieves 24 results, e.g. 240 Max Limit: 240 / 24 = 10 API Calls . |
tenor api key | Tenor: V2 API Key. Instructions to get one can be found in Discourse Meta - Discourse Gifs . |
tenor client key | Tenor: (optional) client-specified string that represents the integration |
tenor file detail | Tenor: Image format to use |
tenor content filter | Tenor: Content safety level for Tenor results. Find more info in Tenor API Guides . |
tenor country | Tenor: Two-Letter Country of Origin for the request. Find your country code in Wikipedia - ISO_3166-1 . |
tenor locale | Tenor: Language to use on the search. Country code (optional) can be provided to differentiate between dialects. |
Translation | Deafault |
---|---|
gif.modal_title | Search GIFs |
gif.query | Term |
gif.insert | Insert Selected Images |
gif.composer_title | Search GIFs |
gif.no_results | Enter a keyword in the input box above to search for GIFs. |
gif.bad_api_key | Invalid $api_provider API Key. Site admins, please check your key and/or your $api_provider account. |
gif.error_rate_limit | We have reached our $api_provider API Rate Limits. Please wait and try again later. If this issue persists, contact your site admin. |
gif.error_search_too_long | Please shorten your search query to under 50 characters and try again. |
Hosted by us? Theme components are available to use on our Standard, Business, and Enterprise plans.
Last edited by @JammyDodger 2024-06-12T10:45:10Z
Check document
Perform check on document: