Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-15233

Avatars return should be standardized to not return html

XMLWordPrintable

      currently the avatar class deals with several categories of avatars. They are not all handled in the same way to return a src/height/width from the database, specifically gravatar. further more they all should never return any HTML... They should instead populate Template variables for the class(type), src, height, width that can be used to render in the templates to provide better control and flexibility for components that utilize them. The current way leads to massive css specificity issues not to mention lack of classes in general.

      As a rule nothing should be return from php that contains html! Ever!

      if you need to provide some sort of wrapping, then do it in the template variable or better yet the template itself!

            mrgoldy mrgoldy
            Hanakin Michael Miday
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: