Seite 1 von 1

viewonline Anzeige hinkt hinterher

Verfasst: 10.11.2004 11:16
von Kiss News
Hallo!
In jedem Forum oben gibt es die Info: "Benutzer in diesem Forum". Die User, die gerade in diesem Forum sind, sind dort aufgelistet. Mir ist aber schon öfters aufgefallen, dass ich selber dort manchmal, aber nicht immer aufgelistet bin. Weiss jemand, warum bzw. an was das liegt? Kann es sein, dass diese "online" Statistik, die über sie Sessions läuft, immer etwa 1 Minute hinterher hinkt? Das ist mir in viewonline aufgefallen...

Verfasst: 10.11.2004 11:47
von tazzi
zeigt die user an, die in den letzten 5 minuten online waren, versuch mal aktualisieren, vielleicht stehste dann drin

Verfasst: 10.11.2004 12:18
von Markus Wandel
Hi,

es gibt einen MOD der dieses "kleinen" Fehler behebt.

Ich glaube den hatte ich hier im "alten" Forum mal gefunden.

Code: Alles auswählen

################################################################################
##
##   Hack Title:		User Always Browsing
##   Hack Version:		1.0.1 
##   Hack Author:		John McKernan (JohnMcK )
## 
##   Hack Description:	This hack ensures that the user's name is always
##						shown in 'Users browsing this forum' (view-forum 
##						pages).
##
##						This simple hack does not affect the online user list 
##						refresh rate.
##
##   phpBB Version:		2.0.4 - 2.0.6
##		
##   Difficulty Level:	Easy 
##   Installation Time:	5 Minutes 
##
##   Files To Edit:		(1)
##						\includes\page_header.php
##
##   Release History:
##						1.0.0 - Initial release (Aug 29, 2003)
##						1.0.1 - Nov 17, 2003
##								Fixed bug - extraneous comma
##
################################################################################
##
##  FOR UPDATES/SUPPORT, please visit http://www.phpbbhacks.com/forums
##
##  Stay up-to-date on the latest news involving our hacks, sign-up for
##  our newsletter at http://wwww.presagemedia.com/lists/?p=subscribe
##
##  This author supports phpBBHacks.com. This hack is made available
##  solely through their database at http://www.phpbbhacks.com
## 
##  If you are new to installing hacks for phpBB, may I suggest that you take
##  a look at my 'Installing phpBB Hacks' tutorial at phpBBHacks.com. You can
##  find it here: http://www.phpbbhacks.com/forums/viewtopic.php?t=12211.  You
##  may also want to take a look at my other tutorials and articles available
##	at http://www.presagemedia.com/hacks/cms_articles.php
##
################################################################################
##
##  This hack is released under the GPL License.
##  All Intellectual Property Rights are retained by the hack author(s) 
##  shown above.
##
##  This hack can be freely used, but not distributed, without permission.
##
################################################################################
## Author Notes: 
## 
##     This hack requires php 4.0.
##
##     This hack has been tested/verified on v 2.0.4 & 2.0.6
## 
################################################################################

##
##----------[ OPEN ]-------------------------------------
##

\includes\page_header.php

##
##----------[ FIND ]-------------------------------------
##

	if ( empty($online_userlist) )
	{
		$online_userlist = $lang['None'];
	}

##
##----------[ AFTER, ADD ]-------------------------------
##

	// user always browsing - only needed if on view-forum & user is not hidden
	if ( isset($forum_id) && $userdata['session_logged_in'] && $userdata['user_allow_viewonline'] )
	{
		// build online link for current user
		if ( $userdata['user_level'] == ADMIN )
		{
			$userlink_name = '<b>' . $userdata['username'] . '</b>';
			$userlink_style = 'style="color:#' . $theme['fontcolor3'] . '"';
		}
		else if ( $userdata['user_level'] == MOD )
		{
			$userlink_name = '<b>' . $userdata['username'] . '</b>';
			$userlink_style = 'style="color:#' . $theme['fontcolor2'] . '"';
		}
		else
		{
			$userlink_name = $userdata['username'];
			$userlink_style = '';
		}

		$user_browsing_link = '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $userdata['user_id']) . '"' . $userlink_style . '>' . $userlink_name . '</a>';

			// if userlist shows `none` replace with user_browsing_link
		if ( $online_userlist == $lang['None'] )
		{
			$online_userlist = $user_browsing_link;
		}
			// add link if user is missing from list
		else if ( substr_count($online_userlist, $user_browsing_link) == 0 )
		{
			$online_userlist .= ', ' . $user_browsing_link;
		}
	}

##
##----------[ SAVE AND CLOSE ALL FILES ]-----------------
##
##     End
##

Versuchs mal. Bei mir geht es einwandfrei.

Bye

Verfasst: 10.11.2004 13:16
von Kiss News
ja, scheint zu klappen. Danke für die Info :P

Verfasst: 20.12.2004 16:43
von Volker
habe es in die 2.0.11 eingebaut, geht! noch eine andere frage, bei mir werden da aber keine gäste angezeigt, ist das normal?

Verfasst: 11.01.2005 10:34
von Kiss News
ja, ads ist bei mir auch so... Gäste werden nicht angezeigt. Gibt es dafür vielleicht einen fix?

auch ist mir aufgefallen, dass die "wer ist online" Anzeige immer 1-2 Minuten hinterherhinkt. Ist wohl Ist wohl auch so ein ähnliches Problem.
Gibt es dafür vielelicht auch einen fix?