Vergleich inc/functions_online.php - 1.4.0 - 1.4.4

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 6
 * Website: http://www.mybboard.net
* License: http://www.mybboard.net/about/license
*

 * Website: http://www.mybboard.net
* License: http://www.mybboard.net/about/license
*

 * $Id: functions_online.php 4058 2008-08-03 00:37:09Z Tikitiki $

 * $Id: functions_online.php 4219 2008-10-02 23:02:43Z Tikitiki $

 */

$uid_list = $aid_list = $pid_list = $tid_list = $fid_list = $eid_list = array();

 */

$uid_list = $aid_list = $pid_list = $tid_list = $fid_list = $eid_list = array();

Zeile 34Zeile 34
	}
if($split_loc[1])
{

	}
if($split_loc[1])
{

		$temp = explode("&", my_substr($split_loc[1], 1));

		$temp = explode("&", my_substr($split_loc[1], 1));

		foreach($temp as $param)
{
$temp2 = explode("=", $param, 2);

		foreach($temp as $param)
{
$temp2 = explode("=", $param, 2);

Zeile 256Zeile 256
			}
else
{

			}
else
{

				$user_activity['activity'] = $parameters['action'];
}
break;















				$accepted_parameters = array("do_editpoll", "editpoll", "newpoll", "do_newpoll", "showresults", "vote");

foreach($accepted_parameters as $action)
{
if($parameters['action'] == $action)
{
$user_activity['activity'] = $action;
break;
}
}

if(!$user_activity['activity'])
{
$user_activity['activity'] = "showresults";
}
}
break;

		case "printthread":
if(is_numeric($parameters['tid']))
{

		case "printthread":
if(is_numeric($parameters['tid']))
{

Zeile 266Zeile 280
			}
$user_activity['activity'] = "printthread";
$user_activity['tid'] = $parameters['tid'];

			}
$user_activity['activity'] = "printthread";
$user_activity['tid'] = $parameters['tid'];

 
			break;

		case "private":
if($parameters['action'] == "send" || $parameters['action'] == "do_send")
{

		case "private":
if($parameters['action'] == "send" || $parameters['action'] == "do_send")
{

Zeile 412Zeile 427
			break;
}


			break;
}


	$user_activity['location'] = $location;

	$user_activity['location'] = htmlspecialchars_uni($location);

	
$plugins->run_hooks_by_ref("fetch_wol_activity_end", $user_activity);


	
$plugins->run_hooks_by_ref("fetch_wol_activity_end", $user_activity);


Zeile 425Zeile 440
 * @param array Array containing activity and essential IDs.
* @return string Location name for the activity being performed.
*/

 * @param array Array containing activity and essential IDs.
* @return string Location name for the activity being performed.
*/

function build_friendly_wol_location($user_activity, $return=false)

function build_friendly_wol_location($user_activity)

{
global $db, $lang, $uid_list, $aid_list, $pid_list, $tid_list, $fid_list, $eid_list, $plugins, $parser, $mybb;

{
global $db, $lang, $uid_list, $aid_list, $pid_list, $tid_list, $fid_list, $eid_list, $plugins, $parser, $mybb;

	global $threads, $forums, $forums_linkto, $posts, $events, $users, $attachments;

	global $threads, $forums, $forums_linkto, $posts, $events, $usernames, $attachments;


// Fetch forum permissions for this user
$unviewableforums = get_unviewable_forums();


// Fetch forum permissions for this user
$unviewableforums = get_unviewable_forums();

Zeile 438Zeile 453
	}

// Fetch any users

	}

// Fetch any users

	if(!is_array($users) && count($uid_list) > 0)

	if(!is_array($usernames) && count($uid_list) > 0)

	{
$uid_sql = implode(",", $uid_list);
$query = $db->simple_select("users", "uid,username", "uid IN ($uid_sql)");
while($user = $db->fetch_array($query))

	{
$uid_sql = implode(",", $uid_list);
$query = $db->simple_select("users", "uid,username", "uid IN ($uid_sql)");
while($user = $db->fetch_array($query))

		{
$users[$user['uid']] = $user['username'];
}
}


		{
$usernames[$user['uid']] = $user['username'];
}
}


	// Fetch any attachments
if(!is_array($attachments) && count($aid_list) > 0)
{

	// Fetch any attachments
if(!is_array($attachments) && count($aid_list) > 0)
{

Zeile 511Zeile 526
	}

// Now we've got everything we need we can put a name to the location

	}

// Now we've got everything we need we can put a name to the location

	switch($user_activity['activity']['activity'])

	switch($user_activity['activity'])

	{
// announcement.php functions
case "announcements":

	{
// announcement.php functions
case "announcements":

Zeile 592Zeile 607
			$location_name = $lang->activating_account;
break;
case "member_profile":

			$location_name = $lang->activating_account;
break;
case "member_profile":

			if($users[$user_activity['uid']])

			if($usernames[$user_activity['uid']])

			{

			{

				$location_name = $lang->sprintf($lang->viewing_profile2, get_profile_link($user_activity['uid']), $users[$user_activity['uid']]);

				$location_name = $lang->sprintf($lang->viewing_profile2, get_profile_link($user_activity['uid']), $usernames[$user_activity['uid']]);

			}
else
{

			}
else
{

Zeile 634Zeile 649
		// memberlist.php functions
case "memberlist":
$location_name = $lang->viewing_memberlist;

		// memberlist.php functions
case "memberlist":
$location_name = $lang->viewing_memberlist;

			break;

			break;

		// misc.php functions
case "misc_dstswitch":
$location_name = $lang->changing_dst;

		// misc.php functions
case "misc_dstswitch":
$location_name = $lang->changing_dst;

Zeile 757Zeile 772
		case "vote":
$location_name = $lang->voting_poll;
break;

		case "vote":
$location_name = $lang->voting_poll;
break;

		// postings.php functions
case "postings":
$location_name = $lang->using_modtools;








		// printthread.php functions
case "printthread":
if($threads[$user_activity['tid']])
{
$location_name = $lang->sprintf($lang->printing_thread2, get_thread_link($user_activity['tid']), $threads[$user_activity['tid']]);
}
else
{
$location_name = $lang->printing_thread;
}

			break;
// private.php functions
case "private_send":

			break;
// private.php functions
case "private_send":

Zeile 926Zeile 948
	$online_time = my_date($mybb->settings['timeformat'], $user['time']);

// Fetch the location name for this users activity

	$online_time = my_date($mybb->settings['timeformat'], $user['time']);

// Fetch the location name for this users activity

	$location = build_friendly_wol_location($user);

	$location = build_friendly_wol_location($user['activity']);


// Can view IPs, then fetch the IP template
if($mybb->usergroup['canviewonlineips'] == 1)


// Can view IPs, then fetch the IP template
if($mybb->usergroup['canviewonlineips'] == 1)