Dannymh
Active member
Hi,
I am looking for a way to change the user in the quoted text on the fly. I am currently doing this for the "postbit" changing the username by extending the entity to my existing table, if the postId is in the new table, it changes the username to the stored username.
I am now looking to move that onto the quoted text, so when someone multi-quotes or quote replies, it should check if the post exists in my table and change the quoted username on the fly.
It appears to me that this needs to be done by extending XF/ControllerPlugin/Quote.php, it appears that the username is currently coming from Entity $content
I can on the fly add a new value in here but can't override the existing value as its protected. I thought this would be the easiest way since the content of the username in the quote is static text and isn't called each time the post/thread is loaded.
Is it worth me continuing trying to modify these parts or would it simply be easier to do the replacement of that post saving the thread?
Or is it better that I extend that entity to join to my table?
I am looking for a way to change the user in the quoted text on the fly. I am currently doing this for the "postbit" changing the username by extending the entity to my existing table, if the postId is in the new table, it changes the username to the stored username.
I am now looking to move that onto the quoted text, so when someone multi-quotes or quote replies, it should check if the post exists in my table and change the quoted username on the fly.
It appears to me that this needs to be done by extending XF/ControllerPlugin/Quote.php, it appears that the username is currently coming from Entity $content
I can on the fly add a new value in here but can't override the existing value as its protected. I thought this would be the easiest way since the content of the username in the quote is static text and isn't called each time the post/thread is loaded.
Is it worth me continuing trying to modify these parts or would it simply be easier to do the replacement of that post saving the thread?
Or is it better that I extend that entity to join to my table?