Renaming Reloaded.

git-svn-id: http://svn.automattic.com/wordpress/trunk@628 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
saxmatt 2003-12-18 09:36:13 +00:00
parent 298b53cc1e
commit 99a7358baf
42 changed files with 259 additions and 430 deletions

View File

@ -1,7 +1,7 @@
<?php
$curpath = dirname(__FILE__).'/';
require_once ($curpath.'wp-config.php');
require_once ($curpath.$b2inc.'/template-functions.php');
require_once ($curpath.WPINC.'/template-functions.php');
header('HTTP/1.0 301 Moved Permanently');
header('Location: ' . get_bloginfo('rdf_url') . "\n");
exit;

View File

@ -1,7 +1,7 @@
<?php
$curpath = dirname(__FILE__).'/';
require_once ($curpath.'wp-config.php');
require_once ($curpath.$b2inc.'/template-functions.php');
require_once ($curpath.WPINC.'/template-functions.php');
header('HTTP/1.0 301 Moved Permanently');
header('Location: ' . get_bloginfo('rss_url') . "\n");
exit;

View File

@ -1,7 +1,7 @@
<?php
$curpath = dirname(__FILE__).'/';
require_once ($curpath.'wp-config.php');
require_once ($curpath.$b2inc.'/template-functions.php');
require_once ($curpath.WPINC.'/template-functions.php');
header('HTTP/1.0 301 Moved Permanently');
header('Location: ' . get_bloginfo('rss2_url') . "\n");
exit;

View File

@ -11,22 +11,22 @@ $wpsmarty->plugin_dir = './wp-plugins';
require_once( 'b2-include/class-smarty.php' );
$blog = 1;
require_once('wp-blog-header.php');
require_once($abspath.'wp-links/links.php');
// not on by default: require_once($abspath.'wp-links/links.weblogs.com.php');
require_once(ABSPATH.'wp-links/links.php');
// not on by default: require_once(ABSPATH.'wp-links/links.weblogs.com.php');
define( 'NODISPLAY', false );
$wpsmarty->assign( 'siteurl', $siteurl );
$wpsmarty->assign( 'b2_version', $b2_version );
$wpsmarty->assign( 'b2_version', $wp_version );
if($posts)
{
foreach ($posts as $post)
{
start_b2();
start_wp();
$content .= $wpsmarty->fetch( 'post.html' );
ob_start();
include($abspath . 'wp-comments.php');
include(ABSPATH . 'wp-comments.php');
$txt = ob_get_contents();
ob_end_clean();
$content .= $txt;

View File

@ -30,7 +30,7 @@ require_once('wp-blog-header.php');
<h1 id="header"><a href="<?php echo $siteurl; ?>" title="<?php bloginfo('name'); ?>"><?php bloginfo('name'); ?></a></h1>
<div id="content">
<?php if ($posts) { foreach ($posts as $post) { start_b2(); ?>
<?php if ($posts) { foreach ($posts as $post) { start_wp(); ?>
<?php the_date('','<h2>','</h2>'); ?>
@ -51,7 +51,7 @@ require_once('wp-blog-header.php');
<?php trackback_rdf(); ?>
-->
<?php include($abspath . 'wp-comments.php'); ?>
<?php include(ABSPATH . 'wp-comments.php'); ?>
</div>
<?php } } else { // end foreach, end if any posts ?>

View File

@ -1,171 +0,0 @@
/* Default WordPress by Matthew Mullenweg http://photomatt.net
This is just a basic layout, with only the bare minimum defined.
Please tweak this and make it your own. :)
*/
a {
color: #069;
}
a:visited {
color: #039;
}
a:hover {
color: #39c;
}
acronym, abbr {
border-bottom: 1px dashed #333;
}
acronym, abbr, span.caps {
cursor: help;
font-size: 90%;
letter-spacing: .07em;
}
blockquote {
border-left: 5px solid #ccc;
margin-left: 1.5em;
padding-left: 5px;
}
body {
font-family: Georgia, "Times New Roman", Times, serif;
margin: 0;
}
h2 {
border-bottom: 2px solid #ccc;
margin-bottom: 2px;
}
p, li {
line-height: 130%;
}
.b2calendarcell {
color: #000;
}
.b2calendaremptycell {
}
.b2calendarheadercell {
background: #808080;
color: #ccc;
}
.b2calendarlinkpost {
color: #f00;
text-decoration: none;
}
.b2calendarmonth {
color: #aaa;
}
.b2calendarrow {
color: #0f0;
}
.b2calendartable {
background: #fff;
border: 1px solid #000;
}
.b2calendartoday {
color: #00f;
}
.credit {
font-size: 11px;
text-align: center;
}
.feedback {
text-align: right;
color: #ccc;
}
.meta, .meta a {
color: #808080;
font-size: small;
}
.storytitle a {
text-decoration: none;
}
#content {
margin: 0 160px 0 20px;
}
#header {
background-color: #808080;
margin: 0;
padding-left: 10px;
}
#header a {
color: #fff;
text-decoration: none;
}
#header a:hover {
color: #ccc;
}
#menu {
background-color: #000;
border-left: 3px solid #666;
padding-bottom: 10px;
position: absolute;
right: 0;
top: 65px;
width: 150px;
}
#menu form {
margin: 0 0 0 13px;
}
#menu input {
background-color: #ccc;
border: 2px solid #666;
}
#menu ul {
color: #ccc;
font-variant: small-caps;
font-weight: bold;
list-style-type: none;
margin: 0;
padding-left: 3px;
}
#menu ul ul {
font-variant: normal;
font-weight: normal;
line-height: 100%;
list-style-type: none;
margin: 0;
padding: 0;
text-align: left;
}
#menu ul ul li {
line-height: 115%;
padding-left: 12px;
}
#menu ul ul li a {
color: #fff;
height: 13px;
text-decoration: none;
}
#menu ul ul li a:hover {
border-bottom: 1px solid #ccc;
}

View File

@ -1,6 +1,6 @@
<p align="center" style="width: 100%" class="tabletoprow"><strong><a href="http://wordpress.org">WordPress</a></strong> <?php echo $b2_version ?> &#8212; <a href="http://wordpress.org/support/">Support Forums</a><br />
<p align="center" style="width: 100%" class="tabletoprow"><strong><a href="http://wordpress.org">WordPress</a></strong> <?php echo $wp_version ?> &#8212; <a href="http://wordpress.org/support/">Support Forums</a><br />
<?php
echo number_format(timer_stop(), 2)." seconds";
?>

View File

@ -1,7 +1,7 @@
<?php
require_once('../wp-config.php');
require_once($abspath.'/wp-admin/auth.php');
require_once(ABSPATH.'/wp-admin/auth.php');
function gethelp_link($this_file, $helptag) {
$url = 'http://wordpress.org/docs/reference/links/#'.$helptag;
@ -29,18 +29,18 @@ $admin_area_charset = (!isset($admin_area_charset)) ? 'iso-8859-15' : $admin_are
if (($is_macIE) || ($is_lynx))
$use_quicktags = 0;
$b2varstoreset = array('profile','standalone','redirect','redirect_url','a','popuptitle','popupurl','text', 'trackback', 'pingback');
for ($i=0; $i<count($b2varstoreset); $i += 1) {
$b2var = $b2varstoreset[$i];
if (!isset($$b2var)) {
if (empty($HTTP_POST_VARS["$b2var"])) {
if (empty($HTTP_GET_VARS["$b2var"])) {
$$b2var = '';
$wpvarstoreset = array('profile','standalone','redirect','redirect_url','a','popuptitle','popupurl','text', 'trackback', 'pingback');
for ($i=0; $i<count($wpvarstoreset); $i += 1) {
$wpvar = $wpvarstoreset[$i];
if (!isset($$wpvar)) {
if (empty($HTTP_POST_VARS["$wpvar"])) {
if (empty($HTTP_GET_VARS["$wpvar"])) {
$$wpvar = '';
} else {
$$b2var = $HTTP_GET_VARS["$b2var"];
$$wpvar = $HTTP_GET_VARS["$wpvar"];
}
} else {
$$b2var = $HTTP_POST_VARS["$b2var"];
$$wpvar = $HTTP_POST_VARS["$wpvar"];
}
}
}

View File

@ -90,8 +90,8 @@ $text = stripslashes($text);
/* big funky fixes for browsers' javascript bugs */
if (($is_macIE) && (!isset($IEMac_bookmarklet_fix))) {
$popuptitle = preg_replace($b2_macIE_correction["in"],$b2_macIE_correction["out"],$popuptitle);
$text = preg_replace($b2_macIE_correction["in"],$b2_macIE_correction["out"],$text);
$popuptitle = preg_replace($wp_macIE_correction["in"],$wp_macIE_correction["out"],$popuptitle);
$text = preg_replace($wp_macIE_correction["in"],$wp_macIE_correction["out"],$text);
}
if (($is_winIE) && (!isset($IEWin_bookmarklet_fix))) {
@ -100,8 +100,8 @@ if (($is_winIE) && (!isset($IEWin_bookmarklet_fix))) {
}
if (($is_gecko) && (!isset($Gecko_bookmarklet_fix))) {
$popuptitle = preg_replace($b2_gecko_correction["in"],$b2_gecko_correction["out"],$popuptitle);
$text = preg_replace($b2_gecko_correction["in"],$b2_gecko_correction["out"],$text);
$popuptitle = preg_replace($wp_gecko_correction["in"],$wp_gecko_correction["out"],$popuptitle);
$text = preg_replace($wp_gecko_correction["in"],$wp_gecko_correction["out"],$text);
}
$post_title = $_REQUEST['post_title'];

View File

@ -19,18 +19,18 @@ if (!get_magic_quotes_gpc()) {
$HTTP_COOKIE_VARS = add_magic_quotes($HTTP_COOKIE_VARS);
}
$b2varstoreset = array('action','standalone','cat');
for ($i=0; $i<count($b2varstoreset); $i += 1) {
$b2var = $b2varstoreset[$i];
if (!isset($$b2var)) {
if (empty($HTTP_POST_VARS["$b2var"])) {
if (empty($HTTP_GET_VARS["$b2var"])) {
$$b2var = '';
$wpvarstoreset = array('action','standalone','cat');
for ($i=0; $i<count($wpvarstoreset); $i += 1) {
$wpvar = $wpvarstoreset[$i];
if (!isset($$wpvar)) {
if (empty($HTTP_POST_VARS["$wpvar"])) {
if (empty($HTTP_GET_VARS["$wpvar"])) {
$$wpvar = '';
} else {
$$b2var = $HTTP_GET_VARS["$b2var"];
$$wpvar = $HTTP_GET_VARS["$wpvar"];
}
} else {
$$b2var = $HTTP_POST_VARS["$b2var"];
$$wpvar = $HTTP_POST_VARS["$wpvar"];
}
}
}

View File

@ -234,12 +234,12 @@ echo $posts_nav_bar;
<?php
// these lines are b2's "motor", do not alter nor remove them
include($abspath.'wp-blog-header.php');
include(ABSPATH.'wp-blog-header.php');
if ($posts) {
foreach ($posts as $post) {
//$posts_per_page = 10;
start_b2(); ?>
start_wp(); ?>
<p>
<strong><?php the_time('Y/m/d @ H:i:s'); ?></strong> [ <a href="post.php?p=<?php echo $id ?>&c=1"><?php comments_number('no comments', '1 comment', "% comments", true) ?></a>
<?php

View File

@ -233,10 +233,10 @@ echo $posts_nav_bar;
</table>
<?php
include($abspath.'wp-blog-header.php');
include(ABSPATH.'wp-blog-header.php');
if ($posts) {
foreach ($posts as $post) { start_b2();
foreach ($posts as $post) { start_wp();
?>
<p>
<strong><?php the_time('Y/m/d @ H:i:s'); ?></strong> [ <a href="edit.php?p=<?php echo $id ?>&c=1"><?php comments_number('no comments', '1 comment', "% comments", true) ?></a>

View File

@ -1,17 +1,17 @@
<?php // rename this to blogger-2-b2.php
$b2varstoreset = array('action');
for ($i=0; $i<count($b2varstoreset); $i += 1) {
$b2var = $b2varstoreset[$i];
if (!isset($$b2var)) {
if (empty($HTTP_POST_VARS["$b2var"])) {
if (empty($HTTP_GET_VARS["$b2var"])) {
$$b2var = '';
$wpvarstoreset = array('action');
for ($i=0; $i<count($wpvarstoreset); $i += 1) {
$wpvar = $wpvarstoreset[$i];
if (!isset($$wpvar)) {
if (empty($HTTP_POST_VARS["$wpvar"])) {
if (empty($HTTP_GET_VARS["$wpvar"])) {
$$wpvar = '';
} else {
$$b2var = $HTTP_GET_VARS["$b2var"];
$$wpvar = $HTTP_GET_VARS["$wpvar"];
}
} else {
$$b2var = $HTTP_POST_VARS["$b2var"];
$$wpvar = $HTTP_POST_VARS["$wpvar"];
}
}
}
@ -21,9 +21,9 @@ switch ($action) {
case "step1":
require_once('../wp-config.php');
require_once($abspath.$b2inc.'/template-functions.php');
require_once($abspath.$b2inc.'/functions.php');
require_once($abspath.$b2inc.'/vars.php');
require_once(ABSPATH.WPINC.'/template-functions.php');
require_once(ABSPATH.WPINC.'/functions.php');
require_once(ABSPATH.WPINC.'/vars.php');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

View File

@ -5,20 +5,20 @@
// 3. load in the browser from there
require_once('wp-config.php');
require_once($abspath.$b2inc.'/functions.php');
require_once(ABSPATH.WPINC.'/functions.php');
$b2varstoreset = array('action', 'gmpath', 'archivespath');
for ($i=0; $i<count($b2varstoreset); $i += 1) {
$b2var = $b2varstoreset[$i];
if (!isset($$b2var)) {
if (empty($HTTP_POST_VARS["$b2var"])) {
if (empty($HTTP_GET_VARS["$b2var"])) {
$$b2var = '';
$wpvarstoreset = array('action', 'gmpath', 'archivespath');
for ($i=0; $i<count($wpvarstoreset); $i += 1) {
$wpvar = $wpvarstoreset[$i];
if (!isset($$wpvar)) {
if (empty($HTTP_POST_VARS["$wpvar"])) {
if (empty($HTTP_GET_VARS["$wpvar"])) {
$$wpvar = '';
} else {
$$b2var = $HTTP_GET_VARS["$b2var"];
$$wpvar = $HTTP_GET_VARS["$wpvar"];
}
} else {
$$b2var = $HTTP_POST_VARS["$b2var"];
$$wpvar = $HTTP_POST_VARS["$wpvar"];
}
}
}

View File

@ -7,18 +7,18 @@ $title = 'Link Categories';
$this_file='link-categories.php';
$parent_file = 'link-manager.php';
$b2varstoreset = array('action','standalone','cat', 'auto_toggle');
for ($i=0; $i<count($b2varstoreset); $i += 1) {
$b2var = $b2varstoreset[$i];
if (!isset($$b2var)) {
if (empty($HTTP_POST_VARS["$b2var"])) {
if (empty($HTTP_GET_VARS["$b2var"])) {
$$b2var = '';
$wpvarstoreset = array('action','standalone','cat', 'auto_toggle');
for ($i=0; $i<count($wpvarstoreset); $i += 1) {
$wpvar = $wpvarstoreset[$i];
if (!isset($$wpvar)) {
if (empty($HTTP_POST_VARS["$wpvar"])) {
if (empty($HTTP_GET_VARS["$wpvar"])) {
$$wpvar = '';
} else {
$$b2var = $HTTP_GET_VARS["$b2var"];
$$wpvar = $HTTP_GET_VARS["$wpvar"];
}
} else {
$$b2var = $HTTP_POST_VARS["$b2var"];
$$wpvar = $HTTP_POST_VARS["$wpvar"];
}
}
}

View File

@ -41,21 +41,21 @@ if (!get_magic_quotes_gpc()) {
$HTTP_COOKIE_VARS = add_magic_quotes($HTTP_COOKIE_VARS);
}
$b2varstoreset = array('action','standalone','cat_id', 'linkurl', 'name', 'image',
$wpvarstoreset = array('action','standalone','cat_id', 'linkurl', 'name', 'image',
'description', 'visible', 'target', 'category', 'link_id',
'submit', 'order_by', 'links_show_cat_id', 'rating', 'rel',
'notes', 'linkcheck[]');
for ($i=0; $i<count($b2varstoreset); $i += 1) {
$b2var = $b2varstoreset[$i];
if (!isset($$b2var)) {
if (empty($HTTP_POST_VARS["$b2var"])) {
if (empty($HTTP_GET_VARS["$b2var"])) {
$$b2var = '';
for ($i=0; $i<count($wpvarstoreset); $i += 1) {
$wpvar = $wpvarstoreset[$i];
if (!isset($$wpvar)) {
if (empty($HTTP_POST_VARS["$wpvar"])) {
if (empty($HTTP_GET_VARS["$wpvar"])) {
$$wpvar = '';
} else {
$$b2var = $HTTP_GET_VARS["$b2var"];
$$wpvar = $HTTP_GET_VARS["$wpvar"];
}
} else {
$$b2var = $HTTP_POST_VARS["$b2var"];
$$wpvar = $HTTP_POST_VARS["$wpvar"];
}
}
}

View File

@ -1,6 +1,6 @@
<?php
require_once('../wp-config.php');
require_once($abspath.$b2inc.'/functions.php');
require_once(ABSPATH.WPINC.'/functions.php');
// columns we wish to find are: link_url, link_name, link_target, link_description
// we need to map XML attribute names to our columns

View File

@ -20,18 +20,18 @@ if (!get_magic_quotes_gpc()) {
$HTTP_COOKIE_VARS = add_magic_quotes($HTTP_COOKIE_VARS);
}
$b2varstoreset = array('action','item_ignored','item_deleted','item_approved');
for ($i=0; $i<count($b2varstoreset); $i += 1) {
$b2var = $b2varstoreset[$i];
if (!isset($$b2var)) {
if (empty($HTTP_POST_VARS["$b2var"])) {
if (empty($HTTP_GET_VARS["$b2var"])) {
$$b2var = '';
$wpvarstoreset = array('action','item_ignored','item_deleted','item_approved');
for ($i=0; $i<count($wpvarstoreset); $i += 1) {
$wpvar = $wpvarstoreset[$i];
if (!isset($$wpvar)) {
if (empty($HTTP_POST_VARS["$wpvar"])) {
if (empty($HTTP_GET_VARS["$wpvar"])) {
$$wpvar = '';
} else {
$$b2var = $HTTP_GET_VARS["$b2var"];
$$wpvar = $HTTP_GET_VARS["$wpvar"];
}
} else {
$$b2var = $HTTP_POST_VARS["$b2var"];
$$wpvar = $HTTP_POST_VARS["$wpvar"];
}
}
}

View File

@ -19,18 +19,18 @@ if (!get_magic_quotes_gpc()) {
$HTTP_COOKIE_VARS = add_magic_quotes($HTTP_COOKIE_VARS);
}
$b2varstoreset = array('action','standalone', 'option_group_id');
for ($i=0; $i<count($b2varstoreset); $i += 1) {
$b2var = $b2varstoreset[$i];
if (!isset($$b2var)) {
if (empty($HTTP_POST_VARS["$b2var"])) {
if (empty($HTTP_GET_VARS["$b2var"])) {
$$b2var = '';
$wpvarstoreset = array('action','standalone', 'option_group_id');
for ($i=0; $i<count($wpvarstoreset); $i += 1) {
$wpvar = $wpvarstoreset[$i];
if (!isset($$wpvar)) {
if (empty($HTTP_POST_VARS["$wpvar"])) {
if (empty($HTTP_GET_VARS["$wpvar"])) {
$$wpvar = '';
} else {
$$b2var = $HTTP_GET_VARS["$b2var"];
$$wpvar = $HTTP_GET_VARS["$wpvar"];
}
} else {
$$b2var = $HTTP_POST_VARS["$b2var"];
$$wpvar = $HTTP_POST_VARS["$wpvar"];
}
}
}

View File

@ -19,18 +19,18 @@ if (!get_magic_quotes_gpc()) {
$HTTP_COOKIE_VARS = add_magic_quotes($HTTP_COOKIE_VARS);
}
$b2varstoreset = array('action','standalone', 'option_group_id');
for ($i=0; $i<count($b2varstoreset); $i += 1) {
$b2var = $b2varstoreset[$i];
if (!isset($$b2var)) {
if (empty($HTTP_POST_VARS["$b2var"])) {
if (empty($HTTP_GET_VARS["$b2var"])) {
$$b2var = '';
$wpvarstoreset = array('action','standalone', 'option_group_id');
for ($i=0; $i<count($wpvarstoreset); $i += 1) {
$wpvar = $wpvarstoreset[$i];
if (!isset($$wpvar)) {
if (empty($HTTP_POST_VARS["$wpvar"])) {
if (empty($HTTP_GET_VARS["$wpvar"])) {
$$wpvar = '';
} else {
$$b2var = $HTTP_GET_VARS["$b2var"];
$$wpvar = $HTTP_GET_VARS["$wpvar"];
}
} else {
$$b2var = $HTTP_POST_VARS["$b2var"];
$$wpvar = $HTTP_POST_VARS["$wpvar"];
}
}
}

View File

@ -18,19 +18,19 @@ if (!get_magic_quotes_gpc()) {
$HTTP_COOKIE_VARS = add_magic_quotes($HTTP_COOKIE_VARS);
}
$b2varstoreset = array('action', 'safe_mode', 'withcomments', 'c', 'posts', 'poststart', 'postend', 'content', 'edited_post_title', 'comment_error', 'profile', 'trackback_url', 'excerpt', 'showcomments', 'commentstart', 'commentend', 'commentorder');
$wpvarstoreset = array('action', 'safe_mode', 'withcomments', 'c', 'posts', 'poststart', 'postend', 'content', 'edited_post_title', 'comment_error', 'profile', 'trackback_url', 'excerpt', 'showcomments', 'commentstart', 'commentend', 'commentorder');
for ($i=0; $i<count($b2varstoreset); $i += 1) {
$b2var = $b2varstoreset[$i];
if (!isset($$b2var)) {
if (empty($HTTP_POST_VARS["$b2var"])) {
if (empty($HTTP_GET_VARS["$b2var"])) {
$$b2var = '';
for ($i=0; $i<count($wpvarstoreset); $i += 1) {
$wpvar = $wpvarstoreset[$i];
if (!isset($$wpvar)) {
if (empty($HTTP_POST_VARS["$wpvar"])) {
if (empty($HTTP_GET_VARS["$wpvar"])) {
$$wpvar = '';
} else {
$$b2var = $HTTP_GET_VARS["$b2var"];
$$wpvar = $HTTP_GET_VARS["$wpvar"];
}
} else {
$$b2var = $HTTP_POST_VARS["$b2var"];
$$wpvar = $HTTP_POST_VARS["$wpvar"];
}
}
}

View File

@ -18,24 +18,24 @@ if (!get_magic_quotes_gpc()) {
$HTTP_COOKIE_VARS = add_magic_quotes($HTTP_COOKIE_VARS);
}
$b2varstoreset = array('action','standalone','redirect','profile','user');
for ($i=0; $i<count($b2varstoreset); $i += 1) {
$b2var = $b2varstoreset[$i];
if (!isset($$b2var)) {
if (empty($HTTP_POST_VARS["$b2var"])) {
if (empty($HTTP_GET_VARS["$b2var"])) {
$$b2var = '';
$wpvarstoreset = array('action','standalone','redirect','profile','user');
for ($i=0; $i<count($wpvarstoreset); $i += 1) {
$wpvar = $wpvarstoreset[$i];
if (!isset($$wpvar)) {
if (empty($HTTP_POST_VARS["$wpvar"])) {
if (empty($HTTP_GET_VARS["$wpvar"])) {
$$wpvar = '';
} else {
$$b2var = $HTTP_GET_VARS["$b2var"];
$$wpvar = $HTTP_GET_VARS["$wpvar"];
}
} else {
$$b2var = $HTTP_POST_VARS["$b2var"];
$$wpvar = $HTTP_POST_VARS["$wpvar"];
}
}
}
require_once('../wp-config.php');
require_once($abspath.$b2inc.'/functions.php');
require_once(ABSPATH.WPINC.'/functions.php');
switch($action) {

View File

@ -18,18 +18,18 @@ if (!get_magic_quotes_gpc()) {
$HTTP_COOKIE_VARS = add_magic_quotes($HTTP_COOKIE_VARS);
}
$b2varstoreset = array('action','standalone','redirect','profile','error','warning','a','file');
for ($i=0; $i<count($b2varstoreset); $i += 1) {
$b2var = $b2varstoreset[$i];
if (!isset($$b2var)) {
if (empty($HTTP_POST_VARS["$b2var"])) {
if (empty($HTTP_GET_VARS["$b2var"])) {
$$b2var = '';
$wpvarstoreset = array('action','standalone','redirect','profile','error','warning','a','file');
for ($i=0; $i<count($wpvarstoreset); $i += 1) {
$wpvar = $wpvarstoreset[$i];
if (!isset($$wpvar)) {
if (empty($HTTP_POST_VARS["$wpvar"])) {
if (empty($HTTP_GET_VARS["$wpvar"])) {
$$wpvar = '';
} else {
$$b2var = $HTTP_GET_VARS["$b2var"];
$$wpvar = $HTTP_GET_VARS["$wpvar"];
}
} else {
$$b2var = $HTTP_POST_VARS["$b2var"];
$$wpvar = $HTTP_POST_VARS["$wpvar"];
}
}
}

View File

@ -15,7 +15,7 @@ $allowed_types = explode(" ", trim($fileupload_allowedtypes));
?><html>
<head>
<title>WordPress :: upload images/files</title>
<link rel="stylesheet" href="<?php echo $b2inc; ?>/b2.css" type="text/css">
<link rel="stylesheet" href="<?php echo WPINC; ?>/b2.css" type="text/css">
<style type="text/css">
<!--
body {

View File

@ -2,18 +2,18 @@
$title = 'Users';
/* <Team> */
$b2varstoreset = array('action','standalone','redirect','profile');
for ($i=0; $i<count($b2varstoreset); $i += 1) {
$b2var = $b2varstoreset[$i];
if (!isset($$b2var)) {
if (empty($HTTP_POST_VARS["$b2var"])) {
if (empty($HTTP_GET_VARS["$b2var"])) {
$$b2var = '';
$wpvarstoreset = array('action','standalone','redirect','profile');
for ($i=0; $i<count($wpvarstoreset); $i += 1) {
$wpvar = $wpvarstoreset[$i];
if (!isset($$wpvar)) {
if (empty($HTTP_POST_VARS["$wpvar"])) {
if (empty($HTTP_GET_VARS["$wpvar"])) {
$$wpvar = '';
} else {
$$b2var = $HTTP_GET_VARS["$b2var"];
$$wpvar = $HTTP_GET_VARS["$wpvar"];
}
} else {
$$b2var = $HTTP_POST_VARS["$b2var"];
$$wpvar = $HTTP_POST_VARS["$wpvar"];
}
}
}

View File

@ -11,19 +11,19 @@ if (!file_exists($curpath . '/wp-config.php'))
require_once ($curpath.'/wp-config.php');
$b2varstoreset = array('m','p','posts','w','c', 'cat','withcomments','s','search','exact', 'sentence','poststart','postend','preview','debug', 'calendar','page','paged','more','tb', 'pb','author','order','orderby', 'year', 'monthnum', 'day', 'name', 'category_name');
$wpvarstoreset = array('m','p','posts','w','c', 'cat','withcomments','s','search','exact', 'sentence','poststart','postend','preview','debug', 'calendar','page','paged','more','tb', 'pb','author','order','orderby', 'year', 'monthnum', 'day', 'name', 'category_name');
for ($i=0; $i<count($b2varstoreset); $i += 1) {
$b2var = $b2varstoreset[$i];
if (!isset($$b2var)) {
if (empty($HTTP_POST_VARS[$b2var])) {
if (empty($HTTP_GET_VARS[$b2var])) {
$$b2var = '';
for ($i=0; $i<count($wpvarstoreset); $i += 1) {
$wpvar = $wpvarstoreset[$i];
if (!isset($$wpvar)) {
if (empty($HTTP_POST_VARS[$wpvar])) {
if (empty($HTTP_GET_VARS[$wpvar])) {
$$wpvar = '';
} else {
$$b2var = $HTTP_GET_VARS[$b2var];
$$wpvar = $HTTP_GET_VARS[$wpvar];
}
} else {
$$b2var = $HTTP_POST_VARS[$b2var];
$$wpvar = $HTTP_POST_VARS[$wpvar];
}
}
}

View File

@ -3,7 +3,7 @@
$blog = 1;
require ('wp-blog-header.php');
add_filter('comment_text', 'popuplinks');
foreach ($posts as $post) { start_b2();
foreach ($posts as $post) { start_wp();
?>
<!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">

View File

@ -12,7 +12,7 @@ require('wp-blog-header.php');
if (!isset($rss_language)) { $rss_language = 'en'; }
echo "<?xml version=\"1.0\"?".">";
?>
<!-- generator="wordpress/<?php echo $b2_version ?>" -->
<!-- generator="wordpress/<?php echo $wp_version ?>" -->
<rss version="2.0"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
@ -22,7 +22,7 @@ echo "<?xml version=\"1.0\"?".">";
<channel>
<?php
$i = 0;
foreach ($posts as $post) { start_b2();
foreach ($posts as $post) { start_wp();
if ($i < 1) {
$i++;
?>
@ -33,7 +33,7 @@ foreach ($posts as $post) { start_b2();
<dc:creator><?php echo antispambot($admin_email) ?></dc:creator>
<dc:rights>Copyright <?php echo mysql2date('Y', get_lastpostdate()); ?></dc:rights>
<dc:date><?php echo gmdate('Y-m-d\TH:i:s'); ?></dc:date>
<admin:generatorAgent rdf:resource="http://wordpress.org/?v=<?php echo $b2_version ?>"/>
<admin:generatorAgent rdf:resource="http://wordpress.org/?v=<?php echo $wp_version ?>"/>
<admin:errorReportsTo rdf:resource="mailto:<?php echo antispambot($admin_email) ?>"/>
<sy:updatePeriod>hourly</sy:updatePeriod>
<sy:updateFrequency>1</sy:updateFrequency>

View File

@ -26,7 +26,7 @@ $month['11']='November';
$month['12']='December';
// here's the conversion table, you can modify it if you know what you're doing
$b2smiliestrans = array(
$wpsmiliestrans = array(
' :)' => 'icon_smile.gif',
' :D' => 'icon_biggrin.gif',
' :-D' => 'icon_biggrin.gif',

View File

@ -19,8 +19,8 @@ $loginsql = DB_USER;
$passsql = DB_PASSWORD;
$base = DB_NAME;
$abspath = dirname(__FILE__).'/';
define('ABSPATH', dirname(__FILE__).'/');
// Get everything else
require_once($abspath.'wp-settings.php');
require_once(ABSPATH.'wp-settings.php');
?>

View File

@ -228,7 +228,7 @@ function get_weekstartend($mysqlstring, $start_of_week) {
function convert_chars($content,$flag='obsolete attribute left there for backwards compatibility') { // html/unicode entities output
global $use_htmltrans, $b2_htmltrans, $b2_htmltranswinuni;
global $use_htmltrans, $wp_htmltrans, $wp_htmltranswinuni;
// removes metadata tags
$content = preg_replace('/<title>(.+?)<\/title>/','',$content);
@ -241,12 +241,12 @@ function convert_chars($content,$flag='obsolete attribute left there for backwar
// converts HTML-entities to their display values in order to convert them again later
$content = preg_replace('/['.chr(127).'-'.chr(255).']/e', '"&#".ord(\'\0\').";"', $content );
$content = strtr($content, $b2_htmltrans);
$content = strtr($content, $wp_htmltrans);
// now converting: Windows CP1252 => Unicode (valid HTML)
// (if you've ever pasted text from MSWord, you'll understand)
$content = strtr($content, $b2_htmltranswinuni);
$content = strtr($content, $wp_htmltranswinuni);
}
@ -259,9 +259,9 @@ function convert_chars($content,$flag='obsolete attribute left there for backwar
}
function convert_bbcode($content) {
global $b2_bbcode, $use_bbcode;
global $wp_bbcode, $use_bbcode;
if ($use_bbcode) {
$content = preg_replace($b2_bbcode["in"], $b2_bbcode["out"], $content);
$content = preg_replace($wp_bbcode["in"], $wp_bbcode["out"], $content);
}
$content = convert_bbcode_email($content);
return $content;
@ -283,16 +283,16 @@ function convert_bbcode_email($content) {
}
function convert_gmcode($content) {
global $b2_gmcode, $use_gmcode;
global $wp_gmcode, $use_gmcode;
if ($use_gmcode) {
$content = preg_replace($b2_gmcode["in"], $b2_gmcode["out"], $content);
$content = preg_replace($wp_gmcode["in"], $wp_gmcode["out"], $content);
}
return $content;
}
function convert_smilies($text) {
global $smilies_directory, $use_smilies;
global $b2_smiliessearch, $b2_smiliesreplace;
global $wp_smiliessearch, $wp_smiliesreplace;
$output = '';
if ($use_smilies) {
// HTML loop taken from texturize function, could possible be consolidated
@ -301,7 +301,7 @@ function convert_smilies($text) {
for ($i = 0; $i < $stop; $i++) {
$content = $textarr[$i];
if ((strlen($content) > 0) && ('<' != $content{0})) { // If it's not a tag
$content = str_replace($b2_smiliessearch, $b2_smiliesreplace, $content);
$content = str_replace($wp_smiliessearch, $wp_smiliesreplace, $content);
}
$output .= $content;
}
@ -1030,7 +1030,7 @@ function debug_fclose($fp) {
function pingback($content, $post_ID) {
// original code by Mort (http://mort.mine.nu:8080)
global $siteurl, $blogfilename, $b2_version;
global $siteurl, $blogfilename, $wp_version;
$log = debug_fopen('./pingback.log', 'a');
$post_links = array();
debug_fwrite($log, 'BEGIN '.time()."\n");
@ -1099,7 +1099,7 @@ function pingback($content, $post_ID) {
}
// Send the GET request
$request = "GET $path HTTP/1.1\r\nHost: $host\r\nUser-Agent: b2/$b2_version PHP/" . phpversion() . "\r\n\r\n";
$request = "GET $path HTTP/1.1\r\nHost: $host\r\nUser-Agent: b2/$wp_version PHP/" . phpversion() . "\r\n\r\n";
ob_end_flush();
fputs($fp, $request);
@ -1553,7 +1553,7 @@ if (!function_exists('in_array')) {
}
}
function start_b2() {
function start_wp() {
global $post, $id, $postdata, $authordata, $day, $preview, $page, $pages, $multipage, $more, $numpages;
global $preview_userid,$preview_date,$preview_content,$preview_title,$preview_category,$preview_notify,$preview_make_clickable,$preview_autobr;
global $pagenow;
@ -1609,18 +1609,18 @@ function is_new_day() {
}
function apply_filters($tag, $string) {
global $b2_filter;
if (isset($b2_filter['all'])) {
$b2_filter['all'] = (is_string($b2_filter['all'])) ? array($b2_filter['all']) : $b2_filter['all'];
if (isset($b2_filter[$tag]))
$b2_filter[$tag] = array_merge($b2_filter['all'], $b2_filter[$tag]);
global $wp_filter;
if (isset($wp_filter['all'])) {
$wp_filter['all'] = (is_string($wp_filter['all'])) ? array($wp_filter['all']) : $wp_filter['all'];
if (isset($wp_filter[$tag]))
$wp_filter[$tag] = array_merge($wp_filter['all'], $wp_filter[$tag]);
else
$b2_filter[$tag] = array_merge($b2_filter['all'], array());
$b2_filter[$tag] = array_unique($b2_filter[$tag]);
$wp_filter[$tag] = array_merge($wp_filter['all'], array());
$wp_filter[$tag] = array_unique($wp_filter[$tag]);
}
if (isset($b2_filter[$tag])) {
$b2_filter[$tag] = (is_string($b2_filter[$tag])) ? array($b2_filter[$tag]) : $b2_filter[$tag];
$functions = $b2_filter[$tag];
if (isset($wp_filter[$tag])) {
$wp_filter[$tag] = (is_string($wp_filter[$tag])) ? array($wp_filter[$tag]) : $wp_filter[$tag];
$functions = $wp_filter[$tag];
foreach($functions as $function) {
//error_log("apply_filters #1 applying filter $function");
$string = $function($string);
@ -1630,9 +1630,9 @@ function apply_filters($tag, $string) {
}
function add_filter($tag, $function_to_add) {
global $b2_filter;
if (isset($b2_filter[$tag])) {
$functions = $b2_filter[$tag];
global $wp_filter;
if (isset($wp_filter[$tag])) {
$functions = $wp_filter[$tag];
if (is_array($functions)) {
foreach($functions as $function) {
$new_functions[] = $function;
@ -1644,25 +1644,25 @@ function add_filter($tag, $function_to_add) {
for no apparent reason
if (is_array($function_to_add)) {
foreach($function_to_add as $function) {
if (!in_array($function, $b2_filter[$tag])) {
if (!in_array($function, $wp_filter[$tag])) {
$new_functions[] = $function;
}
}
} else */if (is_string($function_to_add)) {
if (!@in_array($function_to_add, $b2_filter[$tag])) {
if (!@in_array($function_to_add, $wp_filter[$tag])) {
$new_functions[] = $function_to_add;
}
}
$b2_filter[$tag] = $new_functions;
$wp_filter[$tag] = $new_functions;
} else {
$b2_filter[$tag] = array($function_to_add);
$wp_filter[$tag] = array($function_to_add);
}
return true;
}
// Check for hacks file if the option is enabled
if (get_settings('hack_file')) {
if (file_exists($abspath . '/my-hacks.php'))
require($abspath . '/my-hacks.php');
if (file_exists(ABSPATH . '/my-hacks.php'))
require(ABSPATH . '/my-hacks.php');
}
?>

View File

@ -1464,15 +1464,15 @@ function comments_link($file='', $echo=true) {
}
function comments_popup_script($width=400, $height=400, $file='wp-comments-popup.php') {
global $b2commentspopupfile, $b2trackbackpopupfile, $b2pingbackpopupfile, $b2commentsjavascript;
$b2commentspopupfile = $file;
$b2commentsjavascript = 1;
global $wpcommentspopupfile, $wptrackbackpopupfile, $wppingbackpopupfile, $wpcommentsjavascript;
$wpcommentspopupfile = $file;
$wpcommentsjavascript = 1;
$javascript = "<script type='text/javascript'>\nfunction wpopen (macagna) {\n window.open(macagna, '_blank', 'width=$width,height=$height,scrollbars=yes,status=yes');\n}\n</script>\n";
echo $javascript;
}
function comments_popup_link($zero='No Comments', $one='1 Comment', $more='% Comments', $CSSclass='', $none='Comments Off') {
global $id, $b2commentspopupfile, $b2commentsjavascript, $post, $wpdb, $tablecomments, $HTTP_COOKIE_VARS, $cookiehash;
global $id, $wpcommentspopupfile, $wpcommentsjavascript, $post, $wpdb, $tablecomments, $HTTP_COOKIE_VARS, $cookiehash;
global $querystring_start, $querystring_equal, $querystring_separator, $siteurl;
$number = $wpdb->get_var("SELECT COUNT(*) FROM $tablecomments WHERE comment_post_ID = $id AND comment_approved = '1'");
if (0 == $number && 'closed' == $post->comment_status) {
@ -1486,8 +1486,8 @@ function comments_popup_link($zero='No Comments', $one='1 Comment', $more='% Com
}
}
echo '<a href="';
if ($b2commentsjavascript) {
echo $b2commentspopupfile.$querystring_start.'p'.$querystring_equal.$id.$querystring_separator.'c'.$querystring_equal.'1';
if ($wpcommentsjavascript) {
echo $wpcommentspopupfile.$querystring_start.'p'.$querystring_equal.$id.$querystring_separator.'c'.$querystring_equal.'1';
//echo get_permalink();
echo '" onclick="wpopen(this.href); return false"';
} else {

View File

@ -3,10 +3,10 @@
/* This file sets various arrays and variables for use in b2 */
#b2 version
$b2_version = '0.80';
$wp_version = '0.80';
#BBcode search and replace arrays
$b2_bbcode['in'] = array(
$wp_bbcode['in'] = array(
'#\[b](.+?)\[/b]#is', // Formatting tags
'#\[i](.+?)\[/i]#is',
'#\[u](.+?)\[/u]#is',
@ -20,7 +20,7 @@ $b2_bbcode['in'] = array(
# '#\[email](.+?)\[/email]#eis', // E-mail
# '#\[email=(.+?)](.+?)\[/email]#eis'
);
$b2_bbcode['out'] = array(
$wp_bbcode['out'] = array(
'<strong>$1</strong>', // Formatting tags
'<em>$1</em>',
'<span style="text-decoration:underline">$1</span>',
@ -36,22 +36,22 @@ $b2_bbcode['out'] = array(
);
#GreyMatter formatting search and replace arrays
$b2_gmcode['in'] = array(
$wp_gmcode['in'] = array(
'#\\*\*(.+?)\\*\*#is', // **bold**
'#\\\\(.+?)\\\\#is', // \\italic\\
'#\__(.+?)\__#is' // __underline__
);
$b2_gmcode['out'] = array(
$wp_gmcode['out'] = array(
'<strong>$1</strong>',
'<em>$1</em>',
'<span style="text-decoration:underline">$1</span>'
);
#Translation of HTML entities and special characters
$b2_htmltrans = array_flip(get_html_translation_table(HTML_ENTITIES));
$b2_htmltrans['<'] = '<'; # preserve HTML
$b2_htmltrans['>'] = '>'; # preserve HTML
$b2_htmltransbis = array(
$wp_htmltrans = array_flip(get_html_translation_table(HTML_ENTITIES));
$wp_htmltrans['<'] = '<'; # preserve HTML
$wp_htmltrans['>'] = '>'; # preserve HTML
$wp_htmltransbis = array(
'' => '&#8211;',
'—' => '&#8212;',
'' => '&#8216;',
@ -95,10 +95,10 @@ $b2_htmltransbis = array(
'&supe;' => '&#8839;', '&oplus;' => '&#8853;', '&otimes;' => '&#8855;', '&perp;' => '&#8869;', '&sdot;' => '&#8901;', '&lceil;' => '&#8968;', '&rceil;' => '&#8969;', '&lfloor;' => '&#8970;', '&rfloor;' => '&#8971;', '&lang;' => '&#9001;',
'&rang;' => '&#9002;', '&loz;' => '&#9674;', '&spades;' => '&#9824;', '&clubs;' => '&#9827;', '&hearts;' => '&#9829;', '&diams;' => '&#9830;'
);
$b2_htmltrans = array_merge($b2_htmltrans,$b2_htmltransbis);
$wp_htmltrans = array_merge($wp_htmltrans,$wp_htmltransbis);
#Translation of invalid Unicode references range to valid range
$b2_htmltranswinuni = array(
$wp_htmltranswinuni = array(
'&#128;' => '&#8364;', // the Euro sign
'&#129;' => '',
'&#130;' => '&#8218;', // these are Windows CP1252 specific characters
@ -164,28 +164,28 @@ if (preg_match('/Lynx/', $HTTP_USER_AGENT)) {
$is_IE = (($is_macIE) || ($is_winIE));
# browser-specific javascript corrections
$b2_macIE_correction['in'] = array(
$wp_macIE_correction['in'] = array(
'/\%uFFD4/', '/\%uFFD5/', '/\%uFFD2/', '/\%uFFD3/',
'/\%uFFA5/', '/\%uFFD0/', '/\%uFFD1/', '/\%uFFBD/',
'/\%uFF83%uFFC0/', '/\%uFF83%uFFC1/', '/\%uFF83%uFFC6/', '/\%uFF83%uFFC9/',
'/\%uFFB9/', '/\%uFF81%uFF8C/', '/\%uFF81%uFF8D/', '/\%uFF81%uFFDA/',
'/\%uFFDB/'
);
$b2_macIE_correction['out'] = array(
$wp_macIE_correction['out'] = array(
'&lsquo;', '&rsquo;', '&ldquo;', '&rdquo;',
'&bull;', '&ndash;', '&mdash;', '&Omega;',
'&beta;', '&gamma;', '&theta;', '&lambda;',
'&pi;', '&prime;', '&Prime;', '&ang;',
'&euro;'
);
$b2_gecko_correction['in'] = array(
$wp_gecko_correction['in'] = array(
'/\‘/', '/\’/', '/\“/', '/\â€<C3A2>/',
'/\•/', '/\–/', '/\—/', '/\Ω/',
'/\β/', '/\γ/', '/\θ/', '/\λ/',
'/\Ï€/', '/\′/', '/\″/', '/\âˆ/',
'/\€/', '/\ /'
);
$b2_gecko_correction['out'] = array(
$wp_gecko_correction['out'] = array(
'&8216;', '&rsquo;', '&ldquo;', '&rdquo;',
'&bull;', '&ndash;', '&mdash;', '&Omega;',
'&beta;', '&gamma;', '&theta;', '&lambda;',
@ -198,8 +198,8 @@ $is_Apache = strstr($HTTP_SERVER_VARS['SERVER_SOFTWARE'], 'Apache') ? 1 : 0;
$is_IIS = strstr($HTTP_SERVER_VARS['SERVER_SOFTWARE'], 'Microsoft-IIS') ? 1 : 0;
# if the config file does not provide the smilies array, let's define it here
if (!isset($b2smiliestrans)) {
$b2smiliestrans = array(
if (!isset($wpsmiliestrans)) {
$wpsmiliestrans = array(
' :)' => 'icon_smile.gif',
' :D' => 'icon_biggrin.gif',
' :-D' => 'icon_biggrin.gif',
@ -257,16 +257,16 @@ if (!function_exists('smiliescmp')) {
return (strlen($a) > strlen($b)) ? -1 : 1;
}
}
uksort($b2smiliestrans, 'smiliescmp');
uksort($wpsmiliestrans, 'smiliescmp');
# generates smilies' search & replace arrays
foreach($b2smiliestrans as $smiley => $img) {
$b2_smiliessearch[] = $smiley;
foreach($wpsmiliestrans as $smiley => $img) {
$wp_smiliessearch[] = $smiley;
$smiley_masked = '';
for ($i = 0; $i < strlen($smiley); $i = $i + 1) {
$smiley_masked .= substr($smiley, $i, 1).chr(160);
}
$b2_smiliesreplace[] = "&nbsp;<img src='$smilies_directory/$img' alt='$smiley_masked' />";
$wp_smiliesreplace[] = "&nbsp;<img src='$smilies_directory/$img' alt='$smiley_masked' />";
}
add_filter('all', 'wptexturize');

View File

@ -7,7 +7,7 @@ include('wp-blog-header.php');
$start = count($posts)-1;
for ($i = $start; $i >= 0; $i--) {
$post = $posts[$i];
start_b2();
start_wp();
if ((get_Lon() != null) && (get_Lon > -360) && (get_Lon() < 360 )) {
?>
<location arrival="<?php the_date_xml() ?>">

View File

@ -20,19 +20,19 @@ if (!get_magic_quotes_gpc()) {
$HTTP_COOKIE_VARS = add_magic_quotes($HTTP_COOKIE_VARS);
}
$b2varstoreset = array('action','mode','error','text','popupurl','popuptitle');
$wpvarstoreset = array('action','mode','error','text','popupurl','popuptitle');
for ($i = 0; $i < count($b2varstoreset); $i = $i + 1) {
$b2var = $b2varstoreset[$i];
if (!isset($$b2var)) {
if (empty($HTTP_POST_VARS["$b2var"])) {
if (empty($HTTP_GET_VARS["$b2var"])) {
$$b2var = '';
for ($i = 0; $i < count($wpvarstoreset); $i = $i + 1) {
$wpvar = $wpvarstoreset[$i];
if (!isset($$wpvar)) {
if (empty($HTTP_POST_VARS["$wpvar"])) {
if (empty($HTTP_GET_VARS["$wpvar"])) {
$$wpvar = '';
} else {
$$b2var = $HTTP_GET_VARS["$b2var"];
$$wpvar = $HTTP_GET_VARS["$wpvar"];
}
} else {
$$b2var = $HTTP_POST_VARS["$b2var"];
$$wpvar = $HTTP_POST_VARS["$wpvar"];
}
}
}

View File

@ -1,7 +1,7 @@
<?php
require(dirname(__FILE__) . '/wp-config.php');
require_once($abspath.$b2inc.'/class-pop3.php');
require_once(ABSPATH.WPINC.'/class-pop3.php');
timer_start();

View File

@ -20,7 +20,7 @@ add_filter('the_content', 'trim');
if (!isset($rss_language)) { $rss_language = 'en'; }
?>
<?php echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?".">"; ?>
<!-- generator="wordpress/<?php echo $b2_version ?>" -->
<!-- generator="wordpress/<?php echo $wp_version ?>" -->
<rdf:RDF
xmlns="http://purl.org/rss/1.0/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
@ -36,20 +36,20 @@ if (!isset($rss_language)) { $rss_language = 'en'; }
<dc:language><?php echo $rss_language ?></dc:language>
<dc:date><?php echo gmdate('Y-m-d\TH:i:s'); ?></dc:date>
<dc:creator><?php echo antispambot($admin_email) ?></dc:creator>
<admin:generatorAgent rdf:resource="http://wordpress.org/?v=<?php echo $b2_version ?>"/>
<admin:generatorAgent rdf:resource="http://wordpress.org/?v=<?php echo $wp_version ?>"/>
<admin:errorReportsTo rdf:resource="mailto:<?php echo antispambot($admin_email) ?>"/>
<sy:updatePeriod>hourly</sy:updatePeriod>
<sy:updateFrequency>1</sy:updateFrequency>
<sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>
<items>
<rdf:Seq>
<?php $items_count = 0; if ($posts) { foreach ($posts as $post) { start_b2(); ?>
<?php $items_count = 0; if ($posts) { foreach ($posts as $post) { start_wp(); ?>
<rdf:li rdf:resource="<?php permalink_single_rss() ?>"/>
<?php $b2_items[] = $row; $items_count++; if (($items_count == $posts_per_rss) && empty($m)) { break; } } } ?>
<?php $wp_items[] = $row; $items_count++; if (($items_count == $posts_per_rss) && empty($m)) { break; } } } ?>
</rdf:Seq>
</items>
</channel>
<?php if ($posts) { foreach ($posts as $post) { start_b2(); ?>
<?php if ($posts) { foreach ($posts as $post) { start_wp(); ?>
<item rdf:about="<?php permalink_single_rss() ?>">
<title><?php the_title_rss() ?></title>
<link><?php permalink_single_rss() ?></link>

View File

@ -18,18 +18,18 @@ if (!get_magic_quotes_gpc()) {
$HTTP_COOKIE_VARS = add_magic_quotes($HTTP_COOKIE_VARS);
}
$b2varstoreset = array('action');
for ($i=0; $i<count($b2varstoreset); $i += 1) {
$b2var = $b2varstoreset[$i];
if (!isset($$b2var)) {
if (empty($HTTP_POST_VARS["$b2var"])) {
if (empty($HTTP_GET_VARS["$b2var"])) {
$$b2var = '';
$wpvarstoreset = array('action');
for ($i=0; $i<count($wpvarstoreset); $i += 1) {
$wpvar = $wpvarstoreset[$i];
if (!isset($$wpvar)) {
if (empty($HTTP_POST_VARS["$wpvar"])) {
if (empty($HTTP_GET_VARS["$wpvar"])) {
$$wpvar = '';
} else {
$$b2var = $HTTP_GET_VARS["$b2var"];
$$wpvar = $HTTP_GET_VARS["$wpvar"];
}
} else {
$$b2var = $HTTP_POST_VARS["$b2var"];
$$wpvar = $HTTP_POST_VARS["$wpvar"];
}
}
}

View File

@ -22,7 +22,7 @@ if (!isset($rss_encoded_html)) { $rss_encoded_html = 0; }
if (!isset($rss_excerpt_length) || ($rss_encoded_html == 1)) { $rss_excerpt_length = 0; }
?>
<?php echo "<?xml version=\"1.0\"?".">"; ?>
<!-- generator="wordpress/<?php echo $b2_version ?>" -->
<!-- generator="wordpress/<?php echo $wp_version ?>" -->
<rss version="0.92">
<channel>
<title><?php bloginfo_rss("name") ?></title>
@ -34,7 +34,7 @@ if (!isset($rss_excerpt_length) || ($rss_encoded_html == 1)) { $rss_excerpt_leng
<webMaster><?php echo antispambot($admin_email) ?></webMaster>
<language><?php echo $rss_language ?></language>
<?php $items_count = 0; if ($posts) { foreach ($posts as $post) { start_b2(); ?>
<?php $items_count = 0; if ($posts) { foreach ($posts as $post) { start_wp(); ?>
<item>
<title><?php the_title_rss() ?></title>
<?php

View File

@ -23,7 +23,7 @@ if (!isset($rss_encoded_html)) { $rss_encoded_html = 0; }
if (!isset($rss_excerpt_length) || ($rss_encoded_html == 1)) { $rss_excerpt_length = 0; }
?>
<?php echo '<?xml version="1.0"?'.'>'; ?>
<!-- generator="wordpress/<?php echo $b2_version ?>" -->
<!-- generator="wordpress/<?php echo $wp_version ?>" -->
<rss version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/">
@ -34,9 +34,9 @@ if (!isset($rss_excerpt_length) || ($rss_encoded_html == 1)) { $rss_excerpt_leng
<language><?php echo $rss_language ?></language>
<copyright>Copyright <?php echo mysql2date('Y', get_lastpostdate()); ?></copyright>
<pubDate><?php echo gmdate('r'); ?></pubDate>
<generator>http://wordpress.org/?v=<?php echo $b2_version ?>"</generator>
<generator>http://wordpress.org/?v=<?php echo $wp_version ?>"</generator>
<?php $items_count = 0; if ($posts) { foreach ($posts as $post) { start_b2(); ?>
<?php $items_count = 0; if ($posts) { foreach ($posts as $post) { start_wp(); ?>
<item>
<title><?php the_title_rss() ?></title>
<link><?php permalink_single_rss() ?></link>

View File

@ -19,15 +19,15 @@ $tableoptiongroups = $table_prefix . 'optiongroups';
$tableoptiongroup_options = $table_prefix . 'optiongroup_options';
// This is the name of the include directory. No "/" allowed.
$b2inc = 'wp-includes';
define('WPINC', 'wp-includes');
require ($abspath . 'wp-config-extra.php');
require ($abspath . $b2inc . '/wp-db.php');
require ($abspath . $b2inc . '/functions.php');
require ($abspath . $b2inc . '/template-functions.php');
require ($abspath . $b2inc . '/class-xmlrpc.php');
require ($abspath . $b2inc . '/class-xmlrpcs.php');
require ($abspath . '/wp-links/links.php');
require (ABSPATH . 'wp-config-extra.php');
require (ABSPATH . WPINC . '/wp-db.php');
require (ABSPATH . WPINC . '/functions.php');
require (ABSPATH . WPINC . '/template-functions.php');
require (ABSPATH . WPINC . '/class-xmlrpc.php');
require (ABSPATH . WPINC . '/class-xmlrpcs.php');
require (ABSPATH . '/wp-links/links.php');
//setup the old globals from b2config.php
//
@ -97,5 +97,5 @@ if (!isset($_wp_installing) || !$_wp_installing) {
} //end !$_wp_installing
require ($abspath . $b2inc . '/vars.php');
require (ABSPATH . WPINC . '/vars.php');
?>

4
wp.php
View File

@ -8,7 +8,7 @@ require_once("wp-blog-header.php");
<title><?php bloginfo('name') ?><?php single_post_title(' :: ') ?><?php single_cat_title(' :: ') ?><?php single_month_title(' :: ') ?></title>
<!-- Change charset if needed(?) But please do not remove this metatag -->
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="generator" content="WordPress <?php $b2_version ?>" /> <!-- leave this for stats -->
<meta name="generator" content="WordPress <?php $wp_version ?>" /> <!-- leave this for stats -->
<meta http-equiv="reply-to" content="you@somewhere.zzz" />
<link rel="alternate" type="text/xml" title="RDF" href="<?php bloginfo('rdf_url'); ?>" />
<link rel="alternate" type="text/xml" title="RSS" href="<?php bloginfo('rss2_url'); ?>" />
@ -18,7 +18,7 @@ require_once("wp-blog-header.php");
<h1 id="header"><a href="<?php echo $siteurl; ?>" title="<?php bloginfo('name'); ?>"><?php bloginfo('name'); ?></a></h1>
<!-- // loop start -->
<?php foreach ($posts as $post) { start_b2(); ?>
<?php foreach ($posts as $post) { start_wp(); ?>
<?php the_date("d.m.y","<h2>","</h2>"); ?>
<h3 class="storytitle" id="post-<?php the_ID(); ?>"><a href="<?php echo get_permalink() ?>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_title(); ?></a></h3>