Thread Tagging Improvements

Thread Tagging Improvements 1.0.8 Patch Level 1

No permission to download
Fixes for the JS that handles auto-tagging while creating a new thread:
  • Don't rely on jQuery which has been removed in XF2.3
  • Add tags with Tagify which has replaced select2
Note: Can only be installed on XF2.3, not compatible with 2.2

New version with 2 fixes:
  • Cronjob compatibility with XF2.3 changes
  • Removed unused option and code that triggered page error when using "Tag contains" filter.
  • Correctly escape the SQL for thread tag lookups
  • If an SQL error occurs during Rebuild Job, log it and continue with the next one, instead of crashing/stopping
    • There is an option to disable these loggings under "Other", but we recommend keeping it on and reporting SQL errors raised to us :)
  • Build the URL paths a bit better so the potential pages don't try to reach non-existing pages
There was a bug where we queried the thread title with an ambiguous column name, which works fine as long as no other add-on does a JOIN with another table that has a similarly named column. (e.g. XFA Tournaments addon)

TL;DR; Fixed our add-on to explicitly query for xf_thread.title instead of title so SQL knows exactly which one we want.
  • Like
Reactions: collantphile
  • 2 new advanced options were added to allow change of:
    • Max amount of thread titles are loaded at once for processing
    • Chunk size when bulk inserting the collected (up to 50K) words

Attachments

  • Screenshot from 2023-01-06 13-32-06.webp
    Screenshot from 2023-01-06 13-32-06.webp
    17.3 KB · Views: 44
  • Don't call the tag-suggest endpoint if tagging is not allowed, should fix @Faust problem
  • Safer limits when collecting potential words, hopefully this fixes @vwts problem on the larger forum
    • Batch load 50k thread titles instead of 100K (doubt this is the problem)
    • Batch the bulk insert of potential words 5k at a time, before could do one bulk insert of 50K items.
Moves the Rebuilding of potential words job into postUpgrade() in case that is what makes the entity not behave correctly there...
  • Potential Tag Word data is now stored in a database table.
  • Sorting potential words now allow ordering by:
    • Use count
    • Word count & use count (i.e. multiple words showing first)
    • Alphabetical
  • "Loner tags": Tags that should not be tagged if a similar, longer tag is already matching.
    • This can be useful if you don't want short tags to be tagged alongside similar tags that are longer (more specific) and contain the same tag word, see the example below
Screenshot from 2023-01-03 15-47-12.webp
In this example, a thread title such as "What are common elvish names" would only be auto-tagged/suggested with the elvish names-tag...
If the elvish-tag was not a "loner"-tag, both elvish names & elvish would be added as tags to the thread.

Loner tags can be specified when editing the tag:
Screenshot from 2023-01-03 15-47-24.webp
  • The potential tags page now shows words that consist of multiple words
    • New option: Potential tags max word count, (default 3)
    • New option: Allow stop words in multi-worded potential tags (default false)
  • Options interface improvements
    • Tabbed interface to better group options
    • Button to save + rebuild potential words in sections where it will be needed
  • New advanced option: Regex used to split words
    • The default regex might not fit your language/needs, so it can be overridden if needed.
  • Allow adding a word as a synonym directly from the Potential tags page
  • New option: Improve matching for accented characters (default off)
    • If your forum has content that uses accented characters, this might be useful to turn on.
  • Allow swapping tag and synonym values when editing without it raising a warning.
  • Other minor tweaks to make the UI/UX better.
Screenshot from 2022-12-18 16-56-39.webp

Screenshot from 2022-12-18 16-52-55.png
Screenshot from 2022-12-18 16-54-42.png
Back
Top Bottom