1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Implementing a Custom Tag Handler

Discussion in 'XenForo Development Discussions' started by Teapot, Jul 19, 2015.

  1. Teapot

    Teapot Well-Known Member

    Hi all! I've spent the last evening trying to implement content tags in a custom gallery add-on, and I'm having trouble connecting a few of the dots.

    I've added the relevant template and JS, implemented a MEDIUMBLOB 'tags' column in my add-on's custom table and datawriter, and implemented a TagHandler class (and added it to the content cache), but I still can't seem to make tagging trigger in any way - submitting the form doesn't actually add them to the database. Specifically, I'm not sure how to instruct the tags system that my content is being tagged and to update the records accordingly.

    Would someone who's done it be so kind as to list the rough steps I need to go through to get this all sorted? I've been told it's a very simple process, and nearly all other handlers are, so I think I'm just missing a small piece of the puzzle.

    Thanks for reading! :)
  2. Chris D

    Chris D XenForo Developer Staff Member

    Without seeing the entirety of your code (that wasn't an invitation :p) it's impossible to tell you what you have missed.

    In actual fact, you're in the best position to work out what you've missed because you have your own code, which it sounds like you've partially implemented correctly, and you have the XF 1.5 code which is fully implemented correctly for Threads. You've obviously missed something, you just need to spend a bit more time looking at specifically what that might be. Focus on the XF code, specifically the processes that happen when creating and inserting a thread in a forum.

Share This Page