Code: Alles auswählen
<?php
/***************************************************************************
* wikipedia.php
* -------------------
* copyright : (C) 2005 ChaosLord
* email : goccl@web.de
*
****************************************************************************/
/***************************************************************************
*
* 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);
$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);
init_userprefs($userdata);
header("Content-type: text/html; charset=utf-8");
//header("Content-type: text/html; charset=iso-5859-1");
header("Cache-Control: no-cache, pre-check=0, post-check=0, max-age=0");
$title = ( isset($HTTP_POST_VARS['title']) ) ? $HTTP_POST_VARS['title'] : $HTTP_GET_VARS['title'];
$action = ( isset($HTTP_POST_VARS['action']) ) ? $HTTP_POST_VARS['action'] : $HTTP_GET_VARS['action'];
$section = ( isset($HTTP_POST_VARS['section']) ) ? $HTTP_POST_VARS['section'] : $HTTP_GET_VARS['section'];
$page_title = 'Wikipedia :: '.$title;
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
//
// Parse and show the Menue.
//
$template->assign_var_from_handle('wikipedia', 'wikipedia');
$template->pparse('wikipedia');
function callback($wikibuffer)
{
$wikibuffer = substr( $wikibuffer, strpos( $wikibuffer, '<!-- start content -->' ) );
$wikibuffer = substr( $wikibuffer, 0, strpos( $wikibuffer, '<div class="printfooter">' ) );
$wikibuffer = str_replace( "/wiki/", "wikipedia.php?title=", $wikibuffer );
$wikibuffer = str_replace( "/w/index.php?title=", "wikipedia.php?title=", $wikibuffer );
$wikireplace = array(
'</b>' => '</b >',
'<p>' => '<span class="gen">',
'</p>' => '</span>',
// '<ul>' => '<span class="genmed"><ul>',
// '</ul>' => '</ul></span>',
// '<a' =>'<a class="genmed"',
// ' class="printfooter">'=>' class="printfooter"><hr />',
// ' class="new"' =>' class="genmed"',
// ' class=\'external\'' =>' class="genmed"',
'/skins/common/images/magnify-clip.png' =>'http://de.wikipedia.org/skins/common/images/magnify-clip.png',
'/math/' => 'http://de.wikipedia.org',
'.orgwiki' =>'.org/wiki/wiki',
// '\n' =>'\n<br>\n',
// '<img' =>'<img border="0"',
'Siehe auch' =>'<b>Siehe auch</b><br />',
// 'Weblinks' =>'Weblinks<br />',
'background-color:#F8F8FF' => 'background-color:#272727',
'background-color:#f8f8ff' => 'background-color:#272727',
'background-color:#FCFCFC' => 'background-color:#272727',
'background-color:#fcfcfc' => 'background-color:#272727',
'background-color:#ffffff' => 'background-color:#272727',
'background-color:#FFFFFF' => 'background-color:#272727',
'background-color:#F8F8FF' => 'background-color:#272727',
'background-color:#f8f8ff' => 'background-color:#272727',
'background-color:#EFEFEF' => 'background-color:#272727',
'background-color:#efefef' => 'background-color:#272727',
'background-color:#dfefdf' => 'background-color:#272727',
'background-color:#F7F7F7' => 'background-color:#272727',
'background-color:#f7f7f7' => 'background-color:#272727',
'background-color:#FFFFF8' => 'background-color:#272727',
'background-color:#FFFFF8' => 'background-color:#272727',
'background-color:#FFFAF0' => 'background-color:#272727',
'background-color:#FAF0E6' => 'background-color:#272727',
'background-color:#f7f8ff' => 'background-color:#272727',
'background-color:white' => 'background-color:#272727',
'background-color: #F8F8F8' => 'background-color:#272727',
'background-color:#f9f9f9' => 'background-color:#272727',
'background:#CCA394' => 'background:#272727',
'background:#efefef' => 'background:#272727',
'background:#ffffff' => 'background:#272727',
'background:#FDF5E6' => 'background:#272727',
'background:white' => 'background:#272727',
'background:#dddddd' => 'background:#272727',
'background:#FFDAB9' => 'background:#272727',
'bgcolor="#FFFFFF"' => 'bgcolor="#272727"',
'bgcolor="#FFDEAD"' => 'bgcolor="#272727"',
'bgcolor="#EFEFEF"' => 'bgcolor="#272727"',
'<table width="100%">' => '<table class="forumline" width="100%" cellspacing="1" cellpadding="0" border="0">',
'class="image border="0""' => 'class="image" border="0"',
'class="center' => 'class="gen',
'class="floatnone' => 'class="gen',
'class="plainlinks' => 'class="gen',
'class="extiw' => 'class="gen',
'class="tocindent' => 'class="nav',
'class="tocline' => 'class="nav',
'class="toctoggle' => 'class="nav',
'class="image"' => '',
'editsection' => 'gen',
'external' => 'gen',
'urlexpansion' => 'gen',
);
$wikibuffer = strtr($wikibuffer, $wikireplace);
$wikibuffer = preg_replace( '/\(<i>http(.*)wiki.phtml(.*)<\/i>\)/', "", $wikibuffer );
return $wikibuffer;
$wiki_a = "/skins/common/images/magnify-clip.png";
$wiki_b = "http://de.wikipedia.org/skins/common/images/magnify-clip.png";
$wikibuffer = preg_replace( $wiki_a, $wiki_b, $wikibuffer );
}
if( $action != "" )
{
if( $action == "edit" )
{
ob_start("callback");
include 'http://de.wikipedia.org/w/index.php?title='.$title.'&action='.$action.'§ion'.$section;
ob_end_flush();
}
}
else
{
ob_start("callback");
include 'http://de.wikipedia.org/wiki/?title=' . $title;
ob_end_flush();
}
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
?>
PS: Hmmm, hattest du hier nicht mal die Möglichkeit solche Quote-/Code-Fenster verkleinert darzustellen?