While looking through the formatted_text class it occured to me that it does not use a bbcode_uid, nor a bbcode_bitfield. Should I re-use this approach for my implementation? I'm not very familiar with the inner workings of the BBCode parser.
EDIT: Additionally, should the BBCode source be stored in the DB too, as in the formatted_text implementation?
[RFC|Accepted] Simple message API
- nickvergessen
- Former Team Member
- Posts: 733
- Joined: Sun Oct 07, 2007 11:54 am
- Location: Stuttgart, Germany
- Contact:
Re: [RFC] Simple message API
I'd say it should also be possible without storingeviL3 wrote:Additionally, should the BBCode source be stored in the DB too, as in the formatted_text implementation?
Member of the Development-Team — No Support via PM
Re: [RFC] Simple message API
Yes & Yes, ideally the bbcode parser should store only additional meta data in the second column with the actual content taken from the column storing the original entirely unmodified content. This approach allows easy reparsing of posts (clear the metadata column and regenerate on read when it's empty), and makes sure that the content the user writes is never touched but is shown to him exactly the same way when he edits a post.eviL3 wrote:While looking through the formatted_text class it occured to me that it does not use a bbcode_uid, nor a bbcode_bitfield. Should I re-use this approach for my implementation? I'm not very familiar with the inner workings of the BBCode parser.
EDIT: Additionally, should the BBCode source be stored in the DB too, as in the formatted_text implementation?