[RFC]Quote link to quoted message

These requests for comments/change have lead to an implemented feature that has been successfully merged into the 3.2/Rhea branch. Everything listed in this forum will be available in phpBB 3.2.
User avatar
JoshyPHP
Registered User
Posts: 348
Joined: Fri Jul 08, 2011 9:43 pm

Re: [RFC]Quote link to quoted message

Post by JoshyPHP » Wed May 20, 2015 10:51 pm

brunoais wrote:I think you are complicating it. It can more easily be like this:
How do you work that in bbcode.html? You don't have if-then constructs there, that's why it uses template fragments.

User avatar
brunoais
Registered User
Posts: 958
Joined: Fri Dec 18, 2009 3:55 pm

Re: [RFC]Quote link to quoted message

Post by brunoais » Thu May 21, 2015 7:04 am

You do have... but I believe they are never used. Do you parse it manually in TextFormatter or you use twig?

User avatar
JoshyPHP
Registered User
Posts: 348
Joined: Fri Jul 08, 2011 9:43 pm

Re: [RFC]Quote link to quoted message

Post by JoshyPHP » Thu May 21, 2015 7:25 am

The library supports if-then constructs just fine, they just are not available in bbcode.html. I'd love to replace bbcode.html but that's another matter.

User avatar
brunoais
Registered User
Posts: 958
Joined: Fri Dec 18, 2009 3:55 pm

Re: [RFC]Quote link to quoted message

Post by brunoais » Thu May 21, 2015 8:01 am

Why are they not available in bbcode.html? Where is the code that contains that meaning?
I can't find anything about that in the wiki.

User avatar
JoshyPHP
Registered User
Posts: 348
Joined: Fri Jul 08, 2011 9:43 pm

Re: [RFC]Quote link to quoted message

Post by JoshyPHP » Thu May 21, 2015 10:49 am

I don't know if there's any doc about bbcode.html but you can see how it's used in bbcode.php. Even though it looks like template file, it's not. And until the old BBCode routines are removed, it needs to be preserved.

New template fragments can be added to it though. What I'm currently considering is adding a new template fragment for new templates. A new template fragment wouldn't need to be backward compatible and therefore I could use XSL in it. At the same time, people would still be able to edit their bbcode.html file to style it differently. On the other hand, it means that styles with custom quotes would need to be updated for 3.2. I don't know if many styles use custom quotes.

User avatar
brunoais
Registered User
Posts: 958
Joined: Fri Dec 18, 2009 3:55 pm

Re: [RFC]Quote link to quoted message

Post by brunoais » Thu May 21, 2015 11:48 am

Oh... I c... I didn't check on that for some years so I forgot it.

User avatar
JoshyPHP
Registered User
Posts: 348
Joined: Fri Jul 08, 2011 9:43 pm

Re: [RFC]Quote link to quoted message

Post by JoshyPHP » Sun May 24, 2015 4:02 pm

As far as I'm concerned, the code is complete and assuming the tests pass on Travis it can be merged. Important notes:
  • The Pull Request depends on and contains commits from ticket/13847. (PR)
  • Backward compatibility proved to be too complicated so instead of modifying the original quote_username_open template fragment, it uses a new, separate template fragment named quote_extended which contains XSL for the logic.
  • The quote's date is unstyled, it just sits there. The link to the original post is represented by a Unicode arrow. I didn't realize is at the time but that's the same thing XenForo uses. Here's an updated album showing quotes in different forum software.
  • The post link contains a small bit of inline JavaScript that replaces its full URL with an anchor link if the post exists on the current page. If someone has a better solution, I'll gladly accept PRs against my repository.
Edit: one test fails on Travis's PHP 5.3 with the following error message. PHP 5.3 has been removed from my Linux distribution and the test passes on my local version (PHP 5.3.29-pl0-gentoo) so debugging it is especially challenging.
DateTime::setTimezone(): Can only do this for zones with ID for now

User avatar
Louis7777
Registered User
Posts: 378
Joined: Fri Apr 04, 2014 12:32 am

Re: [RFC]Quote link to quoted message

Post by Louis7777 » Sun May 24, 2015 4:13 pm

The date is just distracting. It would be better as a tooltip.

User avatar
JoshyPHP
Registered User
Posts: 348
Joined: Fri Jul 08, 2011 9:43 pm

Re: [RFC]Quote link to quoted message

Post by JoshyPHP » Sun May 24, 2015 4:24 pm

A tooltip on which element? cite maybe? I'd like that.

User avatar
Louis7777
Registered User
Posts: 378
Joined: Fri Apr 04, 2014 12:32 am

Re: [RFC]Quote link to quoted message

Post by Louis7777 » Sun May 24, 2015 4:29 pm

JoshyPHP wrote:A tooltip on which element? cite maybe? I'd like that.
Maybe on a <span> for the "wrote" word? :|

<cite> seems to define only titles. Maybe it's not used properly in bbcode.html?
w3schools wrote:Note: A person's name is not the title of a work.
[...]
In HTML5, the <cite> tag defines the title of a work.

In HTML 4.01, the <cite> tag defines a citation.

Post Reply