Stefan Werner Posted November 11, 2018 Posted November 11, 2018 Hi, when I mention a user in the forum by @Member, the resulting blue box in the final post still contains the @-sign. Is it possible to hide the @-sign in the final post? This would improve the flow of reading. Kind regards, Stefan
newbie LAC Posted November 13, 2018 Posted November 13, 2018 Hello, CSS a[data-mentionid] { text-indent: -17px; } or jquery $('a[data-mentionid]').html($('a[data-mentionid]').html().substring(1));
Stefan Werner Posted November 13, 2018 Author Posted November 13, 2018 Hi, thank you for the code. I've tried the jquery way, which does not work correctly. It removes the @, but multiple mentions on a page are replaced by the first username. Kind regards, Stefan Edit: I've changed the jquery code from implicit to explicit iteration and this works: $('a[data-mentionid]').each(function() { $(this).html($(this).html().substring(1)); });
szalik.dev Posted February 14, 2019 Posted February 14, 2019 On 11/13/2018 at 8:24 PM, Stefan Werner said: Hi, thank you for the code. I've tried the jquery way, which does not work correctly. It removes the @, but multiple mentions on a page are replaced by the first username. Kind regards, Stefan Edit: I've changed the jquery code from implicit to explicit iteration and this works: $('a[data-mentionid]').each(function() { $(this).html($(this).html().substring(1)); }); does it still work, and if so, where should i put this code(tried globalTemplate, didn't worked)?
Stefan Werner Posted March 1, 2019 Author Posted March 1, 2019 Hi, On 2/14/2019 at 9:54 AM, ~Jakso.` said: does it still work, and if so, where should i put this code(tried globalTemplate, didn't worked)? for me it works most of the times, I'm using IPS 4.3. It does not fully work in quotes. I've added the code to a custom js file and uploaded it to my theme ("Manage resources" -> "Add resource"). Then I included the js file in the globalTemplate <script src='{resource="Theme.js" app="core" location="front"}'></script> Kind regards, Stefan
Recommended Posts
Archived
This topic is now archived and is closed to further replies.