Multi Prefix

Multi Prefix [Paid] 2.15.4

No permission to buy ($30.00)
That feature was surprisingly annoying to implement for threads.

It would be towards the end of the month before I have the bandwidth to look into that feature in any more detail
 
Prefixes not working for me in RM Add Resource together with AV prefix essentials last version.
Deactivation does not work also. I have uninstalled the prefix essentials for now.
 
Hey Xon,

One of our moderators just pointed me to a very small visualisation bug regarding html encoding (on our end it was &, did not test with other wellknown entities).

Configured prefix title in the admincp = correct ("a & b"), also the visualisation in the forumview/threadview are all fine.

But when creating a new thread (both inline and dedicated), it shows in the prefix choice dropdown: "a & b".
 
It should, as the code which generates the prefix text in the email is updated to generate multiple prefixes
 
When clicking on one of the prefixes in the resource title, why it treats them all as one and cannot be clicked individually? It always takes the first when clicking for sorting, doesn't allow me to click on second alone or third

1731158279478.webp
 
hey @Xon, we found a strange bug.

we use your add-on and when we try and make a new thread via the API (using a POST to /threads/) to a forum that requires a prefix_id the multi-prefix add-on is taking out the prefix_id:Int that we send in the body and then we are getting the error:

Untitled.webp

when we tested this after disabling the multi-prefix add on, everything worked as expected and we were able to see the prefix in the web app.
 

Attachments

  • Untitled.webp
    Untitled.webp
    24.7 KB · Views: 10
This add-on hasn't been really tested against XF's API due to a lack of demand, I thought it would handle it better than that.
 
It should have accepted prefix_id: int. But with mutliprefix installed you can just pass an array of int's for prefix_id and that should work.
 
@Xon
Template modification svMultiPrefix_thread_view produces uncompilable template code like

Code:
<xf:if is="$specialH1">
    <xf:h1><xf:if is="$svMultiPrefixSubtitle == ''">{$specialH1}</xf:h1>
<xf:else />
    <xf:h1>{{ prefix('thread', $thread) }}</xf:if>{$thread.title}<xf:if is="$svMultiPrefixSubtitle === 'suffix'">{$specialH1}</xf:h1>
<xf:else />
    <xf:h1>{{ prefix('thread', $thread) }}</xf:if></xf:h1>
</xf:if>

if template thread_view has h1 like

Code:
<xf:if is="$specialH1">
    <xf:h1>{$specialH1}</xf:h1>
<xf:else />
    <xf:h1>{{ prefix('thread', $thread) }}{$thread.title}</xf:h1>
</xf:if>

before the modification is applied.

Can this be fixed?
 
Last edited:
Can you try adjusting the template code to the following and see if it still fails?
Code:
 <xf:h1>{{ $specialH1 ? $specialH1 : prefix('thread', $thread) }}</xf:if></xf:h1>

This is something of a mess, so I might need to make the regex'es more specific so it cleanly fails rather than hits an error condition.
 
Code:
 <xf:h1>{{ $specialH1 ? $specialH1 : prefix('thread', $thread) }}</xf:if></xf:h1>
This doesn't compile (due to the </xf:if>).

If I change the template to
Code:
<xf:h1>{{ $specialH1 ? $specialH1 : prefix('thread', $thread) . $thread.title }}</xf:h1>
the template modification can be saved without error but doesn't get applied.

Ideally I think the code should be smth. like

Code:
<xf:if is="$specialH1">
    <xf:h1>{$specialH1}</xf:h1>
<xf:else />
    <xf:h1><xf:if is="$svMultiPrefixSubtitle == ''">{{ prefix('thread', $thread) }}</xf:if>{$thread.title}<xf:if is="$svMultiPrefixSubtitle === 'suffix'">{{ prefix('thread', $thread) }}</xf:if></xf:h1>
</xf:else>

after your modification is applied.
 
Back
Top Bottom