Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted November 11, 20186 yr 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
November 13, 20186 yr Hello, CSS a[data-mentionid] { text-indent: -17px; } or jquery $('a[data-mentionid]').html($('a[data-mentionid]').html().substring(1));
November 13, 20186 yr Author 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)); }); Edited November 13, 20186 yr by Stefan Werner
February 14, 20196 yr 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)?
March 1, 20196 yr Author 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
Archived
This topic is now archived and is closed to further replies.