XF 2.3 Any way to remove prefix from showing up in notifications before thread title?

zzlpolitics

Active member
Screenshot 2024-09-11 210635.webp

Just feel like it looks stupid. Any way to get rid of Off-Topic or whatever the prefix is before the thread title?

Thanks in advance for any help!
 
Solution
Couldn't you just edit the templates for the alerts? For example, I think you can edit the alert_post_quote template to change this:

HTML:
{{ phrase('x_quoted_your_post_in_thread_y', {
    'name': username_link($user, false, {'defaultname': $alert.username}),
    'title': '<a href="' . link('posts', $content) . '" class="fauxBlockLink-blockLink">' . prefix('thread', $content.Thread) . $content.Thread.title . '</a>'
}) }}

...to this:

HTML:
{{ phrase('x_quoted_your_post_in_thread_y', {
    'name': username_link($user, false, {'defaultname': $alert.username}),
    'title': '<a href="' . link('posts', $content) . '" class="fauxBlockLink-blockLink">' . $content.Thread.title . '</a>'
}) }}

Then you'd just want to find the other...
Not without some form of custom development.

If the prefixes were styled it would likely work better as they wouldn't appear to be part of the thread title.
 
Couldn't you just edit the templates for the alerts? For example, I think you can edit the alert_post_quote template to change this:

HTML:
{{ phrase('x_quoted_your_post_in_thread_y', {
    'name': username_link($user, false, {'defaultname': $alert.username}),
    'title': '<a href="' . link('posts', $content) . '" class="fauxBlockLink-blockLink">' . prefix('thread', $content.Thread) . $content.Thread.title . '</a>'
}) }}

...to this:

HTML:
{{ phrase('x_quoted_your_post_in_thread_y', {
    'name': username_link($user, false, {'defaultname': $alert.username}),
    'title': '<a href="' . link('posts', $content) . '" class="fauxBlockLink-blockLink">' . $content.Thread.title . '</a>'
}) }}

Then you'd just want to find the other alert templates and remove the prefix part from those too, assuming there are others that need changed. At least I assume that would work, but @Paul B could probably confirm if that's right or not.
 
Solution
Couldn't you just edit the templates for the alerts? For example, I think you can edit the alert_post_quote template to change this:

HTML:
{{ phrase('x_quoted_your_post_in_thread_y', {
    'name': username_link($user, false, {'defaultname': $alert.username}),
    'title': '<a href="' . link('posts', $content) . '" class="fauxBlockLink-blockLink">' . prefix('thread', $content.Thread) . $content.Thread.title . '</a>'
}) }}

...to this:

HTML:
{{ phrase('x_quoted_your_post_in_thread_y', {
    'name': username_link($user, false, {'defaultname': $alert.username}),
    'title': '<a href="' . link('posts', $content) . '" class="fauxBlockLink-blockLink">' . $content.Thread.title . '</a>'
}) }}

Then you'd just want to find the other alert templates and remove the prefix part from those too, assuming there are others that need changed. At least I assume that would work, but @Paul B could probably confirm if that's right or not.
Seems to work great so.. my sincerest thanks to you, good sir!
 
Back
Top Bottom