Skip to main content
Topic: Add options and remove smileys_enabled from messages table (Read 1671 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Add options and remove smileys_enabled from messages table

We should add an options field to the messages table (varchar(255)). It would be a serialized array (PHP or JSON serializer) of options.

Then move the smileys_enabled option to that field by flipping it to smileys_disabled so nearly all messages won't have anything for it. This gives the option to add more options like disable_bbc, parse_markdown, parse_html, template=important_msg_template or whatever you want to do with it. This makes it much easier for plugins as well. The field could be changed to text if we think it is going to be used more often. It would only be used when the body of the message is being displayed and should only be changed via the post/edit action. Maybe name it body_options to make it more clear.

Re: Add options and remove smileys_enabled from messages table

Reply #1

I think in 1.1 we only support mysql > 5.0.5xx so I think varchar can go up to 65,535 if you needed it to ... so there should be no need to use text, a varchar(1024) should work and provide lots of potential space without having to use a BLOB type.  That said I have no idea what postgre will support, but I guess we could use varchar for one and text of the other?

I'd also like to see us get away from serialize and just use json, just seems to have fewer issues all around.

Yeah moving that smiley field so something that can be extended is a good idea!




Re: Add options and remove smileys_enabled from messages table

Reply #2

I'm not sure it matters since the body is already a text field. Either way, that's something we can test at some point.

I'll track this in a minute.