Seite 1 von 1
online / offline
Verfasst: 24.06.2004 00:08
von chaotix
Hallo, ich brauche nochmal Eure Hilfe :
Ich habe schon die Suche zu online / offline bemüht, jedoch viele mod´s gefunden aber nicht das was ich eigentlich suche.
Die online / offline - Anzeige soll unter jedem Beitrag des Users erscheinen !
In etwa so :
[ externes Bild ]
Die entsprechenden Icons habe ich mir schon gebastelt und in templates/subsilver/images/lang_german/ als icon_online.gif und icon_offline.gif abgelegt.
[ externes Bild ]
[ externes Bild ]
Natürlich passend zu den anderen.
Wie heißt aber der Hack dazu ??
Thx für Eure Hilfe
Verschoben
Verfasst: 24.06.2004 00:10
von PhilippK
Verschoben von Administration und Benutzung nach Modifikationen
Verfasst: 24.06.2004 00:12
von Markus67
Hi ...
Online/Offline/Hidden
Shows the online status of a user, stating if he is Online, Offline or Hidden (with images or text) within viewtopic.php as well as his profile, in memberlist.php, groupcp.php, etc.
Markus
Verfasst: 24.06.2004 00:22
von chaotix
Thx - das ging ja fix !
Dann werd ich den mal ausprobieren.
Gruss
So, nun habe ich das Teil installiert - genial - genau das was ich haben wollte. !
Funzt soweit auch überall - habe den online-Banner nun auch animiert.
Bei den PN´s habe ich aber einen Bug drin.
[ externes Bild ]
Zuständig ist zweifelsohne die
privmsg.php
folgender Quelltext sollte eingefügt werden
// Start add - Online/Offline/Hidden Mod
if ( $privmsg['user_session_time_1'] >= (time()-60) )
{
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) . '" border="0" /></a> ';
} 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) . '" border="0" /></a> ';
}
else
{
$online_status_img = '<img src="' . $images['icon_offline'] . '" alt="' . sprintf($lang['is_offline'], $username_from) . '" title="' . sprintf($lang['is_offline'], $username_from) . '" border="0" /> ';
}
}
else
{
$online_status_img = '<img src="' . $images['icon_offline'] . '" alt="' . sprintf($lang['is_offline'], $username_from) . '" title="' . sprintf($lang['is_offline'], $username_from) . '" border="0" /> ';
}
$online_color = ' style="color:#008500"';
$offline_color = ' style="color:#DF0000"';
$hidden_color = ' style="color:#EBD400"';
if ( $privmsg['user_session_time_2'] >= (time()-60) )
{
if ( $privmsg['user_allow_viewonline_2'] )
{
$online_status_2 = ' (<b><a href="' . append_sid("viewonline.$phpEx") . '" title="' . sprintf($lang['is_online'], $username_to) . '"' . $online_color . '>' . $lang['Online'] . '</a></b>)';
}
else if ( ( $userdata['user_level'] == ADMIN ) || ( $userdata['user_id'] == $user_id_to ) )
{
$online_status_2 = ' (<b><i><a href="' . append_sid("viewonline.$phpEx") . '" title="' . sprintf($lang['is_hidden'], $username_to) . '"' . $hidden_color . '>' . $lang['Hidden'] . '</a></i></b>)';
}
else
{
$online_status_2 = ' (<b><span title="' . sprintf($lang['is_offline'], $username_to) . '"' . $offline_color . '>' . $lang['Offline'] . '</span></b>)';
}
}
else
{
$online_status_2 = ' (<b><span title="' . sprintf($lang['is_offline'], $username_to) . '"' . $offline_color . '>' . $lang['Offline'] . '</span></b>)';
}
// End add - Online/Offline/Hidden Mod
IMHO liegt der Fehler irgendwo in dem Fett markierten Bereich. Der Fehler tritt auch bei Zustand
offline auf.
Ich finde den Fehler aber nicht - hat jemand ne Idee ?
Gruss
Verfasst: 24.06.2004 06:46
von Leuchte
Wie auf dem Bild zu erkennen, ist das 'Admin' bei dir blau.
Dadurch der Fehler. Wenn du uns verrätst, welcher Mod das ist, kann man eventuell mal nachgucken.
Verfasst: 24.06.2004 07:33
von chaotix
Es handelt sich um den MOD Color_groups, hier vom board.
http://www.phpbb.de/topic33948.html
Ich wühl mich mal durch den Thread - vielleicht seh ich da ja schon was.
Ich habe jetzt mal die verlinkung zur viewonline.phpEx rausgenommen - jetzt schaut´s gut aus :
// Start add - Online/Offline/Hidden Mod
if ( $privmsg['user_session_time_1'] >= (time()-60) )
{
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) . '" border="0" /></a> ';
}
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) . '" border="0" /></a> ';
}
else
{
$online_status_img = '<img src="' . $images['icon_offline'] . '" alt="' . sprintf($lang['is_offline'], $username_from) . '" title="' . sprintf($lang['is_offline'], $username_from) . '" border="0" /> ';
}
}
else
{
$online_status_img = '<img src="' . $images['icon_offline'] . '" alt="' . sprintf($lang['is_offline'], $username_from) . '" title="' . sprintf($lang['is_offline'], $username_from) . '" border="0" /> ';
}
$online_color = ' style="color:#008500"';
$offline_color = ' style="color:#DF0000"';
$hidden_color = ' style="color:#EBD400"';
if ( $privmsg['user_session_time_2'] >= (time()-60) )
{
if ( $privmsg['user_allow_viewonline_2'] )
{
$online_status_2 = ' (<b><a href="' . append_sid("viewonline.$phpEx") . '" title="' . sprintf($lang['is_online'], $username_to) . '"' . $online_color . '>' . $lang['Online'] . '</a></b>)';
}
else if ( ( $userdata['user_level'] == ADMIN ) || ( $userdata['user_id'] == $user_id_to ) )
{
$online_status_2 = ' (<b><i><a href="' . append_sid("viewonline.$phpEx") . '" title="' . sprintf($lang['is_hidden'], $username_to) . '"' . $hidden_color . '>' . $lang['Hidden'] . '</a></i></b>)';
}
else
{
$online_status_2 = ' (<b><span title="' . sprintf($lang['is_offline'], $username_to) . '"' . $offline_color . '>' . $lang['Offline'] . '</span></b>)';
}
}
else
{
$online_status_2 = ' (<b><span title="' . sprintf($lang['is_offline'], $username_to) . '"' . $offline_color . '>' . $lang['Offline'] . '</span></b>)';
}
// End add - Online/Offline/Hidden Mod
ersetzt durch ( die unterstrichen Teile entfernt )
$online_status_img = '<img src="' . $images['icon_online'] . '" /></a> ';
}
else if ( ( $userdata['user_level'] == ADMIN ) || ( $userdata['user_id'] == $user_id_from ) )
{
$online_status_img = '<img src="' . $images['icon_hidden'] . '" /></a> ';
}
else
{
$online_status_img = '<img src="' . $images['icon_offline'] . '" /> ';
}
}
else
{
$online_status_img = '<img src="' . $images['icon_offline'] . '" /> ';
}
Jetzt sieht wenigstens graphisch alles gut aus. Nun habe ich jedoch den Fehler, das die User anls online angezeigt werden - die defintiv offline sind.
Ich krieg die Krise !
Kann doch eigentlich nur ein Syntax fehler im entfernten Teil sein - oder liege ich da falsch ?
Gruss
p.s. Sollte ich
Acid ( Entwickler des Color_groups-MOD ) noch informieren ?
Verfasst: 24.06.2004 10:25
von Smith
Acid ist nicht der Entwickler...er hat den Mod nur gepostet!
Oder liege ich da falsch?
Verfasst: 24.06.2004 10:52
von PhilippK
Smith hat geschrieben:Acid ist nicht der Entwickler...er hat den Mod nur gepostet!
Oder liege ich da falsch?
Steht doch deutlich drin:
Acid wäre da definitv das falsche "Opfer"
Gruß, Philipp
hidden.gif
Verfasst: 09.09.2004 14:33
von francesco
@chaotix
schade das du nur online- & offline-buttons hast... des hidden.gif in dem design wäre wirklich cool!
oder hat jemand anders noch ein schönes hidden.gif im subsilver layout?