Seite 1 von 1

Error beim einbinden eines templates

Verfasst: 31.05.2008 14:38
von lachkopf
Hallo

Ich habe folgendes Problem:
Eine Datei mit dem Namen warteliste.php
Eine template mit dem Namen warteliste.html (unter styles/prosilver/template)

in der php wird die template so geladen:
$template->set_filenames(array(
'body' => 'warteliste.html')
);


eingebunden ist
define('IN_PHPBB', true);
$phpbb_root_path = '';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
include_once($phpbb_root_path . 'includes/functions_user.' . $phpEx);
include($phpbb_root_path . 'includes/functions_display.'.$phpEx);


// Start session management
$user->session_begin();
$auth->acl($user->data);
beim öffnen der php kommt immer folgender Fehler:
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1778: strtr() [function.strtr]: The second argument is not an array
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1778: strtr() [function.strtr]: The second argument is not an array
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1778: strtr() [function.strtr]: The second argument is not an array

template->_tpl_load_file(): File /warteliste.html does not exist or is empty

Zeile 1778:
/**
* Format user date
*/
function format_date($gmepoch, $format = false, $forcedate = false)
{
static $midnight;

$lang_dates = $this->lang['datetime'];
$format = (!$format) ? $this->date_format : $format;

// Short representation of month in format
if ((strpos($format, '\M') === false && strpos($format, 'M') !== false) || (strpos($format, '\r') === false && strpos($format, 'r') !== false))
{
$lang_dates['May'] = $lang_dates['May_short'];
}

unset($lang_dates['May_short']);

if (!$midnight)
{
list($d, $m, $y) = explode(' ', gmdate('j n Y', time() + $this->timezone + $this->dst));
$midnight = gmmktime(0, 0, 0, $m, $d, $y) - $this->timezone - $this->dst;
}

if (strpos($format, '|') === false || ($gmepoch < $midnight - 86400 && !$forcedate) || ($gmepoch > $midnight + 172800 && !$forcedate))
{
return strtr(@gmdate(str_replace('|', '', $format), $gmepoch + $this->timezone + $this->dst), $lang_dates); //Zeile 1778
}

if ($gmepoch > $midnight + 86400 && !$forcedate)
{
$format = substr($format, 0, strpos($format, '|')) . '||' . substr(strrchr($format, '|'), 1);
return str_replace('||', $this->lang['datetime']['TOMORROW'], strtr(@gmdate($format, $gmepoch + $this->timezone + $this->dst), $lang_dates));
}
else if ($gmepoch > $midnight && !$forcedate)
{
$format = substr($format, 0, strpos($format, '|')) . '||' . substr(strrchr($format, '|'), 1);
return str_replace('||', $this->lang['datetime']['TODAY'], strtr(@gmdate($format, $gmepoch + $this->timezone + $this->dst), $lang_dates));
}
else if ($gmepoch > $midnight - 86400 && !$forcedate)
{
$format = substr($format, 0, strpos($format, '|')) . '||' . substr(strrchr($format, '|'), 1);
return str_replace('||', $this->lang['datetime']['YESTERDAY'], strtr(@gmdate($format, $gmepoch + $this->timezone + $this->dst), $lang_dates));
}

return strtr(@gmdate(str_replace('|', '', $format), $gmepoch + $this->timezone + $this->dst), $lang_dates);
}
Ich versteh echt nicht, wo der Fehler liegen soll.

Wäre nett, wenn wir jemand helfen könnte.

MfG,
Lachkopf

Verfasst: 31.05.2008 14:47
von Boecki91
Was steht denn in der warteliste.html?
lachkopf hat geschrieben:

Code: Alles auswählen

File /warteliste.html does not exist or [b]is empty[/b] 

Verfasst: 31.05.2008 14:54
von lachkopf
ziemlich viel ^^

696 Zeilen.

Sie besteht aus ziemlich vielen Abfragen und gibt nur was aus, wenn ein Treffer da is.

Soll ich vllt nen Teil vom Code reinstellen?

Verfasst: 01.06.2008 21:55
von lachkopf
Woran könnte es denn liegen?
Gibt es irgendwelche Dinge, die man in der php nicht verwenden darf, wenn man ein Template benutzt? Echo ist ja z.B. nicht möglich und verursacht auch Fehler.