Calling PHP gurus
-
OK, i am trying to integrate the vanilla forum into my existing theme. So, i open the vanilla head.php file and try to insert < ? php require(‘../wp-blog-header.php’); ? > inbetween the < head > tags. when i do, i get this error:
Parse error: parse error in /srv/www/htdocs/forum/themes/head.php on line 12
When i change < ? php require(‘../wp-blog-header.php’); ? > to require(‘../wp-blog-header.php’); i get this error:
Fatal error: Call to a member function on a non-object in /srv/www/htdocs/wp-includes/cache.php on line 206
Here is my head.php file from the vanilla/temes folder:
< ? php
// Note: This file is included from the library/Framework/Framework.Control.Head.php class.$HeadString = ‘<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN” “https://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd”>
<html xmlns=”https://www.w3.org/1999/xhtml” xml:lang=”‘.$this->Context->GetDefinition(‘XMLLang’).'”>
<head>
<title>’.$this->Context->Configuration[‘APPLICATION_TITLE’].’ – ‘.$this->Context->PageTitle.'</title>
<link rel=”shortcut icon” href=”‘.$this->Context->StyleUrl.’favicon.ico” />’;
require(‘../wp-blog-header.php’);
if (is_array($this->StyleSheets)) {
while (list($Key, $StyleSheet) = each($this->StyleSheets)) {
$HeadString .= ‘
<link rel=”stylesheet” type=”text/css” href=”‘.$StyleSheet[‘Sheet’].'”‘.($StyleSheet[‘Media’] == ”?”:’ media=”‘.$StyleSheet[‘Media’].'”‘).’ />’;
}
}
if (is_array($this->Scripts)) {
$ScriptCount = count($this->Scripts);
$i = 0;
for ($i = 0; $i < $ScriptCount; $i++) {
$HeadString .= ‘
<script type=”text/javascript” src=”‘.$this->Scripts[$i].'”></script>’;
}
}if (is_array($this->Strings)) {
$StringCount = count($this->Strings);
$i = 0;
for ($i = 0; $i < $StringCount; $i++) {
$HeadString .= $this->Strings[$i];
}
}
$BodyId = “”;
if ($this->BodyId != “”) $BodyId = ‘ id=”‘.$this->BodyId.'”‘;
echo $HeadString . ‘</head>
<body’.$BodyId.’ ‘.$this->Context->BodyAttributes.’>’;
? >
Can anyone PHP guru help? Thanks in advance
- The topic ‘Calling PHP gurus’ is closed to new replies.