Seite 1 von 2

php bb in seite einbinden

Verfasst: 27.05.2007 15:19
von blackus3r
hallo zusammen also ich bin ein kompletter einfänger in dieser sache mit den einbinden des forums in den inhalt meiner seite.
also hab ich mir gedacht ich googel erstmal einwenig habe auch was gefunden nur ich habe nix davon verstaden :oops:
könnt ihr mir vllt eine anleitung geben also das forum soll da erscheinen wo der text steht computer- und internet portal zu besseren verstehen ist hier der link : http://blackus3r.bl.funpic.de/Cyber-Friend/home/

vielen dank für antworten



mfg

Verfasst: 27.05.2007 22:49
von blackus3r
hat keiner eine lösunng ? bitte

Verfasst: 28.05.2007 11:37
von parkrocker
Ich würd dir ja gerne helfen, aber ich verstehe dich nicht. Satzzeichen und Grammatik sind keine Hexerei, hilft ungemein bei der Verständigung.

Verfasst: 07.08.2007 02:29
von schaumfeste
ich stehe vor dem selben problem, zum alten 2er gibs genug dazu, aber zum 3er nix hilfreiches.
ich habe jetzt zb die overall_header.html auf. dort wird div wrap aufgerufen welcher das form inne hat. nun dachte ich mir das ich diesen wrap in mein eigenes oberes reinsetzte und unten schließe, aber irgendwie haut das alles nicht hinne ;(
das hier ist der bereich in dem das forum rein soll:

Code: Alles auswählen

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
</head>
<body>
<div id="main">
  <div id="logo"> <a href="a.html"><img src="images/x.gif" alt="" border="0" align="left" /></a>
    <div id="navbar">
      <ul>
        <li><a href="a.html">a</a></li>
        <li><a href="b.html">b</a></li>
        <li><a href="c.html">c</a></li>
        <li><a href="d.html">d</a></li>
        <li><a href="e.html">contact</a></li>
      </ule
    </div>
    <div class="clear"></div>
  </div>
  <div id="main-inner">
    <div id="main-inner-left"> <img src="images/photo-x.jpg" alt="" /> <img src="images/x.gif" alt="Gallery" class="headingimg" />


hier rein solls forum


 </div>
    <div id="main-inner-right"><img src="images/x.gif" alt="" />
      <div id="box-small">
        <div id="box-top-small"></div>
      </div>
            </div>
    <div class="clear"></div>
  </div>
  <div id="footer"></div>
</div>
</body>
</html>
ich dachte mir das ich dann den oberen main div in den header packe und den unteren teil in den footer, aber da hörts bei mir auf. die darstellung ist voll zerfetzt. hilfe bitte

Verfasst: 07.08.2007 02:59
von schaumfeste
ok, ich verwende nun folgendes:

Code: Alles auswählen

<?php

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

// Start session management
$user->session_begin();
$auth->acl($user->data);



// Output page
page_header('Titel');

$template->set_filenames(array(
   'body' => 'styles/prosilver/template/template.php')
);




page_footer();

?>
in der template.html dann:

Code: Alles auswählen

<?php include("overall_header.html")?>
<div id="main">
MEIN CODE
</div>
<?php include("overall_footer.html")?>

nun bekomme ich aber das hier als fehler:

[phpBB Debug] PHP Notice: in file /includes/session.php on line 1694: strtr() [function.strtr]: The second argument is not an array.
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1694: strtr() [function.strtr]: The second argument is not an array.
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4181: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3692)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4183: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3692)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4184: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3692)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4185: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3692)
Return to index page
General Error
template->_tpl_load_file(): File /styles/prosilver/template/template.php does not exist or is empty

wobei die datei defintiv da ist, bin am verzweifeln[/code]

Verfasst: 07.08.2007 08:25
von Dr.Death
Moin,

das Template darf keine PHP Datei sein, sondern eine HTML Datei.
$template->set_filenames(array(
'body' => 'styles/prosilver/template/template.php')
);
Der Ansatz ist auf jedenfall schon richtig.

Besser:

Code: Alles auswählen

$template->set_filenames(array(    
		'body' => 'mytemplate_body.html') 
		);

Hint: Bitte beachte unseren KB:16 <-- Topic Bumping.

Verfasst: 07.08.2007 12:45
von schaumfeste
moinsen,

das mit dem bumping wusst ich nicht, sorry!

Ich habe nun deinen rat befolgt, problem bleibt. Irgendwie stimmen die Pfade nicht. Mit

Code: Alles auswählen

$phpbb_root_path = './';
sage ich ja das er ins Root gehen soll, also http://loaclhost bzw hier der phpbb3 ordner.
Meine mytemplate_body.html liegt in den Ordner phpbb3 und er findet sie nicht, sowie die oben genannten Fehler:.....[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4185: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3692)

Kann es sein das der / zuviel ist? Wenn ja wie bekomme ich den weg, die Pfade stimmen doch. arggghh


bzw include in einer html? ist das in meinem bsp dann noch ok mit <?php ?> ?

Verfasst: 07.08.2007 12:59
von Dr.Death

Verfasst: 07.08.2007 13:19
von schaumfeste
hmm also bei mir sieht das von der strukt eigentlich so aus, hier mal mein aufbau:

phpBB3\styles\prosilver\template\mytemplate.html
in dieser Datei siehts dann so aus:

Code: Alles auswählen

<?php include("styles/prosilver/template/overall_header.html")?>
<div id="main">
mein html
</div>
<?php include("styles/prosilver/template/overall_footer.html")?>
die seite die die mytemplate.html lädt/zusammensetzt liegt in dem verzeichnis: phpbb3/aufruf.php
und beinhaltet den code:

Code: Alles auswählen

<?php
define('IN_PHPBB', true);
$phpbb_root_path = './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);

// Start session management
$user->session_begin();
$auth->acl($user->data);

// Output page
page_header('Titel');

$template->set_filenames(array(
   'body' => 'mytemplate_body.html')
);
page_footer();
?>
er will einfach nicht die mytemplate.html finden, das bsp was du mir gepostet hast stellt ja ebenfalls den "geschachtelten" aufbau/verweise zeugs dar und genau so verfahre ich doch.

verwende ich das script von olympus bekomme ich meldung:
Parse error: parse error, unexpected T_DO in X:\Programme\Programmierung\PHP\xampp\htdocs\x\y\forum\phpBB3\aufruf[/code].php on line 36

Verfasst: 07.08.2007 13:27
von Dr.Death
Beachte mal den Aufbau der mytemplate.html etwas genauer:

Der Header wird so included:

Code: Alles auswählen

<!-- INCLUDE overall_header.html -->
und nicht so:

Code: Alles auswählen

<?php include("styles/prosilver/template/overall_header.html")?>