The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Add a custom checkbox for threadposting?
Hello everyone,
In terms of php I know how to do this, but in terms of vB i'm clueless. What I'm trying to do is add a checkbox to the post thread page and if checked it will invoke a different template for that thread. My guess is I would have to hard code the checkbox, then add a new field for each thread mysql entry that specifies whether the checkbox was checked or not. Via php that is very easy, but how would I do this using vbulletin? I've never edited vbulletin's php files nor the mysql db. Is there an easier way to do this? |
#2
|
||||
|
||||
To add the checkbox, modify the newthread template. You'll likely need to use a hook called newthread_post_complete to execute a query to mark the DB field. (See inside newthread.php.)
|
#3
|
|||
|
|||
Hey, thanks for replying.
I looked through the file and my guess is build_new_post is what actually does the mysql insertion. I added two checkboxes to the template and the two columns to the table. So how would I go about adding those two boolean values to the table? |
#4
|
||||
|
||||
Again - the easiest way to approach this is by using a plugin at newthread_post_complete.
|
#5
|
|||
|
|||
<a href="https://vborg.vbsupport.ru/showthread.php?t=114249&highlight=thread" target="_blank">https://vborg.vbsupport.ru/showt...ghlight=thread</a>
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|