Avatar billede ujo33 Nybegynder
28. februar 2003 - 16:03 Der er 6 kommentarer

Fatal error: Call to undefined function: draw_navigation_map()

Fejl igen ....

Det lyder sådn her :

Fatal error: Call to undefined function: draw_navigation_map() in /home/kalaaleq/public_html/phpwebthings-0.6.0/themes/nt/main.php on line 17

.................................................
<?php
function draw_header()
{
    global $cfg;
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<?php draw_header_tag(); ?>
<body>
<table width="100%" border="0" cellspacing="2" cellpadding="0">
<tr><td colspan=3>

<table border=0 cellspacing="0" cellpadding="0" width="100%">
<tr><td width=250><img src="../phpwebthings-0.6.0/themes/nt/images/logo.gif" alt="" border="0"></td>
<td align=center><?php if( check_module("banners")) draw_banner(); ?></td>
</tr>
<tr><td colspan=2><?php if( $cfg["core"]["show_map"] ) draw_navigation_map(); ?></td></tr>
</table>

</td></tr>
<tr><td width=150 valign=top>
<?php
//menu
draw_menu();
draw_login_box();
draw_users_online();
draw_admin_box();
if( check_module("news") ) draw_news_pending( "left" );
if( check_module("sideboxes") ) draw_side_boxes("left");
?>
</td><td width=1000 valign=top>
<?php
}

function draw_footer()
{
?></td><td width=150 valign=top>
<?php
if( check_module("polls") ) draw_poll();
if( check_module("picofday") ) draw_picofday();
//if( check_module("news") ) draw_news_pending( "right" );
if( check_module("sideboxes") ) draw_side_boxes("right");
// please don't remove the link below and help phpWebThings!
// por favor não remova o link abaixo e ajude o phpWebThings!
theme_draw_rightbox_open( "Powered by" );
?>
<div align="center"><a href="http://www.phpdbform.com" target="_blank"><img src="../phpwebthings-0.6.0/themes/nt/images/webthings_button.png" border=0 alt="phpWebThings powered"></a></div>
<?php
theme_draw_rightbox_close();
?>
</td></tr>
<tr><td colspan=3 align="right"><?php draw_copyright(); ?></td></tr>
</table>
</body>
</html>
<?php
}

function theme_draw_leftbox_open( $title )
{
?>
<table width="170" border=0 cellspacing=0 cellpadding=0>
<tr>
    <td width=8 height=22><img src="../phpwebthings-0.6.0/themes/nt/themes/nt/img/nttopleft.png" width=8 height=22 alt="" border=0></td>
    <td background="../phpwebthings-0.6.0/themes/nt/themes/nt/img/nttop.png" align="center" valign="middle" height=22 class="sideboxtitle"><?php print $title; ?></td>
    <td width=12 height=22><img src="../phpwebthings-0.6.0/themes/nt/themes/nt/img/nttopright.png" width=12 height=22 alt="" border=0></td>
</tr>
<tr>
    <td background="../phpwebthings-0.6.0/themes/nt/themes/nt/img/ntleft.png"> </td>
    <td class="sideboxtext"><table width="100%" border=0 cellpadding=0 cellspacing=0>
        <tr>
        <td class="sideboxtext">
<?php
}

function theme_draw_leftbox_close()
{
?></td>
        </tr>
    </table></td>
    <td background="../phpwebthings-0.6.0/themes/nt/themes/nt/img/ntright.png"> </td>
</tr>
<tr>
    <td width=8 height=12><img src="../phpwebthings-0.6.0/themes/nt/themes/nt/img/ntbottomleft.png" width=8 height=12 alt="" border=0></td>
    <td background="../phpwebthings-0.6.0/themes/nt/themes/nt/img/ntbottom.png"> </td>
    <td width=12 height=12><img src="../phpwebthings-0.6.0/themes/nt/themes/nt/img/ntbottomright.png" width=12 height=12 alt="" border=0></td>
</tr>
</table>
<?php
}

function theme_draw_rightbox_open( $title )
{
?>
<table width="170" border=0 cellspacing=0 cellpadding=0>
<tr>
    <td width=8 height=22><img src="../phpwebthings-0.6.0/themes/nt/themes/nt/img/nttopleft.png" width=8 height=22 alt="" border=0></td>
    <td background="../phpwebthings-0.6.0/themes/nt/themes/nt/img/nttop.png" align="center" valign="middle" height=22 class="sideboxtitle"><?php print $title; ?></td>
    <td width=12 height=22><img src="../phpwebthings-0.6.0/themes/nt/themes/nt/img/nttopright.png" width=12 height=22 alt="" border=0></td>
</tr>
<tr>
    <td background="../phpwebthings-0.6.0/themes/nt/themes/nt/img/ntleft.png"> </td>
    <td class="sideboxtext"><table width="100%" border=0 cellpadding=0 cellspacing=0>
        <tr>
        <td class="sideboxtext">
<?php
}

function theme_draw_rightbox_close()
{
?></td>
        </tr>
    </table></td>
    <td background="../phpwebthings-0.6.0/themes/nt/themes/nt/img/ntright.png"> </td>
</tr>
<tr>
    <td width=8 height=12><img src="../phpwebthings-0.6.0/themes/nt/themes/nt/img/ntbottomleft.png" width=8 height=12 alt="" border=0></td>
    <td background="../phpwebthings-0.6.0/themes/nt/themes/nt/img/ntbottom.png"> </td>
    <td width=12 height=12><img src="../phpwebthings-0.6.0/themes/nt/themes/nt/img/ntbottomright.png" width=12 height=12 alt="" border=0></td>
</tr>
</table>
<?php
}

function theme_draw_centerbox_open( $title )
{
?>
<table width="100%" border=0 cellspacing=0 cellpadding=0>
<tr>
    <td width=8 height=22><img src="../phpwebthings-0.6.0/themes/nt/themes/nt/img/nttopleft.png" width=8 height=22 alt="" border=0></td>
    <td background="../phpwebthings-0.6.0/themes/nt/themes/nt/img/nttop.png" align="center" valign="middle" height=22 class="centerboxtitle"><?php print $title; ?></td>
    <td width=12 height=22><img src="../phpwebthings-0.6.0/themes/nt/themes/nt/img/nttopright.png" width=12 height=22 alt="" border=0></td>
</tr>
<tr>
    <td background="../phpwebthings-0.6.0/themes/nt/themes/nt/img/ntleft.png"> </td>
    <td class="centerboxtext"><table width="100%" border=0 cellpadding=0 cellspacing=0>
        <tr>
        <td class="centerboxtext">
<?php
}

function theme_draw_centerbox_close()
{
?></td>
        </tr>
    </table></td>
    <td background="../phpwebthings-0.6.0/themes/nt/themes/nt/img/ntright.png"> </td>
</tr>
<tr>
    <td width=8 height=12><img src="../phpwebthings-0.6.0/themes/nt/themes/nt/img/ntbottomleft.png" width=8 height=12 alt="" border=0></td>
    <td background="../phpwebthings-0.6.0/themes/nt/themes/nt/img/ntbottom.png"> </td>
    <td width=12 height=12><img src="../phpwebthings-0.6.0/themes/nt/themes/nt/img/ntbottomright.png" width=12 height=12 alt="" border=0></td>
</tr>
</table>
<?php
}

function theme_draw_menu_item( $text, $link )
{
    return "<a href=\"$link\">$text</a><br>\n";
}
?>
.................................................
P.S.
Har I nogle gode råd om hvordan jeg kan finde/søge fejl-koder?  og finde ud af hvad de betyder?

På forhånd tak...
Avatar billede alrua Nybegynder
28. februar 2003 - 16:12 #1
den der fejl betyder at du ikke har definderet nogen funktion med det navn. Du må checke din funktions-fil og se om du har lavet en stavefejl eller sådan noget :)
Avatar billede Slettet bruger
28. februar 2003 - 16:13 #2
Fatal error: Call to undefined function: draw_navigation_map() in /home/kalaaleq/public_html/phpwebthings-0.6.0/themes/nt/main.php on line 17
Fejlen siger sig selv... draw_navigation_map() er ikke en funktion du har defineret i koden!
Avatar billede Slettet bruger
28. februar 2003 - 16:15 #3
Den måde jeg selv finder fejl på er ved at printe noget tekst! Den sikre måde er:
exit("TEST"); //Stopper scriptet hvis parseren kommer til dette sted!

f.eks.
if(whatever)
{
exit("FEDT");//Hvis koden skal her hen!
}
else
{
exit("UFEDT");//Hvis koden ikke skal her hen!?
}
Avatar billede alrua Nybegynder
28. februar 2003 - 16:19 #4
Avatar billede ujo33 Nybegynder
28. februar 2003 - 16:53 #5
Funktions-filen hedder "th_functions.php" (tror jeg nok, fordi der er så mange at jeg er lifdt forvirret)Den ligger i det samme mappe.
------------------------------------------------------------------
<?php
include( "../phpwebthings-0.6.0/themes/nt/main.php" );

function draw_menu()
{
    global $config;
    $arr_menu = $config["menu"];
    ksort($arr_menu, SORT_NUMERIC);
    reset($arr_menu);

    theme_draw_leftbox_open( "Menu" );
    while( $entry = each( $arr_menu ) )
    {
        if( $entry[1]["type"] != "A" ) {
            if( $entry[1]["type"] == "L" ) {
                if( !$_SESSION["wt"]["logged"] ) continue;
            } else if(  $entry[1]["type"] == "N" ) {
                if( $_SESSION["wt"]["logged"] ) continue;
            }
        }
        echo theme_draw_menu_item( $entry[1]["title"], $entry[1]["file"] );
    }
    theme_draw_leftbox_close();
}

function theme_draw_map()
{
    global $sitemap;
    echo "<table border=0 width=\"100%\" cellpadding=2 cellspacing=0><tr><td class=\"navbar\">";
    foreach($sitemap as $item) {
        echo "&gt; <a href=\"$item[1]\" class=\"navbarlink\">$item[0]</a> ";
    }
    echo "</td></tr></table>\n";
}
?>
--------------------------------------------------------

Kan det være her jeg lavede stavefejl?
Avatar billede alrua Nybegynder
28. februar 2003 - 17:46 #6
det kan ikke være der - der er ikke defineret nogen funktion som hedder draw_navigation_map... :)

men det er måske det der er problemet? :P
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Vi tilbyder markedets bedste kurser inden for webudvikling

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester