How do you work that in bbcode.html? You don't have if-then constructs there, that's why it uses template fragments.brunoais wrote:I think you are complicating it. It can more easily be like this:
[RFC]Quote link to quoted message
Re: [RFC]Quote link to quoted message
Re: [RFC]Quote link to quoted message
You do have... but I believe they are never used. Do you parse it manually in TextFormatter or you use twig?
Re: [RFC]Quote link to quoted message
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.
Re: [RFC]Quote link to quoted message
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.
I can't find anything about that in the wiki.
Re: [RFC]Quote link to quoted message
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.
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.
Re: [RFC]Quote link to quoted message
Oh... I c... I didn't check on that for some years so I forgot it.
Re: [RFC]Quote link to quoted message
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 namedquote_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.
DateTime::setTimezone(): Can only do this for zones with ID for now
Re: [RFC]Quote link to quoted message
The date is just distracting. It would be better as a tooltip.
Re: [RFC]Quote link to quoted message
A tooltip on which element?
cite
maybe? I'd like that.Re: [RFC]Quote link to quoted message
Maybe on a <span> for the "wrote" word?JoshyPHP wrote:A tooltip on which element?cite
maybe? I'd like that.
<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.