MyBB Community Forums

Full Version: Adding custom field for new threads
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi everyone,

I am using ProPortal and I want to show news at the portal site, which shall be created from specific (existing) threads all over the forum. So I wanted to add a 3rd moderator option (checkbox) which let you mark a thread as "news thread". As a result of this checkbox the value shall be written into a new (custom) field into mybb_threads, which shall be read out in another php-file (which is not a problem).
I already added the additional checkbox, but I don't know where the database action is performed (I'm searching for the php-file to include my database-field to the UPDATE-query).
The form-action is performed somewhere in "newthread.php", but I couldn't find out what function is ready doing the database update/insert.

Can someone show me, where to find the responsible SQL-query to add my checkbox?

Thank you! Shy

cya Igel
Hi, Igel

I am interested in doing the same thing as you are trying to achieve...
Certain threads included on other pages of you're website.
How are you handling the part where the checkbox is only visible to certain user groups?
hi zyra,

I added the checkbox with the rights management of the sticky-thread option. So at this time I just copied the code of the sticky-option. Setting this option independently is what I will do later, but if I can't get the saving to work, I won't need it..
So sorry that I can't help you at this time..

cya Igel
You can try this

https://freemybb.de/thread-107.html

(german speaking)