Seite 1 von 1

[Erledigt] Css vom Forum, auch für die Page

Verfasst: 04.03.2008 23:30
von Dawn
Ich würde gerne das css des jeweiligen Nutzers auch auf der Homepage benutzen. Stehe da ein wenig auf dem Schlauch wie man das machen könnte.

Bislang hat die homepage ein eigenes .css

Das Forum liegt im Unterverzeichnis /forum auf dem selben Space wie die Webseite.

Nachtrag: die Seite besteht derzeit aus reinem html mit Frames.

Verfasst: 05.03.2008 01:07
von Dawn
Okay ich habe jetzt diverses ausprobiert z.b:

Integration von:

Code: Alles auswählen

<?php
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : 'forum/';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);&nbsp;
$userdata = session_pagestart($user_ip, PAGE_INDEX);


init_userprefs($userdata);
$page_title = 'Meine Seite';
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
?>
bzw:

Code: Alles auswählen

<?php
define('IN_PHPBB', true);
$phpbb_root_path = 'http://mysterien.de/forum';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);

$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
$page_title = 'Meine Seite';
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
?>
in die index.html

Nur weiß ich nicht, ob ich das vor oder in das <html> setzen soll. oder in den <head> oder ob ich grundsätzlich einem Denkfehler unterliege etc.

Bislang zeigt das einsetzen dieses phpcodes keinerlei effekt. Die css vom Forum wird jedenfalls nicht angesprochen.

Verfasst: 05.03.2008 01:53
von Overhead
@ Dawn

Du schreibst von css und gehts an ein php file, wie wäre es wenn Du Dir einmal unter styles/---Dein Style--/themes/ die dort befindlichen css anschaust und dort die passenden Änderungen z.B. in der coulor.css machst? ;)

cu Overhead

Verfasst: 05.03.2008 01:57
von Dawn
Wie ich die css meines forums ändere weiß ich. Es geht darum wie ich auf der Homepage auf die Forencss zugreifen kann.

Derzeit sind das zwei unterschiedliche css-Dateien.

Colour.css habe ich übrigens nicht, benutze nur subsilver2

Verfasst: 05.03.2008 02:16
von Dawn
Okay, hab grad festgestellt, dass die Vorlage, die ich benutzte für phpbb 2.0 ist und hab jetzt das hier gefunden:

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' => 'oben.html')
);

page_footer();

?>
Jetzt ist nur das Problem dass ich folgenden Fehler bekomme:

Code: Alles auswählen

[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
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3398: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2922)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3400: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2922)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3401: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2922)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3402: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2922)
template->_tpl_load_file(): File /oben.html does not exist or is empty
Wobei ich gerade den letzten Satz nicht verstehe, denn "oben.html" habe ich extra in styles/subsilver2/template/ eingefügt.


Edit: Ich habs geschafft :)

Diese Zeile hat gefehlt:

$user->setup();