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

core.obtain_users_online_string_modify

    Details

    • Type: Improvement
    • Status: Unverified Fix (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.1.7-pl1, 3.2.0-a2
    • Fix Version/s: 3.1.10-RC1
    • Component/s: Events
    • Labels:
      None

      Description

      Within this event core.obtain_users_online_string_modify although having quite a few parameters being passed to it, one can't actually do much with them as most are already populated, and used, prior to the event. Seems that the only thing that can be modified before being returned to the forum are these

      	return array(
      		'online_userlist'	=> $online_userlist,
      		'l_online_users'	=> $l_online_users,
      	);
      

      While you can adjust the other parameters using the event it doesn't seem to do much good. So I would propose to move most of the parameters into a new event prior to this line in the same file

      $online_userlist = implode(', ', $user_online_link);

      Something like this

      	/**
      	* Modify online userlist data
      	*
      	* @event core.modify_users_online_string_modify
      	* @var	array	online_users		Array with online users data
      	*									from obtain_users_online()
      	* @var	int		item_id				Restrict online users to item id
      	* @var	string	item				Restrict online users to a certain
      	*									session item, e.g. forum for
      	*									session_forum_id
      	* @var	array	rowset				Array with online users data
      	* @var	array	user_online_link	Array with online users items (usernames)
      	* @since 3.1.8-RC1
      	*/
      	$vars = array(
      		'online_users',
      		'item_id',
      		'item',
      		'rowset',
      		'user_online_link',
      	);
      	extract($phpbb_dispatcher->trigger_event('core.modify_users_online_string_modify', compact($vars)));

        Attachments

          Activity

            People

            • Assignee:
              Marc Marc
              Reporter:
              RMcGirr83 RMcGirr83
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: