XenForo
Administrative
- Thread starter
- Admin
- #1
As part of an addon that I'm building, I would need to change the owner/author of every post (to some set defined user_id) whenever a new one is made and this should be applicable to only a specific forum (the forum_id will be taken from the ACP as part of addon's option). My solution to this is as follows:
1. Create a new
2. Use a hint of
3. In the static method, get the
Read more
ادامه مطلب...
1. Create a new
entity_pre_save
code event listener2. Use a hint of
XF\Entity\Post
to restrict it to only posts3. In the static method, get the
forum_id
from the...Read more
ادامه مطلب...