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

core.obtain_users_online_string_modify

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.1.10-RC1
    • 3.1.7-pl1, 3.2.0-a2
    • Events
    • None

      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)));

            Marc Marc
            RMcGirr83 Rich McGirr
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: