Oyabun1 wrote:Depending on the board or what is being discussed the date of the post quoted may be just as important as who made the original post.
Sure, but in that case the actual date is only one click away.
Nicofuma wrote:Actually I like how it is handled by IPB. So for me it would be: icon to link to the post, date, author with link to the profile
Off course all of the m should be optional
Here's what I can do, but this is all going to be
pretty complicated. First, I would update posting.php to add all the relevant metadata to the quote tag that is created when the "Quote" button is pressed:
Code: Select all
[quote="Username" post_id="123" post_time="1234567890" user_id="4567"]...[/quote]
If this seems too long, I'd like to point out that the following is every bit as valid from the parser's standpoint:
Code: Select all
[quote=Username post_id=123 post_time=1234567890 user_id=4567]...[/quote]
Here's the current proSilver template fragment for quotes, from bbcode.html:
Code: Select all
<!-- BEGIN quote_username_open -->
<blockquote><div><cite>{USERNAME} {L_WROTE}{L_COLON}</cite>
<!-- END quote_username_open -->
I can replace it with this:
Code: Select all
<!-- BEGIN quote_username_open -->
<blockquote><div><cite>{DATE}{USERNAME} {L_WROTE}{L_COLON}</cite>{POST_LINK}
<!-- END quote_username_open -->
I can have
{DATE}
be a language string built at runtime via
$user->lang('ON_QUOTE_DATE', $post_time)
where ON_QUOTE_DATE could be
'On %s, '.
I can have
{POST_LINK}
represent another, new template fragment that could look like this:
Code: Select all
<!-- BEGIN quote_post_link -->
<a href="{U_VIEWPOST}"><img src="???" /></a>
<!-- END quote_post_link -->
{U_VIEWPOST}
could be generated at runtime using the quote's post_id. I don't know how images/assets are handled so I need some guidance there, preferably in the form of a working code snippet.
The interactions between all of those elements would be pretty complicated as well. Here's how I see it working:
- If the quote has a URL, the {USERNAME} part links to it. This is the current behaviour.
- If the quote doesn't have a URL and it is a
user_id
, then we generate a URL to the profile and use it as described above.
- If the quote has a
post_time
, we generate a translated string for {DATE}
. Otherwise, it's empty.
- If the quote has a
post_id
, we generate a link for {POST_LINK}
. Otherwise, it's empty.
Since
{DATE}
and
{POST_LINK}
are only used in the
quote_username_open
fragment, a quote that doesn't have an author doesn't get a link or a date.
I'd like to add that it took me nearly 45 minutes just to describe how it would work. That's how complicated this is and how quickly it can get out of hand.