Multi Prefix

Multi Prefix [Paid] 2.11.2

No permission to buy ($30.00)

Iggy

Well-known member
hmm i just had another look at this since its been a while and we just did a bunch of upgrading....

i remember it being an issue with a similar threads addon....for us...andys i believe it was, we switched to one of the others so maybe that is what changed it idk...

i can confirm at least there are no template mods not applying with our custom style....latest xf....100+addons...fwiw
 

Xon

Well-known member
Would be possible to have a setting that puts prefixes on their own row? For example top row pushing title below prefixes. If you are using many prefixes which this addon is for, title is pushed far right and depending on how many prefixes and/or title length it can look really weird.
Hi,

Can you open a ticket on my site to finalise the scope and discuss a estimate & quote?
 

MR X

Member
It doesn't had multiple prefixes to AMS, but the AMS discussion threads will correctly work with multiple prefixes.
That's because the discussion thread is just the default XF thread :D But dang, could I possibly hire you to make multi-prefix work with ams article thread when we get around to buying this addon?
 

Xon

Well-known member
That's because the discussion thread is just the default XF thread :D But dang, could I possibly hire you to make multi-prefix work with ams article thread when we get around to buying this addon?
Sure, open a ticket on my site and I can quote you a rate and vague time estimate.
 

Moshe1010

Well-known member
Hi @Xon,

The styling of the prefixes via selection looks different than the prefixes in a thread view. Is that intentional?

1667646503693.png


Looks like removing this padding in CSS solves it:

Code:
ul[id^=select2-js-SVMultiPrefixUniqueId][id$=-results] ul.select2-results__options--nested li.select2-results__option > span {
    padding: 0;
}
 

Xon

Well-known member
Getting consistant styling of prefixes in the selection dialog is an ongoing paid. Part of the issue is when it is in opt-groups and should be logically grouped together
 

bob2bob

Member
is there a way to have the multi prefixes send not just an array of prefix_id's when requesting threads via the API but also include the title of the prefix?

in reference to this:

this JSON is added to the return JSON when requesting a specific thread from XF API:

Code:
"sv_prefix_ids" : [
14,
155
],

Ideally, we would also get the prefix names, or be able to fetch all the prefix_ids that we have setup so that we can map those prefix_ids to their respective titles and don't have to hardcode that into the mobile app that we are building with the API. The challenge with hardcoding is that we do not want to have to update the mobile app every time we make a change to the prefixes.

Is there a way to do this?
 

Xon

Well-known member
You'll have the same problem with the standard prefix system and threads. You can probably add an endpoint to export all the prefixes easily enough, but I haven't really looked into the XF API very much.
 

bob2bob

Member
You'll have the same problem with the standard prefix system and threads. You can probably add an endpoint to export all the prefixes easily enough, but I haven't really looked into the XF API very much.
the standard prefix API returns the singular prefix title.

is that suggested solution mean a new add-on that updates API and adds that endpoint?
 

Moshe1010

Well-known member
Hi @Xon,

Is there a way to move the thread prefix selection bar to be at the same level (alinged) as the thread title? Basically thread prefix is usually one or two words, so

1672333039184.png

Ideally making it to look like XF core prefix in terms of the position:

1672333118237.png


Thanks
 

Russ

Well-known member
Hey Xon, is there a method to manually check if a thread has a prefix? I know the conditional:

<xf:if is="{$thread.prefix_id} == #">

But we're trying to get a little fancy with the prefix approach and create custom links for each prefix. We'd want something like this:

Code:
                    <xf:if is="{$thread.prefix_id} == 128">
                        <a href="{{ link('search-forums', {'node_id': #}) }}" class="labelLink" rel="nofollow">{{ prefix('thread', $thread) }}</a>
                        </xf:if>
<xf:if is="{$thread.prefix_id} == 129" />
                        <a href="{{ link('search-forums', {'node_id': #}) }}" class="labelLink" rel="nofollow">{{ prefix('thread', $thread) }}</a>
</xf:if>

But it still seems to only check for the primary prefix and not if there are additional prefix's.

Basically we're creating search forums for the prefix's so we can look for that prefix in ANY forum. I hope that makes sense...


EDIT: I see $thread.sv_prefix_ids outputs them, I guess the question would be what sort of conditional would work to check "if prefix ID is listed in $thread.sv_prefix_ids"
 
Last edited:

Xon

Well-known member
EDIT: I see $thread.sv_prefix_ids outputs them, I guess the question would be what sort of conditional would work to check "if prefix ID is listed in $thread.sv_prefix_ids"
Try:
XML:
<xf:if is="in_array(128, $thread.sv_prefix_ids)">
 

Sirmadsen

Active member
Not sure if this have been discussed, fixed or reported yet but, when applying multiple prefixes to a resource only the link to the first prefix works, all other prefixes links to the first prefix.
 
Top