MyBB Hacks

Full Version: change the value after posting
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
hay,
i added new input to new thread called "username", which users can put there username of one of the forum members and tell him that this thread is about him.
i built all but i have one problem. if the user changes username so it wont saved. i want that after posting the thread, the value of the input username will changed to the uid of the member. how to do that? and where? i can do that but i dont know where to do that. which file and which line.
Unfortunately there's not really a nice way to do this without writing your own code.
Ideally, you'd store the user ID into the field, but then there's the issue of translating this to/from the username.
You could theoretically do something with the input formatter, custom input validation and display format if you wrote a custom plugin...
doesn't matter.. i wrote my own code in newthread.php and built it.
Reference URL's