Implemented Custom Thread Fields

vbresults

Well-known member
I have received a number of requests from clients to create a custom thread field modification. Much like custom profile fields are useful, custom thread fields would be a fantastic feature. Why? Modifications can use thread-specific data without having to add to or alter the database tables, and this cuts down on a lot of potential headaches. Threads do not just have to be threads any more, they can be whatever you can code them into. Also, things like thread tags and prefixes could be modularized into this single unit.
 
Upvote 34
This suggestion has been implemented. Votes are no longer accepted.
I really don't like comparing to other software, but wouldn't that make normal threads almost as powerful as IP.Content? (sorta)

If so, isn't that a lot to put into the stock code?


I *really* like this idea though
 
... So, If you move a thread from forum X which contains P, Q, R custom fields, to the forum Y which contains P, Q, S custom fields... the R field would get truncated, and S would be filled with it's default value (if it has one defined)....

You might want to retain old custom field values, not delete them, just in case you accidentally move the wrong thread to correct forum, or move the correct thread to the wrong forum, and oops, you want to undo the move, but now you've lost some custom field values. Is it doable? Sure, never said it wasn't, but dealing with custom thread fields is not as simple as custom profile fields. Another thing besides preservation to consider is inheritance: all forums, one forum, one forum and its sub-forums. If the devs want to add custom thread fields, then great. If not, they can get hacked in using hooks/plugins or, gasp, file edits. ;)
 
You might want to retain old custom field values, not delete them, just in case you accidentally move the wrong thread to correct forum, or move the correct thread to the wrong forum, and oops, you want to undo the move, but now you've lost some custom field values. Is it doable? Sure, never said it wasn't, but dealing with custom thread fields is not as simple as custom profile fields. Another thing besides preservation to consider is inheritance: all forums, one forum, one forum and its sub-forums. If the devs want to add custom thread fields, then great. If not, they can get hacked in using hooks/plugins or, gasp, file edits. ;)

That sounds surprisingly like the voice of experience with such things ;).

This thread does sound strikingly like a simplified version of GARS though. I say simplified as there has been no mention yet of custom templates and modules to go WITH the custom fields. That IS the next logical step though as once you have custom fields you probably want to be controlling the layout of those custom fields.
 
Love this suggestion. :) I think Ceri May's suggestion of serializing the data and putting it in an extra database column is probably the best. That way, when you move a thread from one forum to another, the thread could still retain it's custom fields, even if those don't exist in the forum it was moved to (an admin/mod could clean the fields up if they wanted to remain consistent).

This isn't something I would want/need to see in the first release, but really cool idea for the future. :D
 
I for one would love to see the ability to add extra fields to threads/posts. There are a lot of instances where Title|Message are just not enough. Example, when you have a section of your forums dedicated to classifieds. It would be nice to have a field for price. Of course, making these searchable would be a huge plus.
 
I totally 100% support this. EVERY website will have one or two forums that can make use of this feature. I use the extra thread fields hack and some template edits to bring some more bespoke functionality to some forum areas.

I cant image being able to switch software without this feature, or at least a plugin. However, no forum software does this out of the box even though every website can (should?) be using it to tailor forum areas more to the purpose they are intended. Many plugins exist to achieve this on other software but nothing exists as yet (that I have seen) that acheives this in an uncomplicated way.... if it could be added, and with XF pazzaz then I think the big boards will love you (like they aint gonna anyway)
 
I really hope this makes it in. With this feature right outta the box it would be awesomely powerful :)
 
http://xenforo.com/community/thread...46/page-2#post-15444
http://xenforo.com/community/threads/status-update.232/#post-2336

I have been pushing this for more then 5 years to get it into vBulletin. There must be some technical reasons why no forum package offers this? The benefits seem so obvious? vBulletin Staff is also supportive of this, so maybe one day we will see it in vBulletin. I hope xenForo can be the first to actually offer it to it's customers. I would love to hear the vision of Mike&Kier about this functionality.
me too, bro!

I think my vision is a little different, so I'm going to make a visual and fork it, I think. It will probably work for you, too.
 
I'm not quite sure I understand what the purpose of this would be. Would it be like, in a car sale forum, adding a place for a price to show up on forumdisplay?

Not sure if that forum is public accessible, so here's the example quoted:

----
I believe this Custom Thread Field System - idea of Wayne is a brilliant concept. I said : 'Combining those custom thread fields with conditionals and you are in heaven....'.

Here's a little example: I use the code of Jake (Bunce) published in Thread Title Fonts to give certain threads-titles (advertisements) a specified colour.

This is the condition that's used:

-------------
<if condition="$thread[threadid] == X">style="font-size: 12pt;"</if>

(Where X is the threadid of the thread.)
-------------

The thing is that I have to manually edit my template everytime I want a new or another thread to have a different colour. Because I have to specify the 'X'/threadID-value everytime.

What would happen if I had the option to use Custom Thread Fields?

Imagine you could setup a Multiple Selection Menu-field for threads. Like this :

-------------
Fieldname: Label
Values : Sticky, Advertisement, Publication, Meeting.
-------------

Now, if I choose 'Advertisement' for those advertisement-threads, I can use the following conditional (I pressume? I know almost nothing about conditionals and stuff) :

-------------
<if condition="$custom_thread_field[1] == Advertisement">style="font-size: 12pt;"</if>
-------------

I don't have to pay attention to the threadID anymore. Advertisement-threads are styled automatically, I don't have to manually edit a template everytime I add an advertisement to my forums!

Just an example. I know I don't have to explain the benefits of conditionals to you
smile.png
but this idea of Custom Thread Fields get's me very enthousiastic. This concept would make the use and management of our forums so much more flexible.

----


To be clear: in this example I would like the Custom Thread Field 'Label' not to be visible by regular users obviously. I only want it to be visible by the admin, so he/she can set the value to 'Advertisement' for specific threads so he/she never get's bothered anymore by having to manually edit templates just to give specific threads some title-colouring and at the same time regular users are not bothered with none-needed clutter in their interface (for example: displaying the custom fields inside the thread list).
 
Top Bottom