ecwpa wrote:Pony99CA wrote:
- {user:xxx} links to the user with user name (and/or user ID?) xxx.
- {forum:xxx} links to the forum with forum ID xxx (displaying the forum's name in the link).
- {topic:xxx} links to the topic with topic ID xxx (displaying the topic's title in the link).
- {post:xxx} links to the post with post ID xxx (displaying the post's title in the link).
- {date:+/-something} adds the current date plus or minus the "something".
- {time:+/-something} adds the current time plus or minus the "something".
That looks interesting. But I was wondering if that's how it's going to be saved in the database? If not why using that format? In the case of @mentions it would be more practical to replace it with a tradicional url bbcode, no?
No, they would absolutely not be stored in the database that way; they're just shorthand, so they'd be replaced by other text. (Exception: In a BBCode definition, they would be stored like that in the HTML replacement part, but the instantiation of the BBCode would replace the shorthand.)
For example, in this post, if I typed:
the database would contain:
Code: Select all
[url=https://area51.phpbb.com/phpBB/memberlist.php?mode=viewprofile&u=21127]ecwpa[/url]
and the text would render like:
ecwpa.
As for why you wouldn't use BBCode syntax, one reason is the Exception noted above -- these are allowed as BBCode parameters -- and the other is that they may have other actions (mentioning a user triggers a notification, mentioning a topic could trigger a notification to subscribers, etc.) which BBCodes don't do.
Steve