News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Automatic word linking

Started by Kolya, January 02, 2022, 09:46:03 AM

Previous topic - Next topic

Kolya

Hey y'all, is there a mod that automatically links pre-defined words in posts?
I am imagining an admin interface, where one could add new words and the URLs they should link to whenever they are used in posts.

I checked the mods page but didn't find anything like that. Maybe I missed it.
Does a mod like that exist?

Aleksi "Lex" Kilpinen

How about just using word censoring?
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Kolya

I guess that would work. Excellent idea. :)

Kolya

On further inspection the results are not ideal when the word is already linked or part of a link.

Arantor


Kolya

Thanks Arantor, that sounds indeed quite similar to what I want. But censoring is built-in and already 95% there. The only problem is that nested URL-BBCode hasn't been dealt with (SMF 2.0.18). I'm looking into that.

4Kstore


¡¡NEW MOD: Sparkles User Names!!!

Kolya

#7
Indeed that seems perfect. And it even can handle words that were previously linked or part of a link. Thanks a lot @4Kstore.

EDIT: I threw out the dependency on jquery 1.8.2 (loaded via googleapis) and a local bootstrap JS file. I don't intend to use the popup function and I avoid all external dependencies on my site in order to prevent tracking. Anyway, it still works.

Advertisement: