[RFC|Accepted] Simple message API

Note: We are moving the topics of this forum and it will be deleted at some point

Publish your own request for comments/change or patches for the next version of phpBB. Discuss the contributions and proposals of others. Upcoming releases are 3.2/Rhea and 3.3.
User avatar
igorw
Registered User
Posts: 500
Joined: Thu Jan 04, 2007 11:47 pm

Re: [RFC] Simple message API

Post by igorw » Sat Jul 10, 2010 1:13 am

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?

User avatar
nickvergessen
Former Team Member
Posts: 733
Joined: Sun Oct 07, 2007 11:54 am
Location: Stuttgart, Germany
Contact:

Re: [RFC] Simple message API

Post by nickvergessen » Sat Jul 10, 2010 8:07 am

eviL3 wrote:Additionally, should the BBCode source be stored in the DB too, as in the formatted_text implementation?
I'd say it should also be possible without storing ;)
Member of the Development-TeamNo Support via PM

User avatar
naderman
Product Manager
Product Manager
Posts: 1727
Joined: Sun Jan 11, 2004 2:11 am
Location: Karlsruhe, Germany
Contact:

Re: [RFC] Simple message API

Post by naderman » Sun Jul 18, 2010 2:12 pm

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?
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.

Post Reply