(04-01-2011 08:04 PM)jim7777 Wrote: [ -> ]hmm my suggestion somewhat relates to ModNotice because its really like what ModNotice will do, but inlined to XThread fields the only thing that is special is that it will get what is the username of the user who added that message and ofc, that message isn't editable by anyone except the admins and the one who edit that field. Other users in the usergroup who can edit the same field will not overwrite what the recent user posted but the new user who posted will just add his own message to the list..
this is somewhat related to uhmm, replying/commenting the specific post but not to the thread itself
Okay, I took a look at the plugin. The thing works because it's a completely different edit page (and effectively duplicates the "Last edited by" function). XThreads integrates thread fields into the standard edit page so it doesn't make sense to do it in XThreads (and thus, cannot be done).
If you don't require a freeform field, you could use moderation tools to get moderators to set the field to a certain value (including their username).
Otherwise, if you really want to, you could set up a special "last edited by" field, only editable by moderators, and hide it on the edit/newthread page (using a <input type="hidden"> field instead). This will "work" but be aware that info can be forged (but if you trust your moderators, they won't do this).
(04-02-2011 07:36 AM)RateU Wrote: [ -> ]Right now, I have more than 150 (I think - forgot the exact number) custom thread fields in the demo forum. Gladly, I don't have any problem at all. Sometimes I'm thinking about how many custom thread fields can be hold by MySQL? Or, what factors influencing the number custom thread fields can be created?
XThreads itself doesn't put any hard limits, but as you've realised, you could overflow the MySQL row length (which is about 64KB I believe), and the fact that all threadfields are stored in cache which gets loaded on every MyBB page load (so consumes more memory). There may also be a slight slowdown as XThreads goes through filtering out thread fields that do not apply to the current forum, but I wouldn't consider this much of an issue.
For table row, XThreads will use:
- varchar(255) for option button and non-multivalued select inputs
- native data type if specified (eg int/float)
- varchar(1024) for other inputs with filtering enabled
- text for anything else
So clearly, the filtered textual fields will consume the most space. So your primarily limit will probably be how many fields can be filtered on, though this can be increased if you either specify a non-textual datatype, or it's a option button/select input.
As for memory, 20 fields here use about 14.16KB according to what MyBB says about the datacache. As this is serialised content, it probably consumes more in practice. If we assume 1 field consumes 1KB in cache, then 150 will consume around 150KB, assuming only one instance of it is put in memory. I'd say that's probably not a huge amount, especially considering the amount of code MyBB loads, though I'd probably say it's significant. Maybe I'll have a think about whether that can be optimised a bit.