meine Funktion hat kein breadcrumb
Eingetragen von Q-Base (339)
am 03.10.2006 - 13:34 Uhr in
am 03.10.2006 - 13:34 Uhr in
Hallo,
ich habe im statistics.modul eine Funktion statistics_session_tracker hinzugefügt. Eine erste, schnelle Lösung war die URI q=session/[session_id] zu benutzen. So hatte meine Funktion aber kein 'breadcrumb' und das Menü klappte wieder zusammen.
Das wollte ich ändern und habe die URI auf q=admin/logs/access/session/[session_id] verändert. Nun wurde meine Funktion aber nicht mehr gefunden und es kam der Fehler 'Seite nicht gefunden'.
Was mache ich falsch?
Ciao, Q
- Anmelden oder Registrieren um Kommentare zu schreiben
Poste bitte mal den
am 03.10.2006 - 13:37 Uhr
Poste bitte mal den Menu-Code.
vg
--
sanduhrs - drupalcenter
--------------------------------
http://erdfisch.de
Hallo,
am 03.10.2006 - 13:42 Uhr
Hallo,
<?php
function statistics_menu($may_cache) {
$items = array();
$access = user_access('access statistics');
if ($may_cache) {
$items[] = array('path' => 'admin/logs/hits', 'title' => t('recent hits'),
'callback' => 'statistics_recent_hits', 'access' => $access,
'weight' => 3);
$items[] = array('path' => 'admin/logs/pages', 'title' => t('top pages'),
'callback' => 'statistics_top_pages', 'access' => $access,
'weight' => 1);
$items[] = array('path' => 'admin/logs/visitors', 'title' => t('top visitors'),
'callback' => 'statistics_top_visitors', 'access' => $access,
'weight' => 2);
$items[] = array('path' => 'admin/logs/referrers', 'title' => t('referrers'),
'callback' => 'statistics_top_referrers', 'access' => $access);
$items[] = array('path' => 'admin/logs/access', 'title' => t('details'),
'callback' => 'statistics_access_log', 'access' => $access,
'type' => MENU_CALLBACK);
}
else {
if (arg(0) == 'user' && is_numeric(arg(1)) && variable_get('statistics_enable_access_log', 0)) {
$items[] = array('path' => 'user/'. arg(1) .'/track/navigation', 'title' => t('track page visits'),
'callback' => 'statistics_user_tracker', 'access' => $access,
'type' => MENU_LOCAL_TASK, 'weight' => 2);
}
if (arg(0) == 'node' && is_numeric(arg(1)) && variable_get('statistics_enable_access_log', 0)) {
$items[] = array('path' => 'node/'. arg(1) .'/track', 'title' => t('track'),
'callback' => 'statistics_node_tracker', 'access' => $access,
'type' => MENU_LOCAL_TASK, 'weight' => 2);
}
// Modifikation für den Session-Tracker
if (arg(0) == 'admin' && arg(1) && variable_get('statistics_enable_access_log', 0)) {
$items[] = array('path' => 'admin/logs/access/session/'. arg(1) , 'title' => t('sessions'),
'callback' => 'statistics_session_tracker', 'access' => $access,
'type' => MENU_LOCAL_TASK, 'weight' => 2);
}
}
return $items;
}
?>
Danke & Ciao, Q