The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Add checkbox
I need add checkbox in newthread, newreply, editpost. If checkbox checked in new cell of table "post" adding value "1", unchecked - value "0".
So, how i may did that? |
#2
|
||||
|
||||
I'll try explain...
Im little rewrite news module (vbadvanced), for last posts: PHP Code:
The case for small, add checkbox in posting form, where you can choose send message on main page or not (check or uncheck checkbox). So, how did this? Checkbox in template: HTML Code:
<label for="cb_rel_yn"><input type="checkbox" name="rel_yn" value="1" id="cb_rel_yn" tabindex="1" $checked[rel_yn] />Send this message on main page?</label> Pls help. |
#3
|
||||
|
||||
I think you've done what you need to do, but you didn't say if you already added the column rel_lyn to your database. What is the result of what you have done so far?
|
#4
|
||||
|
||||
I already added column rel_lyn, i want make work this checkbox.
It worked just on unchecked selection, in column add value 0 just in new post. But if you check it, rel_lyn column will be rewrited in all post as value 1... |
#5
|
||||
|
||||
bump
|
#6
|
||||
|
||||
So, it is set to "0" unless someone checks the box, in which case it is set to "1". That is what you want, right? But, instead, what is happening?
|
#7
|
||||
|
||||
Instead that, when you check the box, rewrited all values in column rel_yn...
|
#8
|
||||
|
||||
What does your write/update statement look like? It sounds like your script is written incorrect if it is changing every column instead of just the column for that post.
|
#9
|
||||
|
||||
I attach plugins in second post, how i did this.
Changing just one column, rel_yn. So, if you leave box not checked - rel_yn vill be changed on 0, in the new post, if you check the box - rel_yn will be changed in all post. |
#10
|
||||
|
||||
You need a where statement in here:
PHP Code:
PHP Code:
PHP Code:
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|