Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-9989

Skip PM popup in overall_header.html, if there are no new PMs.

    Details

    • Type: Improvement
    • Status: Unverified Fix
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 3.0.8
    • Fix Version/s: 3.0.9-RC1
    • Component/s: Styles
    • Labels:
      None
    • Environment:
      n/a

      Description

      overall_header.html in prosilver has the following code:

      <!-- IF S_USER_PM_POPUP -->
      	if ({S_NEW_PM})
      	{
      		var url = '{UA_POPUP_PM}';
      		window.open(url.replace(/&amp;/g, '&'), '_phpbbprivmsg', 'height=225,resizable=yes,scrollbars=yes, width=400');
      	}
      <!-- ENDIF -->

      should be changed to:

      <!-- IF S_USER_PM_POPUP and S_NEW_PM-->
      	var url = '{UA_POPUP_PM}';
      	window.open(url.replace(/&amp;/g, '&'), '_phpbbprivmsg', 'height=225,resizable=yes,scrollbars=yes, width=400');
      	}
      <!-- ENDIF -->

      this will a save a few (precious) bytes on every page request.

        Activity

        Hide
        Rahber Rahber Ashraf added a comment -

        This will not work until the S_NEW_PM switch is defined.

        Show
        Rahber Rahber Ashraf added a comment - This will not work until the S_NEW_PM switch is defined.
        Hide
        nickvergessen Joas Schilling added a comment -

        It is defined, as it is used in the javascript if-statement...

        Show
        nickvergessen Joas Schilling added a comment - It is defined, as it is used in the javascript if-statement...
        Hide
        bantu Andreas Fischer added a comment -

        @rahber: You don't have to check whether something is set in templates. If it is not set, it is assumed to be boolean(false). The template engine checks whether it's set with isset().

        But in this case both S_USER_PM_POPUP and S_NEW_PM are set in functions.php, function page_header().

        Show
        bantu Andreas Fischer added a comment - @rahber: You don't have to check whether something is set in templates. If it is not set, it is assumed to be boolean(false). The template engine checks whether it's set with isset(). But in this case both S_USER_PM_POPUP and S_NEW_PM are set in functions.php, function page_header().

          People

          • Assignee:
            nickvergessen Joas Schilling
            Reporter:
            nlopes nlopes
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development