Is it possible to insert a code by default?

It is possible, by default, to insert a code, before every link of .gif .mp4 .png .jpeg
In this case this code here

[img]http://[/img]

I’m facing a problem on my site that doesn’t embed gif, mp4 and images, but if I put this embed code, then I thought, is it possible every time I post a link with the end of these extensions, this code is automatically added?

[img]http://[/img]

1 Like

What code are you referring to here? Is your site a Discourse site?

My site is a discourse forum, this is the code:

[img]http://[/img]

1 Like

If I understand your question correctly, out of the box, it is not possible to add custom code automatically to one’s post.

If this is the main issue you are facing that is making you want to add the code, then check out the authorized extensions site settings in your site: yoursite.com/admin/site_settings/category/all_results?filter=authorized%20extensions

2 Likes

But why can’t I add automatic code to the links? (And when I use the copy image, there is always an automatic code in the link, there is no way to do the same?) exemple:

![Moderador|120x120](upload://eqY4BNsVC9zAbuPy8ZJ4zCMBmHc.gif)

I commented on it here

There was a moderator who opened a topic, but they still haven’t responded

I already tried this option that you gave me, it didn’t work, I’m having a serious problem in my forum of embedding gifs, I even commented here

The only solution I think is if the code that I said in each link is automatically added .gif .mp4 .png .jpeg, because with these codes the extensions are incorporated or is there any way to reset all the discouse configuration? or do a new reinstallation, without affecting the users or the content of the forum?

or is there another solution?

I already talked with IMGUR, and with my server they said that everything is ok with them, that the error may be another

2 Likes

Oh! I see! Thank you for sharing those links, I now fully understand what your request is.

We haven’t built or added that feature yet, as we don’t have the engineering time for it at the moment. But if you can make a PR for it or anyone else can, we’d appreciate that. We have a topic that explains the feature which you linked to: Allow pasting of GIFs into composer - feature - Discourse Meta.

2 Likes

What is PR?

Too bad I don’t have this feature :frowning: Do you know how I can reset all my forum settings (Discourse) without deleting members or forum content?

Any admin settings that have been changed show up highlighted in yellow, and you can reset them using the ‘reset’ button for each. There’s also an ‘Only show overridden’ checkbox on the top right too, to only display those that have been changed (if you’re using mobile you may need to flip your phone to landscape view for that to show up :+1:)

2 Likes

But is there an option that resets everything?

Not that I’m aware of? Though I find using the method above really quick when I’m reconfiguring and reseting my test site for different problems.

1 Like