Advertisement:

button sorgen nimmt kein ende

Aloittaja Nordling, toukokuu 21, 2007, 02:01:23 IP

« edellinen - seuraava »

Nordling

hi, ich habe mal wieder ein problem, wir nutzen smf 1.1.2
ich habe wie auch schon bei den vorgänger versionen, der navileiste einen zusätzlichen button mit einen externen link hinzugefügt.
der button funktioniert auch fehlerfrei, nur hagelt es fehlermedung.
irgenwas übersehe ich oder will ich nicht sehen


dden button hinter home habe ich eingefügt

// Show the menu up top.  Something like [home] [help] [profile] [logout]...
function template_menu()
{
global $context, $settings, $options, $scripturl, $txt;

// Show the [home] and [help] buttons.
echo '
<a href="', $scripturl, '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/home.gif" alt="' . $txt[103] . '" style="margin: 2px 0;" border="0" />' : $txt[103]), '</a>', $context['menu_separator'], '
<a href="http://www.xxxxxxxxxxxx.com/">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/allianz.gif" alt="' . $txt[ally] . '" style="margin: 2px 0;" border="0" />' : $txt[ally]), '</a>', $context['menu_separator'], '
<a href="', $scripturl, '?action=help">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/help.gif" alt="' . $txt[119] . '" style="margin: 2px 0;" border="0" />' : $txt[119]), '</a>', $context['menu_separator'];


// How about the [search] button?
if ($context['allow_search'])
echo '
<a href="', $scripturl, '?action=search">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/search.gif" alt="' . $txt[182] . '" style="margin: 2px 0;" border="0" />' : $txt[182]), '</a>', $context['menu_separator'];

// Is the user allowed to administrate at all? ([admin])
if ($context['allow_admin'])
echo '
<a href="', $scripturl, '?action=admin">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/admin.gif" alt="' . $txt[2] . '" style="margin: 2px 0;" border="0" />' : $txt[2]), '</a>', $context['menu_separator'];

// Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo '
<a href="', $scripturl, '?action=profile">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/profile.gif" alt="' . $txt[79] . '" style="margin: 2px 0;" border="0" />' : $txt[467]), '</a>', $context['menu_separator'];

// The [calendar]!
if ($context['allow_calendar'])
echo '
<a href="', $scripturl, '?action=calendar">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/calendar.gif" alt="' . $txt['calendar24'] . '" style="margin: 2px 0;" border="0" />' : $txt['calendar24']), '</a>', $context['menu_separator'];

// If the user is a guest, show [login] and [register] buttons.
if ($context['user']['is_guest'])
{
echo '
<a href="', $scripturl, '?action=login">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/login.gif" alt="' . $txt[34] . '" style="margin: 2px 0;" border="0" />' : $txt[34]), '</a>', $context['menu_separator'], '
<a href="', $scripturl, '?action=register">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/register.gif" alt="' . $txt[97] . '" style="margin: 2px 0;" border="0" />' : $txt[97]), '</a>';
}
// Otherwise, they might want to [logout]...
else
echo '
<a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/logout.gif" alt="' . $txt[108] . '" style="margin: 2px 0;" border="0" />' : $txt[108]), '</a>';
}

// Generate a strip of buttons, out of buttons.
function template_button_strip($button_strip, $direction = 'top', $force_reset = false, $custom_td = '')
{
global $settings, $buttons, $context, $txt, $scripturl;

if (empty($button_strip))
return '';

// Create the buttons...
foreach ($button_strip as $key => $value)
{
if (isset($value['test']) && empty($context[$value['test']]))
{
unset($button_strip[$key]);
continue;
}
elseif (!isset($buttons[$key]) || $force_reset)
$buttons[$key] = '<a href="' . $value['url'] . '" ' .( isset($value['custom']) ? $value['custom'] : '') . '>' . ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . ($value['lang'] ? $context['user']['language'] . '/' : '') . $value['image'] . '" alt="' . $txt[$value['text']] . '" border="0" />' : $txt[$value['text']]) . '</a>';

$button_strip[$key] = $buttons[$key];
}

echo '
<td ', $custom_td, '>', implode($context['menu_separator'], $button_strip) , '</td>';
}

?>


hier noch die fehlermeldung

http://xxxxxxxxxx.de/Forum/index.php?action=viewErrorLog;desc 
8: Use of undefined constant ally - assumed 'ally'
/customers/xxxxxxxxx.de/xxxxxxxxxxx.de/httpd.www/Forum/Themes/babylon/index.template.php (eval?)
55

http://xxxxxxxxxxxxxxx.de/Forum/index.php?action=viewErrorLog;desc 
8: Undefined index:
Datei: /customers/xxxxxxxxxx.de/xxxxxxxxxxxxx.de/httpd.www/Forum/Themes/default/Errors.template.php (main_above sub template - eval?)
Zeile: 163

http://xxxxxxxxxx.de/Forum/index.php?action=viewErrorLog;desc 
8: Use of undefined constant ally - assumed 'ally'
Datei: /customers/xxxxxxxxxxx.de/xxxxxxxxxxxxxx.de/httpd.www/Forum/Themes/default/Errors.template.php (main_above sub template - eval?)
Zeile: 474

http://xxxxxxxxxxxxx.de/Forum/index.php?action=dlattach;attach=13;type=avatar 
8: Use of undefined constant ally - assumed 'ally'
/customers/xxxxxxxxx.de/xxxxxxxxxxx.de/httpd.www/Forum/Themes/babylon/index.template.php (eval?)
55



kann mir jemand dabei helfen, bitte

Dom

Hi Nordling,
die Fehlermeldung kommt ja nur in der Fehlerbericht vor, stell den Bericht ab, wenn alles sichtbar ohne Probleme funktioniert.

Das ding habe ich bei mir schon Lange abgestellt, da auch fehlermeldungen kommt, wenn man nur das Template einfach wechselt.

mfg Dom :)
Ich benutze SMF 1.1.8  mit MKPortal M1.1.2b zusammen.

www.soessen.de.vu

Jorin

#2
Hast du den Text für $txt[ally] in der index.german.php (oder welche Sprache du auch immer verwendest) deines Themes eingebaut?

@Dom: Trotz eigenem Theme haben wir z.B. keinerlei Fehlermeldungen im Report. Wenn alles sauber eingebaut ist, ist das also kein Problem. Unterlasse es doch bitte, ständig in solchen Fällen das Deaktivieren dieses Reports zu empfehlen. Wir können das Für und Wider auch gerne mal diskutieren, in einem extra Thema, wenn du möchtest.

Nordling

#3
habe ich unter
....../themes/default/languages/index.german.php
und sieht wie folgt aus

$txt[33] = 'Neues Thema';

$txt[34] = 'Einloggen';
// Use numeric entities in the below string.
$txt[35] = 'Benutzername';
$txt[36] = 'Passwort';
$txt[ally] = 'Allianz';

$txt[40] = 'Benutzername nicht vorhanden.';

$txt[62] = 'Moderator';
$txt[63] = 'Thema l&#246;schen';



ich habe das ally in 37 geändert, das sieht dan so aus

$txt[33] = 'Neues Thema';

$txt[34] = 'Einloggen';
// Use numeric entities in the below string.
$txt[35] = 'Benutzername';
$txt[36] = 'Passwort';
$txt[37] = 'Allianz';

$txt[40] = 'Benutzername nicht vorhanden.';

$txt[62] = 'Moderator';
$txt[63] = 'Thema l&#246;schen';


fehlermeldung weiterhin im sekunden takt

was ich vor kurzen noch geändert habe, was aber meiner meinung nix mit der fehlermeldung zu tun haben sollte (aber was weiß ich schon)


// This part is the logo and forum name.&nbsp; You should be able to change this to whatever you want...
echo '
<img src="', $settings['images_url'], '/forumlogo.jpg" width="800" alt="', $context['forum_name'], '">';
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;echo '
<img src="', $settings['images_url'], '/bottrap.gif" width="80" style="float: right;" alt="" />
<span style="font-family: Georgia, sans-serif; font-size: xx-large;">', $context[''], '</span>';

echo '
</td>
</tr>
<tr id="upshrinkHeader"', empty($options['collapse_header']) ? '' : ' style="display: none;"', '>
<td valign="top">
<div class="headertitles" style="margin-right: 5px; position: relative;"><img src="', $settings['images_url'], '/blank.gif" height="12" alt="" /></div>
<div class="headerbodies" style="position: relative; margin-right: 5px; background-image: url(', $settings['images_url'], '/box_bg.gif);">
<img src="', $settings['images_url'], '/', $context['user']['language'], '/userinfo.gif" style="position: absolute; left: ', $context['browser']['is_ie5'] || $context['browser']['is_ie4'] ? '0' : '-1px', '; top: -16px; clear: both;" alt="" />
<table width="99%" cellpadding="0" cellspacing="5" border="0"><tr>



da hab ich das bottrap ding eingefügt



EDIT: habe nun immer die gleiche fehlermeldung

http://xxxxxxxxxx.de/Forum/index.php?action=viewErrorLog;desc 
8: Undefined index:
Datei: /customers/xxxxxxxxxxx.de/xxxxxxxxxxxxxx.de/httpd.www/Forum/Themes/default/Errors.template.php (main_above sub template - eval?)
Zeile: 163

Jorin

In deinen Textdateien fehlt:

$txt[ally] = 'Hier steht der Text.';

Lemming

#5
Lainaus käyttäjältä: Nordling - toukokuu 22, 2007, 11:31:57 AP
habe ich unter
....../themes/default/languages/index.german.php
und sieht wie folgt aus


$txt[ally] = 'Allianz';




Hm, am besten mal testen, einfach Allianz in die Datei reinzuschreiben - also ohne $txt[Bla]

Jorin

Könnte schwören, das war vorhin noch nicht da  ::)

Nordling

#7
LainaaHm, am besten mal testen, einfach Allianz in die Datei reinzuschreiben - also ohne $txt[Bla]

wie reinschreiben ???


<a href="http://www.xxxxxxxxxxxx.com/">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/allianz.gif" alt="' . allianz . '" style="margin: 2px 0;" border="0" />' : allianz), '</a>', $context['menu_separator'], '


so ???


oder hier
allianz = 'Allianz';

Lemming

<a href="http://www.xxxxxxxxxxxx.com/">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/allianz.gif" alt="Allianz" style="margin: 2px 0;" border="0" />Allianz</a>', $context['menu_separator'], '

Nordling

Lainaus käyttäjältä: Lemming - toukokuu 22, 2007, 02:07:04 IP
<a href="http://www.xxxxxxxxxxxx.com/">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/allianz.gif" alt="Allianz" style="margin: 2px 0;" border="0" />Allianz</a>', $context['menu_separator'], '


das mag er net, startet damit nichtmal :( 

syntax error, unexpected ','

Lemming

#10
Ich bin kein großer PHP-Freak :P
Probiers mal damit:

Koodi (function template_menu()) [Valitse]


// Show the menu up top.  Something like [home] [help] [profile] [logout]...
function template_menu()
{
global $context, $settings, $options, $scripturl, $txt;

// Show the [home] button.
echo '
<a href="', $scripturl, '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/home.gif" alt="' . $txt[103] . '" style="margin: 2px 0;" border="0" />' : $txt[103]), '</a>', $context['menu_separator'];

// Show the [Allianz] button
echo '
<a href="http://www.xxxxxxxxxxxx.com/">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/allianz.gif" alt="Allianz" style="margin: 2px 0;" border="0" />' : 'Bla</a>', $context['menu_separator'];

// Show the [help] button.
echo '

<a href="', $scripturl, '?action=help">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/help.gif" alt="' . $txt[119] . '" style="margin: 2px 0;" border="0" />' : $txt[119]), '</a>', $context['menu_separator'];


// How about the [search] button?
if ($context['allow_search'])
echo '
<a href="', $scripturl, '?action=search">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/search.gif" alt="' . $txt[182] . '" style="margin: 2px 0;" border="0" />' : $txt[182]), '</a>', $context['menu_separator'];

// Is the user allowed to administrate at all? ([admin])
if ($context['allow_admin'])
echo '
<a href="', $scripturl, '?action=admin">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/admin.gif" alt="' . $txt[2] . '" style="margin: 2px 0;" border="0" />' : $txt[2]), '</a>', $context['menu_separator'];

// Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo '
<a href="', $scripturl, '?action=profile">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/profile.gif" alt="' . $txt[79] . '" style="margin: 2px 0;" border="0" />' : $txt[467]), '</a>', $context['menu_separator'];

// The [calendar]!
if ($context['allow_calendar'])
echo '
<a href="', $scripturl, '?action=calendar">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/calendar.gif" alt="' . $txt['calendar24'] . '" style="margin: 2px 0;" border="0" />' : $txt['calendar24']), '</a>', $context['menu_separator'];

// If the user is a guest, show [login] and [register] buttons.
if ($context['user']['is_guest'])
{
echo '
<a href="', $scripturl, '?action=login">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/login.gif" alt="' . $txt[34] . '" style="margin: 2px 0;" border="0" />' : $txt[34]), '</a>', $context['menu_separator'], '
<a href="', $scripturl, '?action=register">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/register.gif" alt="' . $txt[97] . '" style="margin: 2px 0;" border="0" />' : $txt[97]), '</a>';
}
// Otherwise, they might want to [logout]...
else
echo '
<a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/logout.gif" alt="' . $txt[108] . '" style="margin: 2px 0;" border="0" />' : $txt[108]), '</a>';
}



Beachten: Es handelt sich hier nur um den 'function template_menu()' Code

Nordling

hat leider auch net geholfen immer nur fehlermeldung

8: Undefined index:
Datei: /customers/xxxxxxxxxx.de/xxxxxxxxxxxx.de/httpd.www/Forum/Themes/babylon/Display.template.php (main_above sub template - eval?)
Zeile: 163

lese ich diese fehlermeldung richtig, das der fehler im display.template.php in zeile 163 liegt???

Nordling

kann mir denn keiner sagen was bei mir falsch ist, oder jedenfals nen wink in die richtige richtung weisen ????

need help :(

Nordling


MrPM

Ich hatte genau das selbe Problem - Ungelöst! Jetzt habe ich meinen Link oben, wo vorher das SMF-Logo war.


Michael

Ferrika

Hallo zusammen,

ich hab dieses Problem auch ne Zeitlang gehabt und bin irgendwann hinter das Problem gekommen. Allerdings ist das von Theme zu Theme verschieden. Wichtig ist, das hier in der Zeile:

Lainaa// Show the menu up top.  Something like [home] [help] [profile] [logout]...
function template_menu()
{
   global $context, $settings, $options, $scripturl, $txt;

   $ca = 'home';

   // find the action
   if(isset($_GET['action']))
   {
      if (in_array($_GET['action'],array('jom', 'search','admin','calendar','profile','mlist','register','login','pm','help')))
         $ca = $_GET['action'];
      else
         $ca = '';
die Variable zugefügt wird, die sich dann hier:
Lainaa// Show the [home] and [help] buttons.
   echo $tab1, $ca== 'jom' ? '1' : '2' , '"><a href="http://xxxxxxxx/xxxx/index.php?option=xxxxxxxx">Startseite</a></td>';
wiederholt.

Das hier ist die Einstellung zum Theme "Amber"
Beim Default-Theme sieht das so aus:
Lainaa// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
   global $context, $settings, $options, $scripturl, $txt;

   // Work out where we currently are.
   $current_action = 'home';
   if (in_array($context['current_action'], array('admin', 'ban', 'boardrecount', 'cleanperms', 'detailedversion', 'dumpdb', 'featuresettings', 'featuresettings2', 'findmember', 'maintain', 'manageattachments', 'manageboards', 'managecalendar', 'managesearch', 'membergroups', 'modlog', 'news', 'optimizetables', 'packageget', 'packages', 'permissions', 'pgdownload', 'postsettings', 'regcenter', 'repairboards', 'reports', 'serversettings', 'serversettings2', 'smileys', 'viewErrorLog', 'viewmembers')))
      $current_action = 'admin';
   if (in_array($context['current_action'], array('homepage','statistik','guestbook','gallery','search', 'admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm')))
      $current_action = $context['current_action'];
   if ($context['current_action'] == 'search2')
      $current_action = 'search';
   if ($context['current_action'] == 'theme')
      $current_action = isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'pick' ? 'profile' : 'admin';

   // Are we using right-to-left orientation?
   if ($context['right_to_left'])
   {
      $first = 'last';
      $last = 'first';
   }
   else
   {
      $first = 'first';
      $last = 'last';
   }

   // Show the start of the tab section.
   echo '
         <table cellpadding="0" cellspacing="0" border="0" style="margin-left: 10px;">
            <tr>
               <td class="maintab_' , $first , '">&nbsp;</td>';

   // Show the [homepage] button.
   echo ($current_action=='homepage' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
            <td valign="top" class="maintab_' , $current_action == 'homepage' ? 'active_back' : 'back' , '">
               <a href="http://www.xxxxxxx.de" target="_blank"', $scripturl, '">Homepage</a>
            </td>' , $current_action == 'homepage' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';

Vielleicht hilft das als Anregung? Ich sehe in dem Code von Nordling nix dergleichen in der Angabe zum Button....

Gruß Ferrika
was ich nicht will, das man mir tu, das füg ich keinem andren zu

noex

Versucht mal ganz einfach aus $txt[ally]$txt['ally']  zu machen, schon sollte SMF nicht mehr so meckern.

lg
noex
"Jetzt, wo ich weiß wie es geht, versteh ich auch die Gebrauchsanleitung"

Nordling

hi sorry hatte viel um die ohren, danke für die antworten

habe ferrika version ausprobiert klappt leider nicht

genau wie noex :(

habe jetzt alles entfernt und ich könnt heulen ich hab immer noch die fehlermeldung

Advertisement: