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

Not Planned Allow BB code formatting in thread titles

Discussion in 'Closed Suggestions' started by Aivaras, May 18, 2016.

  1. Aivaras

    Aivaras Active Member

    Thread titles is literature and as such they are subject to grammatical and typographical rules that often extend beyond plain text formatting.

    The proper way to write H2O in a thread title is the same as in the body of a message: the numeral has to be a subscript. Then there are cases when words need to be italicized and so on.

    Please, consider adding BB code formatting to thread titles.
     
  2. Chris D

    Chris D XenForo Developer Staff Member

    Incidentally, you can already do subscript characters though it requires copy/pasting it or knowing its unicode value to type it on the keyboard.

    H₂O

    Just throwing that out there in case it helps in the absence of the suggested feature.
     
    Aivaras likes this.
  3. Aivaras

    Aivaras Active Member

    I would accept this as a temporary workaround for a limited number of cases but the initial suggestion stays valid.
     
  4. cclaerhout

    cclaerhout Well-Known Member

    1. Install this template helper addon based on the MiniParser (it can be easily exented/modified - just look at the code)
    2. Create a template modification for the template "thread_list_item".
      It must match this code:
      Code:
      {xen:helper wrap, $thread.title, 50}
      Then replace it with this one:
      Code:
      {xen:helper minibb, {xen:helper wrap, $thread.title, 50}}
      Explanation: this string will be modified by the minibb template helper.

    The activated BbCodes will be the ones defined in that file (check the variable $_bbCodes).
     
    whynot, Aivaras and Luis like this.
  5. Aivaras

    Aivaras Active Member

    Cédric,

    Just followed your instructions. It works very nicely, indeed. Thank you.

    The following BB code markup:

    Code:
    Discussing Virginia Bergin's [I]H[SUB]2[/SUB]O: It's in the Rain and Just One Drop Will Kill You[/I]
    Produces this result (which is perfect):
    01.png

    This is basic literacy, really, and as such it should make its way into the core, don't you think?

    Your otherwise graceful solution does run into one problem though: because of the currently implemented character limit in thread titles (please, see "Increase thread title length"), introducing BB codes in thread titles makes even less room for linguistic characters. What is already too short has to be made even shorter.
     
    Last edited: May 19, 2016
  6. cclaerhout

    cclaerhout Well-Known Member

    If I may, I don't think so. It's more a custom feature to cover specific needs. And users could overuse this...

    For the title character limit, this depends on XenForo architecture. So it should be managed by XenForo developers.
     
  7. Mike

    Mike XenForo Developer Staff Member

    Generally, I don't see this as something that will happen out of the box. The use of BB code in thread titles goes very far down a rabbit hole (what codes are allowed? how is that controlled? are they stripped out in contexts that don't support them? etc).
     
  8. Aivaras

    Aivaras Active Member

    1. Vertical positioning of characters (normal, superscript, subscript).
    2. Text emphasis (normal, italics).
    That's pretty much it.

    Note that I'm talking about formatting that has to do with the semantic properties of a text, not its styling, design, or aesthetics. Italicizing a part of a title means it's a title of a book, writing 2 as a superscript means reference to square feet, etc.

    Mine is a literary/grammatical perspective on the issue. Yours is technical and I very much appreciate it being so.
     

Share This Page