Seite 1 von 1

Brauche Hilfe bei News-Mod von Samuel Cochran

Verfasst: 21.07.2004 15:06
von Rexor
Hi Leute.Also ich würde gerne den News-Mod von Samuel Cochran etwas umändern. Und zwar so , dass der Header des Forums(allso Logo und Links und so ) nicht mit angezeigt wird.

Code: Alles auswählen

<?
/***************************************************************************
 *                                 news.php
 *                            ------------------
 *   begin                : Monday, Jan 14, 2002
 *   copyright            : (C) 2002 Samuel Cochran
 *   email                : sam@wyvern.com.au
 *
 *   $Id: news.php,v 1.2 2002/05/31 0:37:00 sj26 Exp $
 *
 ***************************************************************************/

/***************************************************************************
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 ***************************************************************************/

define('IN_PHPBB', true);
define('NEWS_ARCHIVE', true);
$phpbb_root_path = "./";
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);

//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX, $session_length);
init_userprefs($userdata);
//
// End session management
//

//
// Generate the page
//
$page_title = $lang['News'];
include($phpbb_root_path . "includes/page_header.$phpEx");

$template->set_filenames(array(
	'body' => 'news_body.tpl')
);

include($phpbb_root_path . "includes/news.$phpEx");

$template->pparse('body');

include($phpbb_root_path . "includes/page_tail.$phpEx");

?>
Wenn ich aber jetzt include($phpbb_root_path . "includes/page_header.$phpEx");
entferne , wird nur der Text des News angezeigt ,da in der Header Datei auch Teile des Designs gespeichert sind.Bei einem anderen Hack wird der Header auch nicht angezeigt , also müsste des bei diesem Hack ja auch möglich sein .
Ich bin jedenfalls noch ein voller php Newbie und hab nicht grade viel Ahnung von PHP:) Also wäre für Hilfe sehr dankbar .

mfg Rexor

Verfasst: 21.07.2004 15:14
von Both

Code: Alles auswählen

<? 
/*************************************************************************** 
 *                                 news.php 
 *                            ------------------ 
 *   begin                : Monday, Jan 14, 2002 
 *   copyright            : (C) 2002 Samuel Cochran 
 *   email                : sam@wyvern.com.au 
 * 
 *   $Id: news.php,v 1.2 2002/05/31 0:37:00 sj26 Exp $ 
 * 
 ***************************************************************************/ 

/*************************************************************************** 
 * 
 *   This program is free software; you can redistribute it and/or modify 
 *   it under the terms of the GNU General Public License as published by 
 *   the Free Software Foundation; either version 2 of the License, or 
 *   (at your option) any later version. 
 * 
 ***************************************************************************/ 

define('IN_PHPBB', true); 
define('NEWS_ARCHIVE', true); 
$phpbb_root_path = "./"; 
include($phpbb_root_path . 'extension.inc'); 
include($phpbb_root_path . 'common.'.$phpEx); 

// 
// Start session management 
// 
$userdata = session_pagestart($user_ip, PAGE_INDEX, $session_length); 
init_userprefs($userdata); 
// 
// End session management 
// 

// 
// Generate the page 
// 
$page_title = $lang['News']; 
include($phpbb_root_path . "admin/page_header_admin.$phpEx"); 

$template->set_filenames(array( 
   'body' => 'news_body.tpl') 
); 

include($phpbb_root_path . "includes/news.$phpEx"); 

$template->pparse('body'); 

include($phpbb_root_path . "includes/page_tail.$phpEx"); 

?>

Verfasst: 21.07.2004 15:23
von Rexor
Ok funktioniert, vielen dank :)

Verfasst: 21.07.2004 15:41
von saerdnaer

Code: Alles auswählen

include($phpbb_root_path . "admin/page_header_admin.$phpEx"); 
würde ich nicht einsetzten, da diese datei im admin ordner liegt un damit für den administrationsbereich zuständig ist. besser wäre da folgender code:

Code: Alles auswählen

$simple_header = true;
include($phpbb_root_path . "includes/page_header.$phpEx");
mfg ah