![]() |
How do I update a custom thread field on editpost?
Hi.
I created a custom field, i'll call it, Field1, that a user fills out when creating a new thread. Now i've written some plugin code so that when the new thread is created, the field1 options (option1,2,3,etc;) are sucessfully posted to the db (along with everything else). However, i'm having trouble understanding the rest. On editpost, I can populate the field with the current selection, but I cannot update the field (one because there's nothing handling it). I'm pretty much stuck here! So to avoid further insanity, how would I go about finishing this up? Thanks for any help. :edit: The fields have nothing to do with the fields one can create via the AdminCP. |
I know you posted this a while ago, but did you find a solution after all? I'm trying to figure this out as well... I have custom fields when creating threads, but what's the use when you can't edit them right?
I didn't get as far as you did though, could you explain (or post the code) you used to populate the fields again when editing the threads? |
Add a plugin to editpost_update_complete hook and paste these codes:
PHP Code:
|
Thanks! I've got it working right now, I needed to add some quotes around the variable but that was all.
So, now I can edit the custom post fields, but they aren't automatically filled with the 'old' content yet, which had been set when creating the thread, I know how the template part works, just need the php/mysql to do it... |
Hmmm...
This will give you what you need. Add to editpost_start. PHP Code:
|
Thanks again, it works like a dream now ;), is there anything I can do for you in return??
|
Just thanking is enough. :)
|
All times are GMT. The time now is 09:14 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|