Make hashtags clickable?
-
- Sr. Bludit
- Posts: 38
- Joined: Thu Jan 05, 2023 9:07 pm
- Has thanked: 11 times
- Been thanked: 3 times
Folks, when writing something like a #hashtag in a bludit page, this is merely "just" text. Is it possible to somehow render this kind of text clickable to search posts with the same tag...?
Thanks,
Kristian
Thanks,
Kristian
- Edi
- Site Admin
- Posts: 3121
- Joined: Sun Aug 09, 2015 5:01 pm
- Location: Zurich
- Has thanked: 54 times
- Been thanked: 78 times
- Contact:
Bludit has tags. They can be shown for example at the beginning or at the end of some text. In the text itself you can link with the URL of the tag to show all posts or pages with the tag.
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets
-
- Sr. Bludit
- Posts: 38
- Joined: Thu Jan 05, 2023 9:07 pm
- Has thanked: 11 times
- Been thanked: 3 times
Ah yes, sorry, I know that, should have been more explicit here: What I'd rather like to see is Bludit rendering #hashtags (a word with a # prepended) in a post into links to a search for that hashtag on the blog automatically. But I take that's not available then...?
- multicolordev
- Master Bludit
- Posts: 137
- Joined: Thu May 26, 2022 12:33 pm
- Has thanked: 15 times
- Been thanked: 91 times
- multicolordev
- Master Bludit
- Posts: 137
- Joined: Thu May 26, 2022 12:33 pm
- Has thanked: 15 times
- Been thanked: 91 times
- multicolordev
- Master Bludit
- Posts: 137
- Joined: Thu May 26, 2022 12:33 pm
- Has thanked: 15 times
- Been thanked: 91 times
- Misteric
- Ssr. Bludit
- Posts: 16
- Joined: Mon Aug 08, 2022 2:55 pm
- Has thanked: 4 times
- Been thanked: 6 times
Hi kr428 (Kristian) and others Bluditors,
There are at least two solutions:
1. You can use autocomplete (array of tags = special charater "#", make a link) in tinymce.
2. When the page is saved (new-content or edit-content) you can check with a php function (substr(), strpos() or preg_match() and replace it by a link str_replace().
Hope it helps you further!
Kind regards,
Misteric
There are at least two solutions:
1. You can use autocomplete (array of tags = special charater "#", make a link) in tinymce.
2. When the page is saved (new-content or edit-content) you can check with a php function (substr(), strpos() or preg_match() and replace it by a link str_replace().
Hope it helps you further!
Kind regards,
Misteric
-
- Sr. Bludit
- Posts: 38
- Joined: Thu Jan 05, 2023 9:07 pm
- Has thanked: 11 times
- Been thanked: 3 times
Cool, thanks very much. Been testing this, and added two notes to the github repo (as I'm unsure whether it doesn't work for me or I'm just too dumb or using the wrong setup...).multicolordev wrote: ↑Mon Jun 12, 2023 10:39 pm viewtopic.php?t=2642 - i do it for you If you like my work you can buy me coffe via paypal:)
-
- Sr. Bludit
- Posts: 38
- Joined: Thu Jan 05, 2023 9:07 pm
- Has thanked: 11 times
- Been thanked: 3 times
Thanks very much for the input. How does that autocomplete approach work? And, more important, I assume this will add links to the text but not keywords to the actual post itself...? That's something I would have to do on my own manually, no?Misteric wrote: ↑Sat Jun 17, 2023 7:49 am
There are at least two solutions:
1. You can use autocomplete (array of tags = special charater "#", make a link) in tinymce.
2. When the page is saved (new-content or edit-content) you can check with a php function (substr(), strpos() or preg_match() and replace it by a link str_replace().