Online/Offline/Hidden-Ansicht im privmsg.php

Du hast Probleme beim Einbau oder bei der Benutzung eines Mods? In diesem Forum bist du richtig.
Forumsregeln
phpBB 2.0 hat das Ende seiner Lebenszeit überschritten
phpBB 2.0 wird nicht mehr aktiv unterstützt. Insbesondere werden - auch bei Sicherheitslücken - keine Patches mehr bereitgestellt. Der Einsatz von phpBB 2.0 erfolgt daher auf eigene Gefahr. Wir empfehlen einen Umstieg auf phpBB 3.0, welches aktiv weiterentwickelt wird und für welches regelmäßig Updates zur Verfügung gestellt werden.
Antworten
Benutzeravatar
Nighthawk
Mitglied
Beiträge: 82
Registriert: 04.11.2005 20:49

Online/Offline/Hidden-Ansicht im privmsg.php

Beitrag von Nighthawk »

Hallo

Ich habe den Online/Offline/Hidden-MOD eingebaut. Wenn ich nun ein PM lesen will, dann bekomme ich nicht nur den Button, der den Online/Offline/Hidden-Status anzeigt, zusehen, sondern auch noch der Link und Info-Text daneben. Sieht unschön aus und wie kann ich das entfernen bzw. beheben, sodass nur die Buttons verlinkt sind zum viewonline.php.
Von: Nighthawk
An: Nighthawk (Nighthawk ist zurzeit online" style="color: #008500">Online)
Verfasst am: 07.02.2006, 12:24
Titel: welcom

hello!

[Online-Button]Nighthawk ist zurzeit online" title="Nighthawk ist zurzeit online" />
Es liegt an diesem Code. Doch ich weiss leider nicht 100%ig was dafür verantwortlich ist:

Code: Alles auswählen

#-----[ OPEN ]------------------------------------------
#
privmsg.php

#
#-----[ FIND ]------------------------------------------
#
	//
	// Major query obtains the message ...
	//
	$sql = "SELECT u.username
#
#-----[ IN-LINE FIND ]------------------------------------------
#
u.user_avatar
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, u.user_allow_viewonline AS user_allow_viewonline_1, u2.user_allow_viewonline AS user_allow_viewonline_2, u.user_session_time AS user_session_time_1, u2.user_session_time AS user_session_time_2
#
#-----[ FIND ]------------------------------------------
#
	$search = '<a href="' . $temp_url . '">' . sprintf($lang['Search_user_posts'], $username_from) . '</a>';
#
#-----[ AFTER, ADD ]------------------------------------------
#
	// Start add - Online/Offline/Hidden Mod
	if ($privmsg['user_session_time_1'] >= (time()-$board_config['online_time']))
	{
		if ($privmsg['user_allow_viewonline_1'])
		{
			$online_status_img = '<a href="' . append_sid("viewonline.$phpEx") . '"><img src="' . $images['icon_online'] . '" alt="' . sprintf($lang['is_online'], $username_from) . '" title="' . sprintf($lang['is_online'], $username_from) . '" /></a>&nbsp;';
			$online_status = '&nbsp;(<strong><a href="' . append_sid("viewonline.$phpEx") . '" title="' . sprintf($lang['is_online'], $username_from) . '"' . $online_color . '>' . $lang['Online'] . '</a></strong>)';
		}
		else if ($userdata['user_level'] == ADMIN || $userdata['user_id'] == $user_id_from)
		{
			$online_status_img = '<a href="' . append_sid("viewonline.$phpEx") . '"><img src="' . $images['icon_hidden'] . '" alt="' . sprintf($lang['is_hidden'], $username_from) . '" title="' . sprintf($lang['is_hidden'], $username_from) . '" /></a>&nbsp;';
			$online_status = '&nbsp;(<strong><em><a href="' . append_sid("viewonline.$phpEx") . '" title="' . sprintf($lang['is_hidden'], $username_from) . '"' . $hidden_color . '>' . $lang['Hidden'] . '</a></em></strong>)';
		}
		else
		{
			$online_status_img = '<img src="' . $images['icon_offline'] . '" alt="' . sprintf($lang['is_offline'], $username_from) . '" title="' . sprintf($lang['is_offline'], $username_from) . '" />&nbsp;';
			$online_status = '&nbsp;(<span title="' . sprintf($lang['is_offline'], $username_from) . '"' . $offline_color . '><strong>' . $lang['Offline'] . '</strong></span>)';
		}
	}
	else
	{
		$online_status_img = '<img src="' . $images['icon_offline'] . '" alt="' . sprintf($lang['is_offline'], $username_from) . '" title="' . sprintf($lang['is_offline'], $username_from) . '" />&nbsp;';
		$online_status = '&nbsp;(<span title="' . sprintf($lang['is_offline'], $username_from) . '"' . $offline_color . '><strong>' . $lang['Offline'] . '</strong></span>)';
	}

	if ($privmsg['user_session_time_2'] >= (time()-$board_config['online_time']))
	{
		if ($privmsg['user_allow_viewonline_2'])
		{
			$online_status_img_2 = '&nbsp;<a href="' . append_sid("viewonline.$phpEx") . '"><img src="' . $images['icon_online'] . '" alt="' . sprintf($lang['is_online'], $username_to) . '" title="' . sprintf($lang['is_online'], $username_to) . '" /></a>';
			$online_status_2 = '&nbsp;(<strong><a href="' . append_sid("viewonline.$phpEx") . '" title="' . sprintf($lang['is_online'], $username_to) . '"' . $online_color . '>' . $lang['Online'] . '</a></strong>)';
		}
		else if ($userdata['user_level'] == ADMIN || $userdata['user_id'] == $user_id_to)
		{
			$online_status_img_2 = '&nbsp;<a href="' . append_sid("viewonline.$phpEx") . '"><img src="' . $images['icon_hidden'] . '" alt="' . sprintf($lang['is_hidden'], $username_to) . '" title="' . sprintf($lang['is_hidden'], $username_to) . '" /></a>';
			$online_status_2 = '&nbsp;(<strong><em><a href="' . append_sid("viewonline.$phpEx") . '" title="' . sprintf($lang['is_hidden'], $username_to) . '"' . $hidden_color . '>' . $lang['Hidden'] . '</a></em></strong>)';
		}
		else
		{
			$online_status_img_2 = '&nbsp;<img src="' . $images['icon_offline'] . '" alt="' . sprintf($lang['is_offline'], $username_to) . '" title="' . sprintf($lang['is_offline'], $username_to) . '" />';
			$online_status_2 = '&nbsp;(<span title="' . sprintf($lang['is_offline'], $username_to) . '"' . $offline_color . '>' . $lang['Offline'] . '</strong></span>)';
		}
	}
	else
	{
		$online_status_img_2 = '&nbsp;<img src="' . $images['icon_offline'] . '" alt="' . sprintf($lang['is_offline'], $username_to) . '" title="' . sprintf($lang['is_offline'], $username_to) . '" />';
		$online_status_2 = '&nbsp;(<span title="' . sprintf($lang['is_offline'], $username_to) . '"' . $offline_color . '><strong>' . $lang['Offline'] . '</strong></span>)';
	}
	// End add - Online/Offline/Hidden Mod
#
#-----[ FIND ]------------------------------------------
#
		'MESSAGE' => $private_message,
#
#-----[ AFTER, ADD ]------------------------------------------
#
		// Start add - Online/Offline/Hidden Mod
		'POSTER_FROM_ONLINE_STATUS_IMG' => $online_status_img,
		'POSTER_FROM_ONLINE_STATUS' => $online_status,
		'POSTER_TO_ONLINE_STATUS_IMG' => $online_status_img_2,
		'POSTER_TO_ONLINE_STATUS' => $online_status_2,
		// End add - Online/Offline/Hidden Mod
Danke!
Greeting
Nighthawk
Antworten

Zurück zu „phpBB 2.0: Mod Support“