Page 1 of 1

Make hashtags clickable?

Posted: Thu Jun 01, 2023 2:38 pm
by kr428
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

Re: Make hashtags clickable?

Posted: Thu Jun 01, 2023 4:55 pm
by Edi
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.

Re: Make hashtags clickable?

Posted: Fri Jun 02, 2023 6:21 am
by kr428
Edi wrote: Thu Jun 01, 2023 4:55 pm 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.
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...?

Re: Make hashtags clickable?

Posted: Fri Jun 02, 2023 1:17 pm
by multicolordev
next week i do it.

Re: Make hashtags clickable?

Posted: Sun Jun 11, 2023 8:35 pm
by multicolordev
Still coding:)

Re: Make hashtags clickable?

Posted: Mon Jun 12, 2023 10:39 pm
by multicolordev
kr428 wrote: Thu Jun 01, 2023 2:38 pm 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
viewtopic.php?t=2642 - i do it for you :) If you like my work you can buy me coffe via paypal:)

Re: Make hashtags clickable?

Posted: Sat Jun 17, 2023 7:49 am
by Misteric
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

Re: Make hashtags clickable?

Posted: Thu Aug 24, 2023 2:09 pm
by kr428
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:)
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...).😁

Re: Make hashtags clickable?

Posted: Thu Aug 24, 2023 2:10 pm
by kr428
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().
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?