besten dank für den Tip mit dem löschenaller admin_*.php files
Beim stückweisen einfügen und testen kristallisierten sich 2 Dateien herraus, die das menu wieder verschwinden ließen.
die admin_map_map.php und die admin_map_locations.php
anbei die quelltexte
Code: Alles auswählen
?php
/***************************************************************************
*
* MOD : Map MOD
* file : admin_map_locations.php
* copyright : (C) 2003 Michael Keppler
* web : www.bananeweizen.de
*
***************************************************************************/
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
define('IN_PHPBB', true);
if( !empty($setmodules) )
{
$filename = basename(__FILE__);
$module['Map']['map_panel_locations'] = $filename;
return;
}
$phpbb_root_path = '../';
require($phpbb_root_path . 'extension.inc');
require('./pagestart.' . $phpEx);
//
// check parameters and do the work
//
function get_param($name,$default) {
global $HTTP_POST_VARS, $HTTP_GET_VARS;
return (isset($HTTP_POST_VARS[$name]) ? $HTTP_POST_VARS[$name] : (isset($HTTP_GET_VARS[$name]) ? $HTTP_GET_VARS[$name] : $default));
}
$mode=get_param('mode','');
$id= intval(get_param('id',0));
$longitude= (float)get_param('longitude',0);
$latitude= (float)get_param('latitude',0);
$location=get_param('location','Location');
if ($mode=='delete') {
$sql = 'DELETE
FROM ' . MAP_MOD_TEXT_TABLE . '
WHERE id='.$id;
if(!$result = $db->sql_query($sql))
{
message_die(CRITICAL_ERROR, "Could not delete location", "", __LINE__, __FILE__, $sql);
}
}
else if ($mode=='addsubmit') {
$sql = 'INSERT
INTO ' . MAP_MOD_TEXT_TABLE . "
VALUES (0,\"$location\", $longitude, $latitude)";
if(!$result = $db->sql_query($sql))
{
message_die(CRITICAL_ERROR, "Could not insert location", "", __LINE__, __FILE__, $sql);
}
$message = $lang['map_location_updated'] . "<br /><br />" . sprintf($lang['map_click_return_location'], "<a href=\"" . append_sid("admin_map_locations.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");
message_die(GENERAL_MESSAGE, $message);
}
//
// Pull all config data
//
$sql = 'SELECT *
FROM ' . MAP_MOD_TEXT_TABLE;
if(!$result = $db->sql_query($sql))
{
message_die(CRITICAL_ERROR, "Could not query locations", "", __LINE__, __FILE__, $sql);
}
else
{
while( $row = $db->sql_fetchrow($result) )
{
$template->assign_block_vars('location',array(
'TEXT' => $row['text'],
'LATITUDE' => $row['latitude'],
'LONGITUDE' => $row['longitude'],
'U_DELETE' => append_sid("admin_map_locations.$phpEx?mode=delete&id=".$row['id']),
));
}
}
if ($mode=='add') {
$template_name='admin/map_locations_edit.tpl';
$lang_add_edit=$lang['map_add_location'];
$newmode='addsubmit';
$id='0';
}
else {
$template_name='admin/map_locations_body.tpl';
$lang_add_edit=$lang['map_edit_location'];
}
$template->set_filenames(array(
"body" => $template_name)
);
$template->assign_vars(array(
'L_MAP_LOCATIONS' => $lang['map_locations'],
'L_MAP_LOCATIONS_EXPLAIN' => $lang['map_locations_explain'],
'S_MAP_LOCATIONS_ACTION' => append_sid('admin_map_locations.'.$phpEx),
'L_LOCATION_SETTINGS' => $lang['map_location_settings'],
'L_LONGITUDE' => $lang['map_longitude'],
'L_LATITUDE' => $lang['map_latitude'],
'L_LOCATION_FONT_SETTINGS' => $lang['map_font_settings'],
'L_FIND_PLACE' => $lang['map_find_place'],
'U_FIND_PLACE' => append_sid("../map_search.$phpEx"),
'L_LOCATION' => $lang['map_location_name'],
'L_DEGREES' => $lang['map_degrees'],
'L_ADDEDIT' => $lang_add_edit,
'L_ADD' => $lang['map_add_location'],
'L_UPDATE' => $lang['map_location_update'],
'MODE' => $newmode,
'ID' => $id,
'L_DELETE' => $lang['map_delete_location'],
'L_SUBMIT' => $lang['Submit'],
'L_RESET' => $lang['Reset'])
);
$template->pparse("body");
include('./page_footer_admin.'.$phpEx);
?>
Code: Alles auswählen
<?php
/***************************************************************************
*
* MOD : Map MOD
* file : admin_map_map.php
* copyright : (C) 2003 Michael Keppler
* web : www.bananeweizen.de
*
***************************************************************************/
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
define('IN_PHPBB', true);
if( !empty($setmodules) )
{
$filename = basename(__FILE__);
$module['Map']['map_panel_maps'] = $filename;
return;
}
$phpbb_root_path = '../';
require($phpbb_root_path . 'extension.inc');
require('./pagestart.' . $phpEx);
//
// check parameters and do the work
//
function get_param($name,$default) {
global $HTTP_POST_VARS, $HTTP_GET_VARS;
return (isset($HTTP_POST_VARS[$name]) ? $HTTP_POST_VARS[$name] : (isset($HTTP_GET_VARS[$name]) ? $HTTP_GET_VARS[$name] : $default));
}
$mode=get_param('mode','');
$id= intval(get_param('id',0));
$west= (float) get_param('west',0);
$east= (float) get_param('east',0);
$north= (float) get_param('north',0);
$south= (float) get_param('south',0);
$name= get_param('name','Karte');
$filename =get_param('filename','');
if ($mode=='delete') {
$sql = 'DELETE
FROM ' . MAP_MOD_MAP_TABLE . '
WHERE id='.$id;
if(!$result = $db->sql_query($sql))
{
message_die(CRITICAL_ERROR, "Could not delete map", "", __LINE__, __FILE__, $sql);
}
}
else if ($mode=='addsubmit') {
$sql = "INSERT
INTO " . MAP_MOD_MAP_TABLE . "
VALUES (0,\"$name\", \"$filename\", $north, $east, $south, $west)";
if(!$result = $db->sql_query($sql))
{
message_die(CRITICAL_ERROR, "Could not insert map", "", __LINE__, __FILE__, $sql);
}
$message = $lang['map_map_updated'] . "<br /><br />" . sprintf($lang['map_click_return_map'], "<a href=\"" . append_sid("admin_map_map.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");
message_die(GENERAL_MESSAGE, $message);
}
else if ($mode=='editsubmit') {
$sql = "UPDATE " . MAP_MOD_MAP_TABLE . "
SET name=\"$name\", filename=\"$filename\", north=$north, east=$east, south=$south, west=$west
WHERE id=$id";
if(!$result = $db->sql_query($sql))
{
message_die(CRITICAL_ERROR, "Could not update map", "", __LINE__, __FILE__, $sql);
}
$message = $lang['map_map_updated'] . "<br /><br />" . sprintf($lang['map_click_return_map'], "<a href=\"" . append_sid("admin_map_map.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");
message_die(GENERAL_MESSAGE, $message);
}
else if ($mode=='default') {
$sql = 'UPDATE ' . MAP_MOD_CONFIG_TABLE . '
SET config_value="'.$id.'"
WHERE config_name="default_map"';
if(!$result = $db->sql_query($sql))
{
message_die(CRITICAL_ERROR, "Could not set default map", "", __LINE__, __FILE__, $sql);
}
}
//
// Pull all config data
//
$sql = "SELECT *
FROM " . MAP_MOD_CONFIG_TABLE . "
WHERE config_name='default_map'";
if(!$result = $db->sql_query($sql))
{
message_die(CRITICAL_ERROR, "Could not query map configuration", "", __LINE__, __FILE__, $sql);
}
$row = $db->sql_fetchrow($result);
$default_map=$row['config_value'];
$sql = "SELECT *
FROM " . MAP_MOD_MAP_TABLE;
if ($id!=0) {
$sql.=" WHERE id=$id";
}
if(!$result = $db->sql_query($sql))
{
message_die(CRITICAL_ERROR, "Could not query map configuration", "", __LINE__, __FILE__, $sql);
}
while( $row = $db->sql_fetchrow($result) )
{
if ((($mode=='edit') && ($id==$row['id'])) || ($mode=='') || (($mode=='add') && ($id==''))) {
if (($mode=='add') && ($id=='')) {
$id='0';
$row=array();
}
$template->assign_block_vars('map',array(
'NAME' => $row['name'],
'FILENAME' => $row['filename'],
'EAST' => $row['east'],
'WEST' => $row['west'],
'NORTH' => $row['north'],
'SOUTH' => $row['south'],
'U_DELETE' => append_sid("admin_map_map.$phpEx?mode=delete&id=".$row['id']),
'DEFAULT' => ($row['id']==$default_map ? $lang['map_default'] : ''),
'U_DEFAULT' => append_sid("admin_map_map.$phpEx?mode=default&id=".$row['id']),
'U_EDIT' => append_sid("admin_map_map.$phpEx?mode=edit&id=".$row['id'])
));
if ($row['id']!=$default_map) {
$template->assign_block_vars('map.switch_default',array());
}
}
}
if ($mode=='add') {
$template_name='admin/map_map_edit.tpl';
$lang_add_edit=$lang['map_add_location'];
$newmode='addsubmit';
$id='0';
}
else if ($mode=='edit') {
$template_name='admin/map_map_edit.tpl';
$lang_add_edit=$lang['map_edit_location'];
$newmode='editsubmit';
}
else {
$template_name='admin/map_map_body.tpl';
$lang_add_edit=$lang['map_edit_location'];
}
$template->set_filenames(array(
"body" => $template_name)
);
$template->assign_vars(array(
'S_MAP_MAP_ACTION' => append_sid('admin_map_map.'.$phpEx),
'L_MAP_MAP' => $lang['map_map'],
'L_MAP_MAP_EXPLAIN' => $lang['map_map_explain'],
'L_MAP_EDIT' => $lang['map_edit'],
'L_MAP_SETTINGS' => $lang['map_settings'],
'L_MAP_PICTURE' => $lang['map_picture'],
'L_MAP_PICTURE_EXPLAIN' => $lang['map_picture_explain'],
'L_MAP_IMAGE_TYPES' => $lang['map_image_types'],
'L_BORDER_EXPLAIN' => $lang['map_border_explain'],
'L_BORDER_UNIT' => $lang['map_border_unit'],
'L_EAST' => $lang['map_east'],
'L_WEST' => $lang['map_west'],
'L_NORTH' => $lang['map_north'],
'L_SOUTH' => $lang['map_south'],
'L_MAP_NAME' => $lang['map_name'],
'L_MAP_NAME_EXPLAIN' => $lang['map_name_explain'],
'L_FILENAME' => $lang['map_filename'],
'L_LONGITUDE' => $lang['map_longitude'],
'L_LATITUDE' => $lang['map_latitude'],
'L_ADD' => $lang['map_add_map'],
'L_DELETE' => $lang['Delete'],
'L_BECOME_DEFAULT' => $lang['map_become_default'],
'L_SUBMIT' => $lang['Submit'],
'L_RESET' => $lang['Reset'],
'L_EDIT' => $lang['Edit'],
'NEWMODE' => $newmode,
'ID' => $id)
);
$template->pparse("body");
include('./page_footer_admin.'.$phpEx);
?>
Ist jemand so nett und checkt mal wo die Ursache verborgen ist?
danke