The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Thread Field Editing (editpost.php)
Hello!
I created a new field to the thread table which is called thread_challenge. I've added a radio button select on newthread, and the poster of the thread can select either the thread is considered a challenge or not (i've accomplished this using the article given in the articles section). My problem is with editpost: when someone edits the thread, even if he changes the selection of the radio button, the value doesn't change in the DB. Important to mention: the value is stored in the DB as 1=true (thread is a challenge), 0 = false (thread in not a challenge) I'll show you my plugins: editpost_start PHP Code:
PHP Code:
PHP Code:
Quote:
Cool! I fixed the entire problem with adding in the vB_DataManager_Thread class the following function: PHP Code:
PHP Code:
|
#2
|
||||
|
||||
You can't just set any fields through the datamanager, you need to add them to the validfields array, like the error says.
|
#3
|
|||
|
|||
Quote:
|
#4
|
||||
|
||||
Just add it into the array when you create the datamanager object.
|
#5
|
|||
|
|||
Can you please explain to me how to do that?
because i thought i did it when i added PHP Code:
|
#6
|
||||
|
||||
Append the data to the array....
PHP Code:
|
#7
|
|||
|
|||
cool thanks! i didn't know i can do that.
what else? can you give me a better way to create the function verify_thread_challenge() instead of editing the code itself? |
#8
|
||||
|
||||
Put the function into a hook. I'm not sure which hook exactly, but you will need to use one before that function is needed.
|
#9
|
||||
|
||||
<a href="https://vborg.vbsupport.ru/showthread.php?p=1323442#post1323442" target="_blank">https://vborg.vbsupport.ru/showt...42#post1323442</a>
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|