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

List of online users is always visible, instead of being controlled by a permission

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • None
    • 3.0.RC4
    • None
    • PHP Environment: 5.2.3
      Database: MySQL 5.0.45

      (I am talking about prosilver here, but it probably corresponds to subsilver2 as well).

      A forum index page has "WHO IS ONLINE" section at the bottom. The words "WHO IS ONLINE" become a link when the user has "Can view profiles, memberlist and online list" permission, as people expect.

      However below those words, there is still a list of online users ("Registered users: ...") and legend. Common sense suggests that visibility of this list should also be controlled by the same permission ("Can view profiles, memberlist and online list"). But, no matter if you set this permission on or off, the list of online users is showing anyway.

      Often people want to make list of online users invisible for guests. And the permission for that already exists, it just does not function.

      The solution is (the one that I implemented at my board):

      Open "styles\prosilver\template\index_body.html". Change this:

      Open "styles\prosilver\template\index_body.html". Change this:
          <!-- IF S_DISPLAY_ONLINE_LIST -->
             <!-- IF U_VIEWONLINE --><h3><a href="{U_VIEWONLINE}">{L_WHO_IS_ONLINE}</a></h3><!-- ELSE --><h3>{L_WHO_IS_ONLINE}</h3><!-- ENDIF -->
             <p>{TOTAL_USERS_ONLINE} ({L_ONLINE_EXPLAIN})<br />{RECORD_USERS}<br /> <br />{LOGGED_IN_USER_LIST}
             <!-- IF LEGEND --><br /><em>{L_LEGEND}: {LEGEND}</em><!-- ENDIF --></p>
          <!-- ENDIF -->

      into this:

      Select all
          <!-- IF S_DISPLAY_ONLINE_LIST -->
             <!-- IF U_VIEWONLINE --><h3><a href="{U_VIEWONLINE}">{L_WHO_IS_ONLINE}</a></h3><!-- ELSE --><h3>{L_WHO_IS_ONLINE}</h3><!-- ENDIF -->
             <p>{TOTAL_USERS_ONLINE} ({L_ONLINE_EXPLAIN})<br />{RECORD_USERS}<br /> <!-- IF U_VIEWONLINE --><br />{LOGGED_IN_USER_LIST}<!-- ENDIF -->
             <!-- IF LEGEND and U_VIEWONLINE --><br /><em>{L_LEGEND}: {LEGEND}</em><!-- ENDIF --></p>
          <!-- ENDIF -->

      Basically just surrounding the list of online users with the U_VIEWONLINE condition. I am not sure it is the best way, but seems working for me.

      Also it makes sense to me to control the visibility of "Our newest member" part by the same permission.

      Discussion of this issue in the forum.

            Acyd Burn Meik Sievertsen [X] (Inactive)
            kirr kirr
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: