1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Extend Link Title Parsing to Profile Posts

Discussion in 'XenForo Suggestions' started by James, Jul 4, 2015.

  1. James

    James Well-Known Member

    Profile posts and comments don't automatically parse links like posts do. I'm assuming it's intentional.

    Perhaps extending this to profile content would be beneficial for consistency?

    Example: James
     
    Mouth, Veer, Amaury and 1 other person like this.
  2. eberkund

    eberkund Active Member

    I agree, especially now that profile posts support likes as well :)
     
  3. Amaury

    Amaury Well-Known Member

    +1

    For consistency.
     
  4. Chris D

    Chris D XenForo Developer Staff Member

    You might expect this to be quite simple, but certainly this is very much intentional.

    There's a big difference between auto linking "plain text" (e.g. profile posts and comments) vs. auto linking rich text (e.g. everything that supports bb code).

    The major difference is when the auto linking occurs. For plain text this happens on page load. For bb code it happens once, before the content is stored.

    So, given this in a profile post:
    https://xenforo.com/community

    We store it like that in the profile post table. On page load we detect that and convert it to HTML.

    However, given this in a normal post:
    https://xenforo.com/community

    Before saving it in the database we convert it to BB code. Of course without the option enabled we convert it to:
    [url]https://xenforo.com/community[/url]

    With the option enabled we fetch the title of the URL and convert it to:
    [url='https://xenforo.com/community']XenForo Community[/url]

    It is then saved like that in the database.

    So, if we supported it in profile posts there would need to be one of two very major changes.

    One change would be to go off and fetch an entire page of links' titles every time the page is loaded. This just isn't going to happen for hopefully obvious performance reasons.

    Another change would be to take a similar approach to bb code and have a sort of [URL] tag syntax.

    The latter of those options is the most likely but, of course, this is a pretty major change. So, unlikely to be one we implement in the short term (IMO) but at the same time not completely unrealistic to expect we could support something similar in the future.
     
    James and Amaury like this.
  5. James

    James Well-Known Member

    I did suspect it wasn't a simple change and I knew it wouldn't be a quick fix. But 2.0 is on the horizon :)
     

Share This Page