Recent content by Komposten

  1. K

    XF 2.0 Can the uninstaller interact with e.g. entities before uninstalling the add-on?

    Since the add-on tutorial is all I've had to go on I've used a similar approach. xf_post has an additional boolean column called "komposten_anonymiser_anonymous", and then I have a separate table where I store the original user and the time of the user change (similar to the tutorial's...
  2. K

    XF 2.0 Listener for option changes

    Ah, if that's the standard then that's what I'll adhere to. Thank you both for your answers. :)
  3. K

    XF 2.0 Can the uninstaller interact with e.g. entities before uninstalling the add-on?

    But in that case I would have to override every template ever that uses the author of a post, wouldn't I? (E.g. actual posts in a thread, thread creator and latest poster in thread listings, recent poster in New Posts, latest poster in the forum list, etc.) (Sorry if I'm asking stupid...
  4. K

    XF 2.0 Listener for option changes

    The idea is that posting in specific forums/threads should automatically change the author of the post. In my case this is about anonymisation of posts, but it could also be used for other use cases. The new author is always the same, hence I added an option for it. When that option is changed...
  5. K

    XF 2.0 Bests way to change the author of a post

    I will definitely look into it. Sounds more clean than the mess I have. :) Which methods would you suggest I use/override in the controllers, setupThreadCreate() or similar? Since this user-change is automatic and should apply to all users that post in a given thread/forum, I assume that I would...
  6. K

    XF 2.0 Can the uninstaller interact with e.g. entities before uninstalling the add-on?

    The add-on changes the authors of posts in certain areas. I'm considering having it change back to the original authors when it's uninstalled, thus I would need to change values.
  7. K

    XF 2.0 Can the uninstaller interact with e.g. entities before uninstalling the add-on?

    But the schemamanager only allows altering of the schema, not changing actual values of fields in the database.
  8. K

    XF 2.0 Listener for option changes

    The option is a user name input. I want to know when it is changed so that I can make changes to existing entries in the database (potentially hundreds of entities).
  9. K

    XF 2.0 Can the uninstaller interact with e.g. entities before uninstalling the add-on?

    That's what I was thinking, but I wasn't sure how. Though I just realised that I should have access to XF\App and XF\Db in the uninstall step, so I guess I could use those to update the database/entities?
  10. K

    XF 2.0 Bests way to change the author of a post

    I've improved my code a bit since I posted this, and have managed to successfully update forums, threads, and users when I change the post authors. However, I'd still be interested in if I'm doing this right or not (i.e. the questions in the OP still stand).
  11. K

    XF 2.0 Can the uninstaller interact with e.g. entities before uninstalling the add-on?

    I need to make changes to some entities before the add-on is uninstalled. Can this be done from the Setup class, or should I add a "Reset"-option to the add-ons options and have users press that before uninstalling?
  12. K

    XF 2.0 Listener for option changes

    Hi! Is there a way to listen for changes to options? Currently I'm using a validation callback, but that feels like a hack since I'm making changes to the database/entities based on the change of the option (i.e. it's not validation stuff). Regards, Komposten
  13. K

    XF 2.0 Bests way to change the author of a post

    Hi, I'm working on an add-on that changes the author of posts posted in specific threads, but there are a couple of things I haven't managed to figure out entirely: Replying to a thread: Currently I'm using a code event listener for post_pre_save to edit replies before they are saved. This...
  14. K

    XF 2.0 Internal server error in "Manually featuring (or unfeaturing) threads" step in the tutorial

    I've been following the official XenForo 2.0 development tutorial to get the basics of how to make add-ons. However, I've run into a very unexpected problem on the "Manually featuring (or unfeaturing) threads" step: I can't test or save the new template modification. I've copied everything from...
Top Bottom