![]() |
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? |
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.)
|
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? |
Again - the easiest way to approach this is by using a plugin at newthread_post_complete.
|
<a href="https://vborg.vbsupport.ru/showthread.php?t=114249&highlight=thread" target="_blank">https://vborg.vbsupport.ru/showt...ghlight=thread</a>
|
All times are GMT. The time now is 05:05 PM. |
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:
|