The great renaming.

git-svn-id: http://svn.automattic.com/wordpress/trunk@601 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
saxmatt 2003-12-11 00:22:36 +00:00
parent 089dda9710
commit 43e4a8a930
72 changed files with 832 additions and 830 deletions

View File

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

View File

@ -8,9 +8,9 @@ $wpsmarty->template_dir = './wp-blogs/main/templates';
$wpsmarty->compile_dir = './wp-blogs/main/templates_c';
$wpsmarty->cache_dir = './wp-blogs/main/smartycache';
$wpsmarty->plugin_dir = './wp-plugins';
require_once( 'b2-include/smarty.inc.php' );
require_once( 'b2-include/class-smarty.php' );
$blog = 1;
require_once('blog.header.php');
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');
@ -26,7 +26,7 @@ if($posts)
start_b2();
$content .= $wpsmarty->fetch( 'post.html' );
ob_start();
include($abspath . 'b2comments.php');
include($abspath . 'wp-comments.php');
$txt = ob_get_contents();
ob_end_clean();
$content .= $txt;

View File

@ -1,8 +1,7 @@
<?php /* Don't remove these lines, they call the b2 function files ! */
<?php
/* Don't remove these lines. */
$blog = 1;
require_once('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('wp-blog-header.php');
?>
<!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">
@ -52,7 +51,7 @@ require_once($abspath.'wp-links/links.php');
<?php trackback_rdf(); ?>
-->
<?php include($abspath . 'b2comments.php'); ?>
<?php include($abspath . 'wp-comments.php'); ?>
</div>
<?php } } else { // end foreach, end if any posts ?>
@ -93,7 +92,7 @@ require_once($abspath.'wp-links/links.php');
</li>
<li>Other:
<ul>
<li><a href="<?php echo $siteurl; ?>/b2login.php">login</a></li>
<li><a href="<?php echo $siteurl; ?>/wp-login.php">login</a></li>
<li><a href="<?php echo $siteurl; ?>/b2register.php">register</a></li>
</ul>
</li>

View File

@ -62,12 +62,12 @@
<li>Copy wp-config.sample.php to wp-config.php. Open wp-config.php in a text editor and modify the variables as explained in the comments. Comments are lines that start with <code>/*</code> or <code>//</code></li>
<li>Upload everything. This release is designed to sit in your root folder, IE the folder where your WordPress-powered page will reside.</li>
<li>The weblogs.com cache file needs to be writable by the web server. <a href="http://www.evolt.org/article/A_quick_and_dirty_chmod_Tutorial/18/541/">CHMOD 666</a> the <code>weblogs.com.changes.cache</code> file. </li>
<li> Launch <a href="wp-admin/wp-install.php">wp-admin/wp-install.php</a> in your browser. This should setup the MySQL database for your blog. If there is an error, double check your wp-config.php file, and try again. If it fails again, please go to the <a href="http://wordpress.org/support/">support forums</a> and make a post with all the information about the failure (error messages, etc), and your setup (the PHP and MySQL versions on your server, and the browser you were using). <strong>Note the password given to you.</strong></li>
<li> Go to <a href="b2login.php">b2login.php</a> and sign in with the login "admin" and the password given to you by the install script. Then click on the menu 'My Profile', and change the password. Note: you need javascript enabled to launch the profile popup window.</li>
<li> Launch <a href="wp-admin/install.php">wp-admin/install.php</a> in your browser. This should setup the MySQL database for your blog. If there is an error, double check your wp-config.php file, and try again. If it fails again, please go to the <a href="http://wordpress.org/support/">support forums</a> and make a post with all the information about the failure (error messages, etc), and your setup (the PHP and MySQL versions on your server, and the browser you were using). <strong>Note the password given to you.</strong></li>
<li> Go to <a href="wp-login.php">wp-login.php</a> and sign in with the login "admin" and the password given to you by the install script. Then click on the menu 'My Profile', and change the password. Note: you need javascript enabled to launch the profile popup window.</li>
</ol>
<h2>Some notes:</h2>
<ul>
<li>Whenever you want to post something, just open a browser and go to b2login.php to log in and post.</li>
<li>Whenever you want to post something, just open a browser and go to wp-login.php to log in and post.</li>
<li>You can also use a bookmarklet and/or a sidebar (IE5+/NS6+) to post.</li>
<li> You can also post through the Blogger, MetaWeblog, and MovableType APIs, <a href="#xmlrpc">click here</a> for more info.</li>
<li> Your site's blog is on b2.php (simple template) and index.php (CSS template), you can rename this file to index.php or any other name you fancy (provided it bears the php extension or is interpreted as a php file by your server).</li>
@ -87,9 +87,9 @@
<ul>
<li>Enclosed is an example of a template, in the file b2.php. You can rename this file to "index.php"or something else (recent b2 versions have a default index.php, which is an elaborate CSS-based template).</li>
<li>You can have any number of template files, since all they do is extract the posts from the database.</li>
<li>Pseudo-template for the comments is in b2comments.php. You needn't rename this file, but you can edit it.</li>
<li>Pseudo-template for the comments is in wp-comments.php. You needn't rename this file, but you can edit it.</li>
<li>The only thing to remember is that it's not actually a template, but a PHP file that you're manipulating. So when you see "don't delete this line", you know you mustn't, unless you want to have a broken page.</li>
<li>Required lines are: the first lines that call blog.header.php, the lines with the "while" statement, and the ones with just "}" (it ends the while loop).</li>
<li>Required lines are: the first lines that call wp-blog-header.php, the lines with the "while" statement, and the ones with just "}" (it ends the while loop).</li>
<li>Between the "while" line and the "}", is the template for your posts.</li>
</ul>
<h2>Notes about parameters:</h2>
@ -429,14 +429,14 @@ You should put this tag before the &lt;/head&gt; tag in your template.<br />
<ul>
<li>width (default is 400)</li>
<li>height (default is 400)</li>
<li>file name, in case you want to use a different template for comments (default is b2commentspopup.php)</li>
<li>file name, in case you want to use a different template for comments (default is wp-comments-popup.php)</li>
</ul>
</div>
<br />
<br />
<strong>&lt;?php comments_popup_link() ?&gt;</strong><br />
This will display the link to open comments in a popup window, with the number of comments.<br />
To edit the popup window's template, edit the file b2commentspopup.php (it's the default one for comments popup).<br />
To edit the popup window's template, edit the file wp-comments-popup.php (it's the default one for comments popup).<br />
<br />
<br />
<div class="params">Parameters:
@ -480,12 +480,12 @@ Example: <em>&lt;?php comments_number("no comment","1 comment","% comments") ?&g
<br />
This tag differs from v0.5's tag because in v0.5 and prior, it would only display a number, not a text with it, so you could have terrible things like "1 comments" (doh !)<br />
<br />
<strong>Necessary: &lt;?php include("b2comments.php") ?&gt;</strong><br />
<strong>Necessary: &lt;?php include("wp-comments.php") ?&gt;</strong><br />
you'll put this line where you want the comments to be placed on your page.<br />
typically, under the post itself. don't worry, the comments only appear if the page is called in the comments mode. (like this: url?c=1)<br />
<br />
<br />
<strong>Tags that go in b2comments.php:</strong> (these are easy too)<br />
<strong>Tags that go in wp-comments.php:</strong> (these are easy too)<br />
<br />
<strong>&lt;?php comment_author() ?&gt;</strong><br />
<strong>&lt;?php comment_author_email() ?&gt; </strong> - displays the e-mail address, but not the link<br />
@ -514,7 +514,7 @@ typically, under the post itself. don't worry, the comments only appear if the p
<strong>&lt;?php trackback_url() ?&gt; </strong><br />
This tag is out of the b2 TrackBacks loop.<br />
It will output the URL to TrackBack the post, that other people can copy and use in b2's posting interface to trackback this post.<br />
<p> In b2comments.php, like in the main template file, please keep the first PHP lines, the "while" lines, and the "}" lines.</p>
<p> In wp-comments.php, like in the main template file, please keep the first PHP lines, the "while" lines, and the "}" lines.</p>
<p>You can modify the form, but do not remove "&lt;?php echo ... ?&gt;" and all the name="..." attributes.</p>
<br />
<p><strong>To include your archives:</strong></p>
@ -595,7 +595,7 @@ here is the code for a simple search box:</p>
<br />
Extended entries in the <a href="http://www.movabletype.org/docs/mtmanual_programmatic.html">MovableType API</a> are automatically converted to/from the WordPress &lt;!--more--&gt; tag.<br />
<p>You can now post to your b2 blog with tools like <a href="http://blogbuddy.sourceforge.net">BlogBuddy</a>, <a href="http://bloggar.com/">Bloggar</a>, <a href="http://www.ubique.ch/wapblogger/">WapBlogger</a> (post from your Wap cellphone!), <a href="http://radio.userland.com">Radio Userland</a> (which means you can use Radio's email-to-blog feature), <a href="http://www.zempt.com/">Zempt</a>, <a href="http://www.newzcrawler.com/">NewzCrawler</a>, and other tools that support the Blogging APIs! :)</p>
<p>Your XMLRPC server/path are as described here: if you login to b2 on http://example.com/me/b2login.php, then you have:</p>
<p>Your XMLRPC server/path are as described here: if you login to b2 on http://example.com/me/wp-login.php, then you have:</p>
<ul>
<li>server: http://example.com/ (some tools will just want the 'example.com' hostname part)</li>
<li>path: /me/xmlrpc.php</li>
@ -605,8 +605,8 @@ Extended entries in the <a href="http://www.movabletype.org/docs/mtmanual_progra
<h1 id="postviaemail">Post via Email:</h1>
<p>You can post news from an email client!<br />
But first you'll have to edit the options on the options screen, filling the appropriate values for your POP3 email account (this interface doesn't support IMAP yet, only POP3, sorry).</p>
<p> Once you have edited the options, you can make your webserver execute b2mail.php every set amount of time (depending on your host's performance, this script can be resource intensive, so don't make it run every minute or you'll be kicked).</p>
<p>You can do it with Cron-jobs, or if your host doesn't support it you can look into the various website-monitoring services, and make them check your b2mail.php URL.</p>
<p> Once you have edited the options, you can make your webserver execute wp-mail.php every set amount of time (depending on your host's performance, this script can be resource intensive, so don't make it run every minute or you'll be kicked).</p>
<p>You can do it with Cron-jobs, or if your host doesn't support it you can look into the various website-monitoring services, and make them check your wp-mail.php URL.</p>
<h2> Preliminary advice:</h2>
<p> It is strongly advised to send your email as text-only (Outlook and Outlook Express default to 'html', which may cause problems), but HTML email could work (the script would strip all your html tags though...).</p>
<p>It is also advised not to use your public email address, but create a new one especially for this script. If you use your public email address and the script goes crazy posting every email on your blog and deleting all your emails, I can't take responsibility for this.</p>

View File

@ -1,12 +1,7 @@
<?php
require_once('../wp-config.php');
require_once($abspath.$b2inc.'/b2template.functions.php');
require_once($abspath.'/wp-admin/b2verifauth.php');
require_once($abspath.$b2inc.'/b2vars.php');
require_once($abspath.$b2inc.'/b2functions.php');
require_once($abspath.$b2inc.'/xmlrpc.inc');
require_once($abspath.$b2inc.'/xmlrpcs.inc');
require_once($abspath.'/wp-admin/auth.php');
function gethelp_link($this_file, $helptag) {
$url = 'http://wordpress.org/docs/reference/links/#'.$helptag;
@ -77,11 +72,11 @@ setTimeout("redirect();", 600);
<!-- hiding from old terrible browsers
function profile(userID) {
window.open ("b2profile.php?action=viewprofile&user="+userID, "Profile", "width=500, height=450, location=0, menubar=0, resizable=0, scrollbars=1, status=1, titlebar=0, toolbar=0, screenX=60, left=60, screenY=60, top=60");
window.open ("profile.php?action=viewprofile&user="+userID, "Profile", "width=500, height=450, location=0, menubar=0, resizable=0, scrollbars=1, status=1, titlebar=0, toolbar=0, screenX=60, left=60, screenY=60, top=60");
}
function launchupload() {
window.open ("b2upload.php", "b2upload", "width=380,height=360,location=0,menubar=0,resizable=1,scrollbars=yes,status=1,toolbar=0");
window.open ("upload.php", "b2upload", "width=380,height=360,location=0,menubar=0,resizable=1,scrollbars=yes,status=1,toolbar=0");
}
function helpWindow(url) {
@ -96,7 +91,7 @@ setTimeout("redirect();", 600);
<?php
if ($profile==0) {
include('b2menutop.php');
include('menu.php');
}
?>

View File

@ -41,7 +41,7 @@ function veriflog() {
if (!empty($HTTP_COOKIE_VARS["wordpressuser_".$cookiehash])) {
$error="<strong>Error</strong>: wrong login or password";
}
$redir = "Location: $siteurl/b2login.php?redirect_to=" . urlencode($HTTP_SERVER_VARS["REQUEST_URI"]);
$redir = "Location: $siteurl/wp-login.php?redirect_to=" . urlencode($HTTP_SERVER_VARS["REQUEST_URI"]);
header($redir);
exit();
}

View File

@ -1,206 +0,0 @@
<?php
$title = 'Team management';
/* <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 = '';
} else {
$$b2var = $HTTP_GET_VARS["$b2var"];
}
} else {
$$b2var = $HTTP_POST_VARS["$b2var"];
}
}
}
switch ($action) {
case 'promote':
$standalone = 1;
require_once('b2header.php');
if (empty($HTTP_GET_VARS["prom"])) {
header('Location: b2team.php');
}
$id = $HTTP_GET_VARS["id"];
$prom = $HTTP_GET_VARS["prom"];
$user_data = get_userdata($id);
$usertopromote_level = $user_data->user_level;
if ($user_level <= $usertopromote_level) {
die('Can&#8217;t change the level of a user whose level is higher than yours.');
}
if ('up' == $prom) {
$sql="UPDATE $tableusers SET user_level=user_level+1 WHERE ID = $id";
} elseif ('down' == $prom) {
$sql="UPDATE $tableusers SET user_level=user_level-1 WHERE ID = $id";
}
$result = $wpdb->query($sql);
header('Location: b2team.php');
break;
case 'delete':
$standalone = 1;
require_once('b2header.php');
$id = $HTTP_GET_VARS["id"];
if (!$id) {
header('Location: b2team.php');
}
$user_data = get_userdata($id);
$usertodelete_level = $user_data->user_level;
if ($user_level <= $usertodelete_level)
die('Can&#8217;t delete a user whose level is higher than yours.');
$sql = "DELETE FROM $tableusers WHERE ID = $id";
$result = $wpdb->query($sql) or die("Couldn&#8217;t delete user #$id.");
$sql = "DELETE FROM $tableposts WHERE post_author = $id";
$result = $wpdb->query($sql) or die("Couldn&#8217;t delete user #$id&#8217;s posts.");
header('Location: b2team.php');
break;
default:
$standalone = 0;
include ('b2header.php');
?>
<div class="wrap"><p>Click on a user&#8217;s login name to see his complete profile.<br />
To edit your profile, click on your login name.</p>
</div>
<div class="wrap">
<h3>Active users</h3>
<table cellpadding="5" cellspacing="0">
<tr>
<th>ID</th>
<th>Nickname</th>
<th>Name</th>
<th>E-mail</th>
<th>URL</th>
<th>Level</th>
<?php if ($user_level > 3) { ?>
<th>Login</th>
<?php } ?>
</tr>
<?php
$users = $wpdb->get_results("SELECT ID FROM $tableusers WHERE user_level>0 ORDER BY ID");
foreach ($users as $user) {
$user_data = get_userdata($user->ID);
echo "<tr>\n<!--".$user_data->user_login."-->\n";
$email = $user_data->user_email;
$url = $user_data->user_url;
$bg1 = ($user_data->user_login == $user_login) ? "bgcolor=\"#ffffff\"" : "bgcolor=\"#dddddd\"";
$bg2 = ($user_data->user_login == $user_login) ? "bgcolor=\"#ffffff\"" : "bgcolor=\"#eeeeee\"";
echo "<td $bg1>".$user_data->ID."</td>\n";
echo "<td $bg2><b><a href=\"javascript:profile(".$user_data->ID.")\">".$user_data->user_nickname."</a></b></td>\n";
echo "<td $bg1>".$user_data->user_firstname."&nbsp;".$user_data->user_lastname."</td>\n";
echo "<td $bg2>&nbsp;<a href=\"mailto:$email\" title=\"e-mail: $email\"><img src='../b2-img/email.gif' border=\"0\" alt=\"e-mail: $email\" /></a>&nbsp;</td>";
echo "<td $bg1>&nbsp;";
if (($user_data->user_url != "http://") and ($user_data->user_url != ""))
echo "<a href=\"$url\" target=\"_blank\" title=\"website: $url\"><img src=\"../b2-img/url.gif\" border=\"0\" alt=\"website: $url\" /></a>&nbsp;";
echo "</td>\n";
echo "<td $bg2>".$user_data->user_level;
if (($user_level >= 2) and ($user_level > ($user_data->user_level + 1)))
echo " <a href=\"b2team.php?action=promote&id=".$user_data->ID."&prom=up\">+</a> ";
if (($user_level >= 2) and ($user_level > $user_data->user_level) and ($user_data->user_level > 0))
echo " <a href=\"b2team.php?action=promote&id=".$user_data->ID."&prom=down\">-</a> ";
echo "</td>\n";
if ($user_level > 3) {
echo "<td $bg1>".$user_data->user_login."</td>\n";
}
echo "</tr>\n";
}
?>
</table>
</div>
<?php
$users = $wpdb->get_results("SELECT * FROM $tableusers WHERE user_level=0 ORDER BY ID");
if ($users) {
?>
<div class="wrap">
<h3>Inactive users (level 0)</h3>
<table cellpadding="5" cellspacing="0">
<tr>
<td>ID</td>
<td>Nickname</td>
<td>Name</td>
<td>E-mail</td>
<td>URL</td>
<td>Level</td>
<?php if ($user_level > 3) { ?>
<td>Login</td>
<?php } ?>
</tr>
<?php
foreach ($users as $user) {
$user_data = get_userdata($user->ID);
echo "<tr>\n<!--".$user_data->user_login."-->\n";
$email = $user_data->user_email;
$url = $user_data->user_url;
$bg1 = ($user_data->user_login == $user_login) ? "style=\"background-image: url('../b2-img/b2button.gif');\"" : "bgcolor=\"#dddddd\"";
$bg2 = ($user_data->user_login == $user_login) ? "style=\"background-image: url('../b2-img/b2button.gif');\"" : "bgcolor=\"#eeeeee\"";
echo "<td $bg1>".$user_data->ID."</td>\n";
echo "<td $bg2><b><a href=\"javascript:profile(".$user_data->ID.")\">".$user_data->user_nickname."</a></b></td>\n";
echo "<td $bg1>".$user_data->user_firstname."&nbsp;".$user_data->user_lastname."</td>\n";
echo "<td $bg1>&nbsp;<a href=\"mailto:".antispambot($email)."\" title=\"e-mail: ".antispambot($email)."\"><img src=\"../b2-img/email.gif\" border=\"0\" alt=\"e-mail: ".antispambot($email)."\" /></a>&nbsp;</td>";
echo "<td $bg2>&nbsp;";
if (($user_data->user_url != "http://") and ($user_data->user_url != ""))
echo "<a href=\"$url\" target=\"_blank\" title=\"website: $url\"><img src=\"../b2-img/url.gif\" border=\"0\" alt=\"website: $url\" /></a>&nbsp;";
echo "</td>\n";
echo "<td $bg1>".$user_data->user_level;
if ($user_level >= 2)
echo " <a href=\"b2team.php?action=promote&id=".$user_data->ID."&prom=up\">+</a> ";
if ($user_level >= 3)
echo " <a href=\"b2team.php?action=delete&id=".$user_data->ID."\" style=\"color:red;font-weight:bold;\">X</a> ";
echo "</td>\n";
if ($user_level > 3) {
echo "<td $bg2>".$user_data->user_login."</td>\n";
}
echo "</tr>\n";
}
?>
</table>
</div>
<?php
}
if ($user_level >= 3) { ?>
<div class="wrap">
<p>To delete a user, bring his level to zero, then click on the red X.<br />
<strong>Warning:</strong> deleting a user also deletes all posts made by this user.
</p>
</div>
<?php
}
break;
}
/* </Team> */
include('b2footer.php');
?>

View File

@ -10,7 +10,7 @@ function selected($selected, $current) {
$mode = 'bookmarklet';
$standalone = 1;
require_once('b2header.php');
require_once('admin-header.php');
if ($user_level == 0)
die ("Cheatin' uh?");
@ -38,7 +38,7 @@ window.close()
<script type="text/javascript" language="javascript">
<!--
function launchupload() {
window.open ("b2upload.php", "b2upload", "width=380,height=360,location=0,menubar=0,resizable=1,scrollbars=yes,status=1,toolbar=0");
window.open ("upload.php", "b2upload", "width=380,height=360,location=0,menubar=0,resizable=1,scrollbars=yes,status=1,toolbar=0");
}
//-->
@ -75,7 +75,7 @@ textarea {
</style>
</head>
<body>
<form name="post" action="wp-post.php" method="POST">
<form name="post" action="post.php" method="POST">
<input type="hidden" name="action" value="post" />
<input type="hidden" name="user_ID" value="<?php echo $user_ID ?>" />
<input type="hidden" name="mode" value="bookmarklet" />
@ -181,7 +181,7 @@ if (!empty($content)) {
<td width="415" align="left" height="40">
<table width="415" cellpadding="0" cellspacing="0">
<td align="left" valign="bottom"><b>Post</b></td>
<td align="right" valign="bottom"><?php if ($use_quicktags) include("wp-quicktags.php"); ?></td>
<td align="right" valign="bottom"><?php if ($use_quicktags) include("quicktags.php"); ?></td>
</table>
<?php
if ((preg_match("/Nav/",$HTTP_USER_AGENT)) || (preg_match("/Mozilla\/4\.7/",$HTTP_USER_AGENT))) {

View File

@ -40,7 +40,7 @@ switch($action) {
case 'addcat':
$standalone = 1;
require_once('b2header.php');
require_once('admin-header.php');
if ($user_level < 3)
die ('Cheatin&#8217; uh?');
@ -58,7 +58,7 @@ break;
case 'Delete':
$standalone = 1;
require_once('b2header.php');
require_once('admin-header.php');
$cat_ID = intval($HTTP_GET_VARS["cat_ID"]);
$cat_name = get_catname($cat_ID);
@ -79,7 +79,7 @@ break;
case 'edit':
require_once ('b2header.php');
require_once ('admin-header.php');
$category = $wpdb->get_row("SELECT * FROM $tablecategories WHERE cat_ID = " . $HTTP_GET_VARS['cat_ID']);
$cat_name = stripslashes($category->cat_name);
?>
@ -104,7 +104,7 @@ break;
case 'editedcat':
$standalone = 1;
require_once('b2header.php');
require_once('admin-header.php');
if ($user_level < 3)
die ('Cheatin&#8217; uh?');
@ -123,7 +123,7 @@ break;
default:
$standalone = 0;
require_once ('b2header.php');
require_once ('admin-header.php');
if ($user_level < 3) {
die("You have no right to edit the categories for this blog.<br />Ask for a promotion to your <a href='mailto:$admin_email'>blog admin</a>. :)");
}
@ -194,5 +194,5 @@ break;
}
/* </Categories> */
include('b2footer.php');
include('admin-footer.php');
?>

View File

@ -1,7 +1,7 @@
<?php
$title = 'Edit Comments';
$parent_file = 'edit.php';
require_once('b2header.php');
require_once('admin-header.php');
if (!$showcomments) {
if ($comments_per_page) {
@ -40,7 +40,7 @@ ob_start();
<ul id="adminmenu2">
<li><a href="edit.php">Latest Posts</a></li>
<li><a href="edit-comments.php" class="current">Latest Comments</a></li>
<li class="last"><a href="wp-moderation.php">Comments Awaiting Moderation</a></li>
<li class="last"><a href="moderation.php">Comments Awaiting Moderation</a></li>
</ul>
<div class="wrap">
@ -155,13 +155,13 @@ echo $comments_nav_bar;
<?php comment_text() ?>
<p>Posted <?php comment_date('M j, g:i A') ?> | <?php
if (($user_level > $authordata->user_level) or ($user_login == $authordata->user_login)) {
echo "<a href=\"wp-post.php?action=editcomment&amp;comment=".$comment->comment_ID."\">Edit Comment</a>";
echo " | <a href=\"wp-post.php?action=deletecomment&amp;p=".$comment->comment_post_ID."&amp;comment=".$comment->comment_ID."\" onclick=\"return confirm('You are about to delete this comment by \'".$comment->comment_author."\'\\n \'Cancel\' to stop, \'OK\' to delete.')\">Delete</a> | ";
echo "<a href=\"post.php?action=editcomment&amp;comment=".$comment->comment_ID."\">Edit Comment</a>";
echo " | <a href=\"post.php?action=deletecomment&amp;p=".$comment->comment_post_ID."&amp;comment=".$comment->comment_ID."\" onclick=\"return confirm('You are about to delete this comment by \'".$comment->comment_author."\'\\n \'Cancel\' to stop, \'OK\' to delete.')\">Delete</a> | ";
} // end if any comments to show
// Get post title
$post_title = $wpdb->get_var("SELECT post_title FROM $tableposts WHERE ID = $comment->comment_post_ID");
$post_title = ('' == $post_title) ? "# $comment->comment_post_ID" : $post_title;
?> <a href="wp-post.php?action=edit&amp;post=<?php echo $comment->comment_post_ID; ?>">Edit Post &#8220;<?php echo $post_title; ?>&#8221;</a></p>
?> <a href="post.php?action=edit&amp;post=<?php echo $comment->comment_post_ID; ?>">Edit Post &#8220;<?php echo $post_title; ?>&#8221;</a></p>
</li>
<?php
@ -183,5 +183,5 @@ echo $comments_nav_bar;
<?php
echo $comments_nav_bar;
include('b2footer.php');
include('admin-footer.php');
?>

View File

@ -57,7 +57,7 @@ switch($action) {
?>
<form name="post" action="wp-post.php" method="post" id="post">
<form name="post" action="post.php" method="post" id="post">
<input type="hidden" name="user_ID" value="<?php echo $user_ID ?>" />
<input type="hidden" name="action" value='<?php echo $form_action . $form_extra ?>' />
@ -162,7 +162,7 @@ if ($action != 'editcomment') {
<?php
if ($use_quicktags) {
echo '<a href="http://wordpress.org/docs/reference/post/#quicktags" title="Help with quicktags">Quicktags</a>: ';
include('wp-quicktags.php');
include('quicktags.php');
}
?>
</div>
@ -226,7 +226,7 @@ if ($user_level > 4) {
touch_time(($action == 'edit'));
}
if ('edit' == $action) echo "
<p><a href='wp-post.php?action=delete&amp;post=$post' onclick=\"return confirm('You are about to delete this post \'".$edited_post_title."\'\\n \'Cancel\' to stop, \'OK\' to delete.')\">Delete this post</a></p>";
<p><a href='post.php?action=delete&amp;post=$post' onclick=\"return confirm('You are about to delete this post \'".$edited_post_title."\'\\n \'Cancel\' to stop, \'OK\' to delete.')\">Delete this post</a></p>";
?>
</div>

View File

@ -39,7 +39,7 @@ ob_start();
<h2 id="posts">Posts</h2>
<p class="anchors">Go to: <a href="wp-post.php#top">Post/Edit</a> | <a href="wp-post.php#posts">Posts</a> | <a href="wp-post.php#comments">Comments</a></p>
<p class="anchors">Go to: <a href="post.php#top">Post/Edit</a> | <a href="post.php#posts">Posts</a> | <a href="post.php#comments">Comments</a></p>
<div class="wrap">
<table width="100%">
@ -133,14 +133,14 @@ echo $posts_nav_bar;
<table width="100%">
<tr>
<td valign="top" width="33%">
<form name="searchform" action="wp-post.php" method="get">
<form name="searchform" action="post.php" method="get">
<input type="hidden" name="a" value="s" />
<input onfocus="this.value='';" onblur="if (this.value=='') {this.value='search...';}" type="text" name="s" value="search..." size="7" style="width: 100px;" />
<input type="submit" name="submit" value="search" class="search" />
</form>
</td>
<td valign="top" width="33%" align="center">
<form name="viewcat" action="wp-post.php" method="get">
<form name="viewcat" action="post.php" method="get">
<select name="cat" style="width:140px;">
<option value="all">All Categories</option>
<?php
@ -158,7 +158,7 @@ echo $posts_nav_bar;
</form>
</td>
<td valign="top" width="33%" align="right">
<form name="viewarc" action="wp-post.php" method="get">
<form name="viewarc" action="post.php" method="get">
<?php
if ($archive_mode == "monthly") {
@ -234,21 +234,21 @@ echo $posts_nav_bar;
<?php
// these lines are b2's "motor", do not alter nor remove them
include($abspath.'blog.header.php');
include($abspath.'wp-blog-header.php');
if ($posts) {
foreach ($posts as $post) {
//$posts_per_page = 10;
start_b2(); ?>
<p>
<strong><?php the_time('Y/m/d @ H:i:s'); ?></strong> [ <a href="wp-post.php?p=<?php echo $id ?>&c=1"><?php comments_number('no comments', '1 comment', "% comments", true) ?></a>
<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
if (($user_level > $authordata->user_level) or ($user_login == $authordata->user_login)) {
echo " - <a href='wp-post.php?action=edit&amp;post=$id";
echo " - <a href='post.php?action=edit&amp;post=$id";
if ($m)
echo "&m=$m";
echo "'>Edit</a>";
echo " - <a href='wp-post.php?action=delete&amp;post=$id' onclick=\"return confirm('You are about to delete this post \'".the_title('','',0)."\'\\n \'Cancel\' to stop, \'OK\' to delete.')\">Delete</a> ";
echo " - <a href='post.php?action=delete&amp;post=$id' onclick=\"return confirm('You are about to delete this post \'".the_title('','',0)."\'\\n \'Cancel\' to stop, \'OK\' to delete.')\">Delete</a> ";
}
if ('private' == $post->post_status) echo ' - <strong>Private</strong>';
?>
@ -280,8 +280,8 @@ echo $posts_nav_bar;
<?php comment_date('Y/m/d') ?> @ <?php comment_time() ?>
<?php
if (($user_level > $authordata->user_level) or ($user_login == $authordata->user_login)) {
echo "[ <a href=\"wp-post.php?action=editcomment&amp;comment=".$comment->comment_ID."\">Edit</a>";
echo " - <a href=\"wp-post.php?action=deletecomment&amp;p=".$post->ID."&amp;comment=".$comment->comment_ID."\" onclick=\"return confirm('You are about to delete this comment by \'".$comment->comment_author."\'\\n \'Cancel\' to stop, \'OK\' to delete.')\">Delete</a> ";
echo "[ <a href=\"post.php?action=editcomment&amp;comment=".$comment->comment_ID."\">Edit</a>";
echo " - <a href=\"post.php?action=deletecomment&amp;p=".$post->ID."&amp;comment=".$comment->comment_ID."\" onclick=\"return confirm('You are about to delete this comment by \'".$comment->comment_author."\'\\n \'Cancel\' to stop, \'OK\' to delete.')\">Delete</a> ";
if ( ('none' != get_settings("comment_moderation")) && ($user_level >= 3) ) {
if ('approved' == wp_get_comment_status($comment->comment_ID)) {
echo " - <a href=\"b2edit.php?action=unapprovecomment&amp;p=".$post->ID."&amp;comment=".$comment->comment_ID."\">Unapprove</a> ";
@ -311,7 +311,7 @@ echo $posts_nav_bar;
<!-- form to add a comment -->
<form action="<?php echo $siteurl.'/b2comments.post.php'?>" method="post">
<form action="<?php echo $siteurl.'/wp-comments-post.php'?>" method="post">
<input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" />
<input type="hidden" name="redirect_to" value="<?php echo $HTTP_SERVER_VARS["REQUEST_URI"]; ?>" />
<input type="text" name="author" class="textarea" value="<?php echo $user_nickname ?>" size="20" tabindex="1" /><br />

View File

@ -1,6 +1,6 @@
<?php
$title = 'Edit Posts';
require_once('b2header.php');
require_once('admin-header.php');
if (!$showposts) {
if ($posts_per_page) {
$showposts=$posts_per_page;
@ -38,7 +38,7 @@ ob_start();
<ul id="adminmenu2">
<li><a href="edit.php" class="current">Latest Posts</a></li>
<li><a href="edit-comments.php">Latest Comments</a></li>
<li class="last"><a href="wp-moderation.php">Comments Awaiting Moderation</a></li>
<li class="last"><a href="moderation.php">Comments Awaiting Moderation</a></li>
</ul>
<div class="wrap">
@ -233,7 +233,7 @@ echo $posts_nav_bar;
</table>
<?php
include($abspath.'blog.header.php');
include($abspath.'wp-blog-header.php');
if ($posts) {
foreach ($posts as $post) { start_b2();
@ -242,11 +242,11 @@ foreach ($posts as $post) { start_b2();
<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>
<?php
if (($user_level > $authordata->user_level) or ($user_login == $authordata->user_login)) {
echo " - <a href='wp-post.php?action=edit&amp;post=$id";
echo " - <a href='post.php?action=edit&amp;post=$id";
if ($m)
echo "&m=$m";
echo "'>Edit</a>";
echo " - <a href='wp-post.php?action=delete&amp;post=$id' onclick=\"return confirm('You are about to delete this post \'".the_title('','',0)."\'\\n \'OK\' to delete, \'Cancel\' to stop.')\">Delete</a> ";
echo " - <a href='post.php?action=delete&amp;post=$id' onclick=\"return confirm('You are about to delete this post \'".the_title('','',0)."\'\\n \'OK\' to delete, \'Cancel\' to stop.')\">Delete</a> ";
}
if ('private' == $post->post_status) echo ' - <strong>Private</strong>';
?>
@ -284,13 +284,13 @@ foreach ($posts as $post) { start_b2();
<?php comment_date('Y/m/d') ?> @ <?php comment_time() ?>
<?php
if (($user_level > $authordata->user_level) or ($user_login == $authordata->user_login)) {
echo "[ <a href=\"wp-post.php?action=editcomment&amp;comment=".$comment->comment_ID."\">Edit</a>";
echo " - <a href=\"wp-post.php?action=deletecomment&amp;p=".$post->ID."&amp;comment=".$comment->comment_ID."\" onclick=\"return confirm('You are about to delete this comment by \'".$comment->comment_author."\'\\n \'OK\' to delete, \'Cancel\' to stop.')\">Delete</a> ";
echo "[ <a href=\"post.php?action=editcomment&amp;comment=".$comment->comment_ID."\">Edit</a>";
echo " - <a href=\"post.php?action=deletecomment&amp;p=".$post->ID."&amp;comment=".$comment->comment_ID."\" onclick=\"return confirm('You are about to delete this comment by \'".$comment->comment_author."\'\\n \'OK\' to delete, \'Cancel\' to stop.')\">Delete</a> ";
if ( ('none' != $comment_status) && ($user_level >= 3) ) {
if ('approved' == wp_get_comment_status($comment->comment_ID)) {
echo " - <a href=\"wp-post.php?action=unapprovecomment&amp;p=".$post->ID."&amp;comment=".$comment->comment_ID."\">Unapprove</a> ";
echo " - <a href=\"post.php?action=unapprovecomment&amp;p=".$post->ID."&amp;comment=".$comment->comment_ID."\">Unapprove</a> ";
} else {
echo " - <a href=\"wp-post.php?action=approvecomment&amp;p=".$post->ID."&amp;comment=".$comment->comment_ID."\">Approve</a> ";
echo " - <a href=\"post.php?action=approvecomment&amp;p=".$post->ID."&amp;comment=".$comment->comment_ID."\">Approve</a> ";
}
}
echo "]";
@ -320,7 +320,7 @@ foreach ($posts as $post) { start_b2();
<!-- form to add a comment -->
<form action="<?php echo $siteurl.'/b2comments.post.php'?>" method="post">
<form action="<?php echo $siteurl.'/wp-comments-post.php'?>" method="post">
<input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" />
<input type="hidden" name="redirect_to" value="<?php echo $HTTP_SERVER_VARS["REQUEST_URI"]; ?>" />
<input type="text" name="author" class="textarea" value="<?php echo $user_nickname ?>" size="20" tabindex="1" /><br />
@ -357,5 +357,5 @@ foreach ($posts as $post) { start_b2();
<?php
// uncomment this to show the nav bar at the bottom as well
echo $posts_nav_bar;
include('b2footer.php');
include('admin-footer.php');
?>

View File

@ -1,66 +0,0 @@
<!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" xml:lang="en">
<head>
<title>WordPress &#8212; Docs</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<!-- fix the FOUC -->
<script type="text/javascript"> </script>
<style type="text/css">
@import url("http://wordpress.org/wp.css");
</style>
</head>
<body>
<div id="main">
<h1 id="logo"><a href="/" title="WordPress"><span>WordPress</span></a></h1>
<div id="content"><h2>Reference</h2>
<dl>
<dt id="dateformat"><a href="#dateformat">About Date &amp; Time formats:</a></dt>
<dd>You can format the date &amp; time in many ways, using the PHP syntax.<br />
As quoted from the PHP manual, here are the letters you can use:
<blockquote>
The following characters are recognized in the format string:<br />
<strong>a</strong> - "am" or "pm"<br />
<strong>A</strong> - "AM" or "PM"<br />
<strong>B</strong> - Swatch Internet time<br />
<strong>d</strong> - day of the month, 2 digits with leading zeros; i.e. "01" to "31"<br />
<strong>D</strong> - day of the week, textual, 3 letters; i.e. "Fri"<br />
<strong>F</strong> - month, textual, long; i.e. "January"<br />
<strong>g</strong> - hour, 12-hour format without leading zeros; i.e. "1" to "12"<br />
<strong>G</strong> - hour, 24-hour format without leading zeros; i.e. "0" to "23"<br />
<strong>h</strong> - hour, 12-hour format; i.e. "01" to "12"<br />
<strong>H</strong> - hour, 24-hour format; i.e. "00" to "23"<br />
<strong>i</strong> - minutes; i.e. "00" to "59"<br />
<strong>I</strong> (capital i) - "1" if Daylight Savings Time, "0" otherwise.<br />
<strong>j</strong> - day of the month without leading zeros; i.e. "1" to "31"<br />
<strong>l</strong> (lowercase 'L') - day of the week, textual, long; i.e. "Friday"<br />
<strong>L</strong> - boolean for whether it is a leap year; i.e. "0" or "1"<br />
<strong>m</strong> - month; i.e. "01" to "12"<br />
<strong>M</strong> - month, textual, 3 letters; i.e. "Jan"<br />
<strong>n</strong> - month without leading zeros; i.e. "1" to "12"<br />
<strong>r</strong> - RFC 822 formatted date; i.e. "Thu, 21 Dec 2000 16:01:07 +0200" (added in PHP 4.0.4)<br />
<strong>s</strong> - seconds; i.e. "00" to "59"<br />
<strong>S</strong> - English ordinal suffix, textual, 2 characters; i.e. "th", "nd"<br />
<strong>t</strong> - number of days in the given month; i.e. "28" to "31"<br />
<strong>T</strong> - Timezone setting of this machine; i.e. "MDT"<br />
<strong>U</strong> - seconds since the epoch<br />
<strong>w</strong> - day of the week, numeric, i.e. "0" (Sunday) to "6" (Saturday)<br />
<strong>Y</strong> - year, 4 digits; i.e. "1999"<br />
<strong>y</strong> - year, 2 digits; i.e. "99"<br />
<strong>z</strong> - day of the year; i.e. "0" to "365"<br />
<strong>Z</strong> - timezone offset in seconds (i.e. "-43200" to "43200"). The offset for timezones west of UTC is always negative, and for those east of UTC is always positive.<br />
<br />
Unrecognized characters in the format string will be printed as-is.
</blockquote>
<p>For more information and examples, check the PHP manual on <a href="http://www.php.net/manual/en/function.date.php">this page</a>.</p>
</dd>
</dl>
</div>
</div>
</body>
</html>

View File

@ -1,77 +0,0 @@
<!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" xml:lang="en">
<head>
<title>WordPress &#8212; Docs</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<!-- fix the FOUC -->
<script type="text/javascript"> </script>
<style type="text/css">
@import url("http://wordpress.org/wp.css");
</style>
</head>
<body>
<div id="main">
<h1 id="logo"><a href="/" title="WordPress"><span>WordPress</span></a></h1>
<div id="content"><h2>Reference</h2>
<dl>
<dt id="edit_link_category"><a href="#edit_link_category">Edit a link category</a></dt>
<dd>This list displays all the link categories you have defined with their
settings. When used in conjunction with the 'Delete' or 'Edit' button it
allows you to delete or edit the selected category. When editing, you can set
all the same settings as when <a href="#add_link_category">adding</a> a new
category.</dd>
<dt id="add_link_category"><a href="#add_link_category">Add a link category</a></dt>
<dd><p>Here you can create a new link category. The following settings can be
defined for your link category:</p>
<ul>
<li><strong>Name</strong>: The name of the link category.</li>
<li><strong>Auto-toggle</strong>: Check this if you want your category to
use the <a href="#auto_toggle">auto-toggle</a> feature.</li>
<li><strong>Show Images</strong>: Check this to show the images for links
in this category.</li>
<li><strong>Show Description</strong>: Check this to show the description
for links in this category.</li>
<li><strong>Show Rating</strong>: Check this to show the rating for links
in this category.</li>
<li><strong>Show Updated</strong>: Check this to show (as a tooltip) the
updated timestamp for links in this category.</li>
<li><strong>Sort Order</strong>: The order in which the links in this
category should be displayed.</li>
<li><strong>Descending</strong>: Checking this will reverese the sort
order selected (usually used for when sorted by updated or rating).</li>
<li><strong>Text/HTML before</strong>: The text or HTML to be output
before each link.</li>
<li><strong>Text/HTML between</strong>: The text or HTML to be output
before after each link or image but before the description or rating.</li>
<li><strong>Text/HTML after</strong>: The text or HTML to be output after
each link and its's description and/or rating.</li>
<li><strong>Limit</strong>: Enter a number here to limit the number of
links displayed from this category.</li>
</ul>
<p>Click on the 'Add Category!' button to add your new category.</p></dd>
<dt id="auto_toggle"><a href="#auto_toggle">Auto-toggle</a></dt>
<dd>Auto toggle is a setting for a link category. Setting this to on means
that whenever you edit links in this category, the system will only allow one
link at a time to be visible. If you set a link to be visible, or create a new
link with a visible state, the system will automatically turn off the
visibility of all the other links in that category. Some suggestions for this
functionality include a set of 'Mood' links, only one of which is 'active' at
any time; or a collection of links to CD's and set the one to which you are
currently listening to visible. All the other links will automatically be made
invisible. </dd>
</dl>
</div>
</div>
</body>
</html>

View File

@ -1,151 +0,0 @@
<!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" xml:lang="en">
<head>
<title>WordPress &#8212; Docs</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<!-- fix the FOUC -->
<script type="text/javascript"> </script>
<style type="text/css">
@import url("http://wordpress.org/wp.css");
</style>
</head>
<body>
<div id="main">
<h1 id="logo"><a href="/" title="WordPress"><span>WordPress</span></a></h1>
<div id="content"><h2>Reference</h2>
<dl>
<dt id="link_categories"><a href="#link_categories">Link Categories</a></dt>
<dd>This drop down list contains all the link categories you have defined.
When used in conjunction with the 'Show' button, the list of links displayed
will be limited to the selected category.</dd>
<dt id="order_by"><a href="#order_by">Order By</a></dt>
<dd>This drop down list when used in conjunction with the 'Show' button
determines the order of the list of links displayed on this page.</dd>
<dt id="show"><a href="#show">Show</a></dt>
<dd>Clicking this button will restrict the list of links displayed on this
page to those in the category selected in the 'Link Categories' drop down and
sorted by the order selected in the 'Order By' drop down list.</dd>
<dt id="manage_link_categories"><a href="#manage_link_categories">Manage Link
Categories</a></dt>
<dd>Clicking this link allows you to manage the link categories. Add new ones,
edit existing ones and delete old ones.</dd>
<dt id="import_blogroll"><a href="#import_blogroll">Import Blogroll</a></dt>
<dd>Clicking this link takes you to a page from which you can import your
<abbr title="Outline Processor Markup Language">OPML</abbr> links, for example
your blogroll at <a href="http://www.blogrolling.com">Blogrolling.com</a>.
</dd>
<dt id="list_o_links"><a href="#list_o_links">List O' Links</a></dt>
<dd><p>The list of links displayed has the following information for each
link:</p>
<ul>
<li><strong>Name</strong>: The name of the link. Displayed as the
click-able words in your template (if not using the image).</li>
<li><strong>URL</strong>: The url to which the link points.</li>
<li><strong>Category</strong>: The category to which this link belongs.
</li>
<li><strong>Relationship</strong>: The forward <a
href="http://www.w3.org/TR/html401/struct/links.html#adef-rel">
relationship</a> for this link.</li>
<li><strong>Image</strong>: Yes means an image is defined for this link.
</li>
<li><strong>Visible</strong>: Yes means this link is visible, No means it
is not.</li>
<li><strong>Description</strong>: The description for the link. Displayed
after the image or name.</li>
</ul>
<p>Additionaly, if you have sufficient privileges, <strong>Edit</strong> and
<strong>Delete</strong> buttons are displayed. Along with a checkbox. The
checkboxes are used in conjunction with the function buttons at the bottom
of the list of links. </p>
</dd>
<dt id="assign_ownership"><a href="#assign_ownership">Assign Ownership</a></dt>
<dd>This list and button allow you to assign the ownership of links (for which
you have administration privileges) to someone else.</dd>
<dt id="toggle_visibility"><a href="#toggle_visibility">Toggle Visibility</a></dt>
<dd>This button allow you to toggle the visibility of the checked links (for
which you have administration privileges). Visible links become invisible and
invisible links become visible.</dd>
<dt id="move_to_cat"><a href="#move_to_cat">Move To Category</a></dt> <dd>This
list and button allow you to move several links (for which you have
administration privileges) at the same time. Check the checkboxes of the links
you wish to change, select a category from the drop down list and click the
move button.</dd>
<dt id="toggle_checkboxes"><a href="#toggle_checkboxes">Toggle Checkboxes</a></dt>
<dd>This link allows you to toggle the checked state of all the links in the
list. Links which were checked will become unchecked, links which were
unchecked will become checked.</dd>
<dt id="add_a_link"><a href="#add_a_link">Add a link</a></dt>
<dd>
<p>This section of the page allows you to add a new link into the system.
The following fields are present on the form:</p>
<ul>
<li><strong>URL</strong>: The url to which the link will point.</li>
<li><strong>Display Name/Alt Text</strong>: The name of the link.
Displayed as the click-able words in your template (if not using the
image), or the alt text for the image if an image is displayed.</li>
<li><strong>Image</strong>: The path to the image for this link.</li>
<li><strong>Description</strong>: The description for the link. Displayed
after the image or name.</li>
<li><strong>Relationship</strong>: The forward <a
href="http://www.w3.org/TR/html401/struct/links.html#adef-rel">
relationship</a> for this link. Output as part of the anchor tag.</li>
<li><strong>Notes</strong>: This text area allows you to add a substantial
amount of text to be associated with a link. This could be, for example, a
review of the website linked to. You can include html in this section
too.</li>
<li><strong>Rating</strong>: The rating for this link. If the rating is
displayed, it can be displayed as an image or a number of characters or
images of your choice.</li>
<li><strong>Target</strong>: The target for this link.<br /> '<em>_blank</em>'
means open the link in a new browser window (this setting is regarded as
unfriendly to your readers and not recommend).<br /> '<em>_top</em>' means the
main window of the user's browser (only really relevant if your blog is
frame based).<br />'<em>none</em>' this is the recommended setting.</li>
<li><strong>Visible</strong>: Yes means this link is visible, No means it
is not. This allows you to temporarily remove a link from your blog
without having to delete it from the system.</li>
<li><strong>Category</strong>: The category to which this link will
belong.</li>
</ul>
<p>There is also an <strong>Add</strong> button which will submit the form
and add the new link</p>
</dd>
</dl>
</div>
</div>
</body>
</html>

View File

@ -1,41 +0,0 @@
<!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" xml:lang="en">
<head>
<title>WordPress &#8212; Docs</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<!-- fix the FOUC -->
<script type="text/javascript"> </script>
<style type="text/css">
@import url("http://wordpress.org/wp.css");
</style>
</head>
<body>
<div id="main">
<h1 id="logo"><a href="/" title="WordPress"><span>WordPress</span></a></h1>
<div id="content"><h2>Reference</h2>
<dl>
<dt id="opml_code"><a href="#opml_code">OPML Code</a></dt>
<dd>Enter the URL of your OPML code from <a href="http://blogrolling.com"
title="blogrolling.com">blogrolling.com</a>or <a href="http://blo.gs"
title="blo.gs">blo.gs</a>.</dd>
<dt id="link_category"><a href="#link_category">Select link category</a></dt>
<dd>Select the link category to which you want to have the imported links
added.</dd>
<dt id="import"><a href="#import">Import!</a></dt>
<dd>Click this button to start the import. You will see a little bit of
feedback to show you whether the import was successdul or not.</dd>
</dl>
</div>
</div>
</body>
</html>

View File

@ -21,9 +21,9 @@ switch ($action) {
case "step1":
require_once('../wp-config.php');
require_once($abspath.$b2inc.'/b2template.functions.php');
require_once($abspath.$b2inc.'/b2functions.php');
require_once($abspath.$b2inc.'/b2vars.php');
require_once($abspath.$b2inc.'/template-functions.php');
require_once($abspath.$b2inc.'/functions.php');
require_once($abspath.$b2inc.'/vars.php');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
@ -33,7 +33,7 @@ case "step1":
</head>
<body>
<div class="wrap">
<h1>Blogger to <img src="../b2-img/wpminilogo.png" width="50" height="50" border="0" alt="WordPress" align="top" /></h1>
<h1>Blogger to <img src="../wp-images/wpminilogo.png" width="50" height="50" border="0" alt="WordPress" align="top" /></h1>
<p>The importer is running...</p>
<ul>
<li>Importing posts and users
@ -166,7 +166,7 @@ case "step1":
</ul>
<p>&nbsp;</p>
<p>Completed Blogger to WordPress import!</p>
<p>Now you can go and <a href="../b2login.php">log in</a>, have fun!</p>
<p>Now you can go and <a href="../wp-login.php">log in</a>, have fun!</p>
</div>
</body>
</html>
@ -184,7 +184,7 @@ default:
<body>
<div class="wrap">
<h1>Blogger to <img src="../b2-img/wpminilogo.png" width="50" height="50" border="0" alt="WordPress" align="top" /></h1>
<h1>Blogger to <img src="../wp-images/wpminilogo.png" width="50" height="50" border="0" alt="WordPress" align="top" /></h1>
<p>This is a basic Blogger to WordPress import script.</p>
<p>What it does:</p>
<ul>

View File

@ -5,7 +5,7 @@
// 3. load in the browser from there
require_once('wp-config.php');
require_once($abspath.$b2inc.'/b2functions.php');
require_once($abspath.$b2inc.'/functions.php');
$b2varstoreset = array('action', 'gmpath', 'archivespath');
for ($i=0; $i<count($b2varstoreset); $i += 1) {
@ -63,7 +63,7 @@ textarea,input,select {
</style>
</head>
<body style="margin: 20px;">
<p><font face="times new roman" style="font-size: 39px;">gm 2 <img src="b2-img/wpminilogo.png" width="50" height="50" border="0" alt="b2" align="top" /></font></p>
<p><font face="times new roman" style="font-size: 39px;">gm 2 <img src="wp-images/wpminilogo.png" width="50" height="50" border="0" alt="b2" align="top" /></font></p>
<p>The importer is running...</p>
<ul>
<li>importing users... <ul><?php
@ -239,7 +239,7 @@ textarea,input,select {
</ul><b>Done</b></li></ul>
<p>&nbsp;</p>
<p>Completed GM 2 b2 import !</p>
<p>Now you can go and <a href="b2login.php">log in</a>, have fun !</p>
<p>Now you can go and <a href="wp-login.php">log in</a>, have fun !</p>
<?php
break;
@ -274,7 +274,7 @@ textarea,input,select {
</style>
</head>
<body style="margin: 20px;">
<p><font face="times new roman" style="font-size: 39px;">gm 2 <img src="b2-img/wpminilogo.png" width="50" height="50" border="0" alt="b2" align="top" /></font></p>
<p><font face="times new roman" style="font-size: 39px;">gm 2 <img src="wp-images/wpminilogo.png" width="50" height="50" border="0" alt="b2" align="top" /></font></p>
<p>This is a basic GreyMatter to b2 import script.</p>
<p>What it does:</p>
<ul>

View File

@ -9,7 +9,7 @@ $tp_database_host = 'localhost';
if (!file_exists('../wp-config.php')) die("There doesn't seem to be a wp-config.php file. Double check that you updated wp-config.sample.php with the proper database connection information and renamed it to wp-config.php.");
require('../wp-config.php');
require('wp-install-helper.php');
require('install-helper.php');
$step = $HTTP_GET_VARS['step'];
if (!$step) $step = 0;

View File

@ -2,5 +2,5 @@
/* This will possibly be more later but for now let's just redirect. */
header ('Location: wp-post.php');
header ('Location: post.php');
?>

View File

@ -57,7 +57,7 @@ switch($step) {
we get started, remember that we require a PHP version of at least 4.0.6, you
have <?php echo phpversion(); ?>. Look good? You also need to set up the database
connection information in <code>wp-config.php</code>. Have you looked at the
<a href="../readme.html">readme</a>? If you&#8217;re all ready, <a href="wp-install.php?step=1">let's
<a href="../readme.html">readme</a>? If you&#8217;re all ready, <a href="install.php?step=1">let's
go</a>! </p>
<?php
break;
@ -174,7 +174,7 @@ if ($got_row) {
echo "<p>All done!</p>\n";
}
?>
<p>Did you defeat the boss monster at the end? Great! You&#8217;re ready for <a href="wp-install.php?step=2">Step
<p>Did you defeat the boss monster at the end? Great! You&#8217;re ready for <a href="install.php?step=2">Step
2</a>.</p>
<?php
break;
@ -386,7 +386,7 @@ $option_data = array(
"INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(14,'use_htmltrans', 2, '1', 'IMPORTANT! set this to false if you are using Chinese, Japanese, Korean, or other double-bytes languages', 8, 20)",
"INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(15,'use_balanceTags', 2, '1', 'this could help balance your HTML code. if it gives bad results, set it to false', 8, 20)",
"INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(16,'use_smilies', 2, '1', 'set this to 1 to enable smiley conversion in posts (note: this makes smiley conversion in ALL posts)', 8, 20)",
"INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(17,'smilies_directory', 3, 'http://example.com/b2-img/smilies', 'the directory where your smilies are (no trailing slash)', 8, 40)",
"INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(17,'smilies_directory', 3, 'http://example.com/wp-images/smilies', 'the directory where your smilies are (no trailing slash)', 8, 40)",
"INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(18,'require_name_email', 2, '0', 'set this to true to require e-mail and name, or false to allow comments without e-mail/name', 8, 20)",
"INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(19,'comment_allowed_tags', 3, '<b><i><strong><em><code><blockquote><p><br><strike><a>', 'here is a list of the tags that are allowed in the comments. You can add tags to the list, just add them in the string, add only the opening tag: for example, only \'&lt;a>\' instead of \'&lt;a href=\"\">&lt;/a>\'', 8, 40)",
"INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(20,'comments_notify', 2, '1', 'set this to true to let every author be notified about comments on their posts', 8, 20)",
@ -654,7 +654,7 @@ foreach ($geo_option_data as $query) {
<p>OK. We're nearly done now. We just need to ask you a couple of things:</p>
<form action="wp-install.php?step=3" method="post">
<form action="install.php?step=3" method="post">
<input type="hidden" name="step" value="3" />
<p>What is the url for your blog? <input name="url" type="text" size="60" />
, now on to <input type="submit" value="Step 3" ></p>
@ -674,7 +674,7 @@ if (isset($url)) {
$q = $wpdb->query($query);
$query= "UPDATE $tableoptions set option_value='$url' where option_id=28"; //blodotgsping_url
$q = $wpdb->query($query);
$query= "UPDATE $tableoptions set option_value='$url/b2-img/smilies' where option_id=17"; //smilies_directory
$query= "UPDATE $tableoptions set option_value='$url/wp-images/smilies' where option_id=17"; //smilies_directory
$q = $wpdb->query($query);
}
@ -716,7 +716,7 @@ $q = $wpdb->query($query);
<p>User setup successful!</p>
<p>Now you can <a href="../b2login.php">log in</a> with the <strong>login</strong>
<p>Now you can <a href="../wp-login.php">log in</a> with the <strong>login</strong>
"admin" and <strong>password</strong> "<?php echo $random_password; ?>".</p>
<p><strong><em>Note that password</em></strong> carefully! It is a <em>random</em>
password that was generated just for you. If you lose it, you

View File

@ -5,8 +5,8 @@
include_once('../wp-links/links.php');
$title = 'Link Categories';
$this_file='linkcategories.php';
$parent_file = 'linkmanager.php';
$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) {
@ -28,7 +28,7 @@ switch ($action) {
case "addcat":
{
$standalone = 1;
include_once("./b2header.php");
include_once("./admin-header.php");
if ($user_level < get_settings('links_minadminlevel'))
die ("Cheatin' uh ?");
@ -79,13 +79,13 @@ switch ($action) {
" '$show_rating', '$show_updated', '$sort_order', '$sort_desc', '$text_before_link', '$text_after_link', \n" .
" '$text_after_all', $list_limit)");
header("Location: linkcategories.php");
header("Location: link-categories.php");
break;
} // end addcat
case "Delete":
{
$standalone = 1;
include_once("./b2header.php");
include_once("./admin-header.php");
$cat_id = $HTTP_POST_VARS["cat_id"];
$cat_name=get_linkcatname($cat_id);
@ -100,12 +100,12 @@ switch ($action) {
$wpdb->query("DELETE FROM $tablelinkcategories WHERE cat_id='$cat_id'");
$wpdb->query("UPDATE $tablelinks SET link_category=1 WHERE link_category='$cat_id'");
header("Location: linkcategories.php");
header("Location: link-categories.php");
break;
} // end delete
case "Edit":
{
include_once ("./b2header.php");
include_once ("./admin-header.php");
$cat_id = $HTTP_POST_VARS["cat_id"];
$row = $wpdb->get_row("SELECT cat_id, cat_name, auto_toggle, show_images, show_description, "
. " show_rating, show_updated, sort_order, sort_desc, text_before_link, text_after_link, "
@ -117,9 +117,9 @@ switch ($action) {
?>
<ul id="adminmenu2">
<li><a href="linkmanager.php" >Manage Links</a></li>
<li><a href="linkcategories.php" class="current">Link Categories</a></li>
<li class="last"><a href="links.import.php">Import Blogroll</a></li>
<li><a href="link-manager.php" >Manage Links</a></li>
<li><a href="link-categories.php" class="current">Link Categories</a></li>
<li class="last"><a href="link-import.php">Import Blogroll</a></li>
</ul>
<div class="wrap">
@ -195,7 +195,7 @@ switch ($action) {
case "editedcat":
{
$standalone = 1;
include_once("./b2header.php");
include_once("./admin-header.php");
if ($user_level < get_settings('links_minadminlevel'))
die ("Cheatin' uh ?");
@ -263,21 +263,21 @@ switch ($action) {
} // end if save
header("Location: linkcategories.php");
header("Location: link-categories.php");
break;
} // end editcat
default:
{
$standalone=0;
include_once ("./b2header.php");
include_once ("./admin-header.php");
if ($user_level < get_settings('links_minadminlevel')) {
die("You have no right to edit the link categories for this blog.<br>Ask for a promotion to your <a href=\"mailto:$admin_email\">blog admin</a> :)");
}
?>
<ul id="adminmenu2">
<li><a href="linkmanager.php" >Manage Links</a></li>
<li><a href="linkcategories.php" class="current">Link Categories</a></li>
<li class="last"><a href="links.import.php">Import Blogroll</a></li>
<li><a href="link-manager.php" >Manage Links</a></li>
<li><a href="link-categories.php" class="current">Link Categories</a></li>
<li class="last"><a href="link-import.php">Import Blogroll</a></li>
</ul>
<div class="wrap">
<table width="" cellpadding="5" cellspacing="0" border="0">
@ -417,4 +417,4 @@ foreach ($results as $row) {
} // end default
} // end case
?>
<?php include('b2footer.php'); ?>
<?php include('admin-footer.php'); ?>

View File

@ -5,9 +5,9 @@
require_once('../wp-config.php');
include_once("../wp-links/links.php");
$parent_file = 'linkmanager.php';
$parent_file = 'link-manager.php';
$title = 'Import Blogroll';
$this_file = 'links.import.php';
$this_file = 'link-import.php';
$step = $HTTP_POST_VARS['step'];
if (!$step) $step = 0;
@ -17,7 +17,7 @@ switch ($step) {
case 0:
{
$standalone = 0;
include_once('b2header.php');
include_once('admin-header.php');
if ($user_level < get_settings('links_minadminlevel'))
die ("Cheatin&#8217; uh?");
@ -25,16 +25,16 @@ switch ($step) {
?>
<ul id="adminmenu2">
<li><a href="linkmanager.php" >Manage Links</a></li>
<li><a href="linkcategories.php">Link Categories</a></li>
<li class="last"><a href="links.import.php" class="current">Import Blogroll</a></li>
<li><a href="link-manager.php" >Manage Links</a></li>
<li><a href="link-categories.php">Link Categories</a></li>
<li class="last"><a href="link-import.php" class="current">Import Blogroll</a></li>
</ul>
<div class="wrap">
<h3>On this page you can import your blogroll.</h3>
<!-- <form name="blogroll" action="links.import.php" method="get"> -->
<form enctype="multipart/form-data" action="links.import.php" method="post" name="blogroll">
<!-- <form name="blogroll" action="link-import.php" method="get"> -->
<form enctype="multipart/form-data" action="link-import.php" method="post" name="blogroll">
<ol>
<li>Go to <a href="http://www.blogrolling.com">Blogrolling.com</a>
@ -80,7 +80,7 @@ switch ($step) {
case 1: {
$standalone = 0;
include_once('b2header.php');
include_once('admin-header.php');
if ($user_level < get_settings('links_minadminlevel'))
die ("Cheatin' uh ?");
?>
@ -114,7 +114,7 @@ switch ($step) {
if (isset($opml_url) && $opml_url != '') {
$opml = implode('', file($opml_url));
include_once('links.parse.opml.php');
include_once('link-parse-opml.php');
$link_count = count($names);
for ($i = 0; $i < $link_count; $i++) {
@ -128,7 +128,7 @@ switch ($step) {
echo "<p>Inserted <strong>{$names[$i]}</strong></p>";
}
?>
<p>Inserted <?php echo $link_count ?> links into category <?php echo $cat_id; ?>. All done! Go <a href="linkmanager.php">manage those links</a>.</p>
<p>Inserted <?php echo $link_count ?> links into category <?php echo $cat_id; ?>. All done! Go <a href="link-manager.php">manage those links</a>.</p>
<?php
} // end if got url
else

View File

@ -6,7 +6,7 @@ require_once('../wp-config.php');
require_once("../wp-links/links.php");
$title = 'Manage Links';
$this_file = 'linkmanager.php';
$this_file = 'link-manager.php';
function category_dropdown($fieldname, $selected = 0) {
global $wpdb, $tablelinkcategories;
@ -70,7 +70,7 @@ switch ($action) {
case 'Assign':
{
$standalone = 1;
include_once('b2header.php');
include_once('admin-header.php');
// check the current user's level first.
if ($user_level < get_settings('links_minadminlevel'))
@ -101,7 +101,7 @@ switch ($action) {
case 'Visibility':
{
$standalone = 1;
include_once('b2header.php');
include_once('admin-header.php');
// check the current user's level first.
if ($user_level < get_settings('links_minadminlevel'))
@ -139,7 +139,7 @@ switch ($action) {
case 'Move':
{
$standalone = 1;
include_once('b2header.php');
include_once('admin-header.php');
// check the current user's level first.
if ($user_level < get_settings('links_minadminlevel'))
die ("Cheatin' uh ?");
@ -160,7 +160,7 @@ switch ($action) {
case 'Add':
{
$standalone = 1;
include_once('b2header.php');
include_once('admin-header.php');
$link_url = $HTTP_POST_VARS["linkurl"];
$link_name = $HTTP_POST_VARS["name"];
@ -206,7 +206,7 @@ switch ($action) {
$links_show_cat_id = $cat_id;
$standalone = 1;
include_once('b2header.php');
include_once('admin-header.php');
$link_id = $HTTP_POST_VARS["link_id"];
$link_url = $HTTP_POST_VARS["linkurl"];
@ -247,7 +247,7 @@ switch ($action) {
case 'Delete':
{
$standalone = 1;
include_once('b2header.php');
include_once('admin-header.php');
$link_id = $HTTP_POST_VARS["link_id"];
@ -272,7 +272,7 @@ switch ($action) {
case 'linkedit':
{
$standalone=0;
include_once ('b2header.php');
include_once ('admin-header.php');
if ($user_level < get_settings('links_minadminlevel')) {
die("You have no right to edit the links for this blog.<br />Ask for a promotion to your <a href=\"mailto:$admin_email\">blog admin</a>. :)");
}
@ -420,7 +420,7 @@ switch ($action) {
setcookie('links_show_cat_id_'.$cookiehash, $links_show_cat_id, time()+600);
setcookie('links_show_order_'.$cookiehash, $links_show_order, time()+600);
$standalone=0;
include_once ("./b2header.php");
include_once ("./admin-header.php");
if ($user_level < get_settings('links_minadminlevel')) {
die("You have no right to edit the links for this blog.<br>Ask for a promotion to your <a href=\"mailto:$admin_email\">blog admin</a> :)");
}
@ -454,9 +454,9 @@ function checkAll(form)
//-->
</script>
<ul id="adminmenu2">
<li><a href="linkmanager.php" class="current">Manage Links</a></li>
<li><a href="linkcategories.php">Link Categories</a></li>
<li class="last"><a href="links.import.php">Import Blogroll</a></li>
<li><a href="link-manager.php" class="current">Manage Links</a></li>
<li><a href="link-categories.php">Link Categories</a></li>
<li class="last"><a href="link-import.php">Import Blogroll</a></li>
</ul>
<div class="wrap">
<form name="cats" method="post">
@ -715,4 +715,4 @@ LINKS;
<?php include('b2footer.php'); ?>
<?php include('admin-footer.php'); ?>

View File

@ -1,6 +1,6 @@
<?php
require_once('../wp-config.php');
require_once($abspath.$b2inc.'/b2functions.php');
require_once($abspath.$b2inc.'/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

@ -2,7 +2,7 @@
<ul id="adminmenu">
<?php
$menu = file('./b2menutop.txt');
$menu = file('./menu.txt');
$continue = true;
foreach ($menu as $item) {
$class = '';
@ -21,7 +21,7 @@ foreach ($menu as $item) {
<li><a href="javascript:profile(<?php echo $user_ID ?>)">My Profile</a></li>
<li><a href="<?php echo "$siteurl/$blogfilename"; ?>">View site</a></li>
<li class="last"><a href="<?php echo $siteurl ?>/b2login.php?action=logout">Logout (<?php echo stripslashes($user_nickname) ?>)</a></li>
<li class="last"><a href="<?php echo $siteurl ?>/wp-login.php?action=logout">Logout (<?php echo stripslashes($user_nickname) ?>)</a></li>
</ul>
<h2><?php echo $title; ?></h2>

View File

@ -1,9 +1,9 @@
1 wp-post.php Post
1 post.php Post
1 edit.php Edit
3 categories.php Categories
5 linkmanager.php Links
5 link-manager.php Links
3 users.php Users
4 wp-options.php Options
4 options.php Options
4 templates.php Templates
***
(Everything after the '***' is a comment.)

View File

@ -43,7 +43,7 @@ switch($action) {
case 'update':
$standalone = 1;
require_once('b2header.php');
require_once('admin-header.php');
if ($user_level < 3) {
die('<p>Your level is not high enough to moderate comments. Ask for a promotion from your <a href="mailto:$admin_email">blog admin</a>. :)</p>');
@ -84,7 +84,7 @@ break;
default:
require_once('b2header.php');
require_once('admin-header.php');
if ($user_level <= 3) {
die('<p>Your level is not high enough to moderate comments. Ask for a promotion from your <a href="mailto:$admin_email">blog admin</a>. :)</p>');
@ -93,7 +93,7 @@ default:
<ul id="adminmenu2">
<li><a href="edit.php">Latest Posts</a></li>
<li><a href="edit-comments.php">Latest Comments</a></li>
<li class="last"><a href="wp-moderation.php" class="current">Comments Awaiting Moderation</a></li>
<li class="last"><a href="moderation.php" class="current">Comments Awaiting Moderation</a></li>
</ul>
<?php
@ -150,8 +150,8 @@ if ($comments) {
<p><strong>Name:</strong> <?php comment_author() ?> <?php if ($comment->comment_author_email) { ?>| <strong>Email:</strong> <?php comment_author_email_link() ?> <?php } if ($comment->comment_author_email) { ?> | <strong>URI:</strong> <?php comment_author_url_link() ?> <?php } ?>| <strong>IP:</strong> <a href="http://ws.arin.net/cgi-bin/whois.pl?queryinput=<?php comment_author_IP() ?>"><?php comment_author_IP() ?></a></p>
<?php comment_text() ?>
<p><?php
echo "<a href=\"wp-post.php?action=editcomment&amp;comment=".$comment->comment_ID."\">Edit</a>";
echo " | <a href=\"wp-post.php?action=deletecomment&amp;p=".$comment->comment_post_ID."&amp;comment=".$comment->comment_ID."\" onclick=\"return confirm('You are about to delete this comment by \'".$comment->comment_author."\'\\n \'Cancel\' to stop, \'OK\' to delete.')\">Delete just this comment</a> | "; ?>Bulk action:
echo "<a href=\"post.php?action=editcomment&amp;comment=".$comment->comment_ID."\">Edit</a>";
echo " | <a href=\"post.php?action=deletecomment&amp;p=".$comment->comment_post_ID."&amp;comment=".$comment->comment_ID."\" onclick=\"return confirm('You are about to delete this comment by \'".$comment->comment_author."\'\\n \'Cancel\' to stop, \'OK\' to delete.')\">Delete just this comment</a> | "; ?>Bulk action:
<input type="radio" name="comment[<?php echo $comment->comment_ID; ?>]" id="comment[<?php echo $comment->comment_ID; ?>]-approve" value="approve" /> <label for="comment[<?php echo $comment->comment_ID; ?>]-approve">Approve</label>
<input type="radio" name="comment[<?php echo $comment->comment_ID; ?>]" id="comment[<?php echo $comment->comment_ID; ?>]-delete" value="delete" /> <label for="comment[<?php echo $comment->comment_ID; ?>]-delete">Delete</label>
<input type="radio" name="comment[<?php echo $comment->comment_ID; ?>]" id="comment[<?php echo $comment->comment_ID; ?>]-nothing" value="later" checked="checked" /> <label for="comment[<?php echo $comment->comment_ID; ?>]-nothing">Do nothing</label>
@ -199,4 +199,4 @@ break;
}
/* </Template> */
include("b2footer.php") ?>
include("admin-footer.php") ?>

View File

@ -1,6 +1,6 @@
<?php
$title = 'Permalink Options';
$this_file = 'wp-options.php';
$this_file = 'options.php';
function add_magic_quotes($array) {
foreach ($array as $k => $v) {
@ -49,7 +49,7 @@ switch($action) {
default:
$standalone = 0;
include_once('b2header.php');
include_once('admin-header.php');
if ($user_level <= 3) {
die("You have no right to edit the options for this blog.<br>Ask for a promotion to your <a href=\"mailto:$admin_email\">blog admin</a> :)");
}
@ -68,7 +68,7 @@ default:
}
} // end for each group
?>
<li class="last"><a href="wp-options-permalink.php">Permalinks</a></li>
<li class="last"><a href="options-permalink.php">Permalinks</a></li>
</ul>
<br clear="all" />
<div class="wrap">
@ -82,7 +82,7 @@ default:
<li><code>%post_id%</code> --- The unique ID # of the post. <strong></strong></li>
</ul>
<p>So for example a value like <code>/archives/%year%/%monthnum%/%day%/%postname%/</code> could give you a permalink like <code>/archives/2003/05/23/my-cheese-sandwich/</code> . For this to work you'll need mod_rewrite installed on your server for the rule generation rule to work below. In the future there may be other options. </p>
<form name="form" action="wp-options-permalink.php" method="post">
<form name="form" action="options-permalink.php" method="post">
<p>Use the template tags above to create a virtual site structure:</p>
<p>
<input name="permalink_structure" type="text" style="width: 100%;" value="<?php echo $permalink_structure; ?>" />
@ -165,4 +165,4 @@ echo "</div>\n";
break;
}
include("b2footer.php") ?>
include("admin-footer.php") ?>

View File

@ -1,6 +1,6 @@
<?php
$title = 'Options';
$this_file = 'wp-options.php';
$this_file = 'options.php';
function add_magic_quotes($array) {
foreach ($array as $k => $v) {
@ -44,7 +44,7 @@ switch($action) {
case "update":
$standalone = 0;
include_once("./b2header.php");
include_once("./admin-header.php");
$any_changed = 0;
// iterate through the list of options in this group
@ -100,7 +100,7 @@ case "update":
default:
$standalone = 0;
include_once("./b2header.php");
include_once("./admin-header.php");
if ($user_level <= 3) {
die("You have no right to edit the options for this blog.<br>Ask for a promotion to your <a href=\"mailto:$admin_email\">blog admin</a> :)");
}
@ -119,7 +119,7 @@ default:
}
} // end for each group
?>
<li class="last"><a href="wp-options-permalink.php">Permalinks</a></li>
<li class="last"><a href="options-permalink.php">Permalinks</a></li>
</ul>
<br clear="all" />
<div class="wrap">
@ -168,4 +168,4 @@ if ($current_long_desc != '') {
break;
}
include("b2footer.php") ?>
include("admin-footer.php") ?>

View File

@ -40,7 +40,7 @@ switch($action) {
case 'post':
$standalone = 1;
require_once('b2header.php');
require_once('admin-header.php');
$post_pingback = intval($HTTP_POST_VARS['post_pingback']);
$content = balanceTags($HTTP_POST_VARS['content']);
@ -126,20 +126,20 @@ switch($action) {
if (!empty($HTTP_POST_VARS['mode'])) {
switch($HTTP_POST_VARS['mode']) {
case 'bookmarklet':
$location = 'b2bookmarklet.php?a=b';
$location = 'bookmarklet.php?a=b';
break;
case 'sidebar':
$location = 'b2sidebar.php?a=b';
$location = 'sidebar.php?a=b';
break;
default:
$location = 'wp-post.php';
$location = 'post.php';
break;
}
} else {
$location = 'wp-post.php';
$location = 'post.php';
}
if ('' != $HTTP_POST_VARS['save']) $location = "wp-post.php?action=edit&post=$post_ID";
if ('' != $HTTP_POST_VARS['save']) $location = "post.php?action=edit&post=$post_ID";
header("Location: $location");
if ($post_status == 'publish') {
@ -175,7 +175,7 @@ switch($action) {
$title = 'Edit';
$standalone = 0;
require_once('b2header.php');
require_once('admin-header.php');
$post = $HTTP_GET_VARS['post'];
if ($user_level > 0) {
@ -196,7 +196,7 @@ switch($action) {
$ping_status = $postdata['ping_status'];
$post_password = $postdata['post_password'];
include('wp-edit.form.php');
include('edit-form.php');
} else {
?>
<p>Since you&#8217;re a newcomer, you&#8217;ll have to wait for an admin to raise your level to 1,
@ -212,7 +212,7 @@ switch($action) {
case 'editpost':
$standalone = 1;
require_once('./b2header.php');
require_once('./admin-header.php');
if ($user_level == 0)
die ('Cheatin&#8217; uh?');
@ -317,20 +317,20 @@ switch($action) {
}
} // end if publish
$location = "Location: wp-post.php";
$location = "Location: post.php";
header ($location);
break;
case 'delete':
$standalone = 1;
require_once('./b2header.php');
require_once('./admin-header.php');
if ($user_level == 0)
die ('Cheatin&#8217; uh?');
$post_id = $HTTP_GET_VARS['post'];
$postdata = get_postdata($post) or die('Oops, no post with this ID. <a href="wp-post.php">Go back</a>!');
$postdata = get_postdata($post) or die('Oops, no post with this ID. <a href="post.php">Go back</a>!');
$authordata = get_userdata($postdata['Author_ID']);
if ($user_level < $authordata->user_level)
@ -359,7 +359,7 @@ switch($action) {
// pingWeblogs($blog_ID);
$sendback = $HTTP_SERVER_VARS['HTTP_REFERER'];
if (strstr($sendback, 'wp-post')) $sendback = $siteurl .'/wp-admin/wp-post.php';
if (strstr($sendback, 'wp-post')) $sendback = $siteurl .'/wp-admin/post.php';
header ('Location: ' . $sendback);
break;
@ -367,7 +367,7 @@ switch($action) {
case 'editcomment':
$title = 'Edit Comment';
$standalone = 0;
require_once ('b2header.php');
require_once ('admin-header.php');
get_currentuserinfo();
@ -380,14 +380,14 @@ switch($action) {
$content = $commentdata['comment_content'];
$content = format_to_edit($content);
include('wp-edit.form.php');
include('edit-form.php');
break;
case 'confirmdeletecomment':
$standalone = 0;
require_once('./b2header.php');
require_once('./admin-header.php');
if ($user_level == 0)
die ('Cheatin&#8217; uh?');
@ -406,7 +406,7 @@ switch($action) {
echo "</table>\n";
echo "<p>Are you sure you want to do that?</p>\n";
echo "<form action=\"$siteurl/wp-admin/wp-post.php\" method=\"get\">\n";
echo "<form action=\"$siteurl/wp-admin/post.php\" method=\"get\">\n";
echo "<input type=\"hidden\" name=\"action\" value=\"deletecomment\" />\n";
echo "<input type=\"hidden\" name=\"p\" value=\"$p\" />\n";
echo "<input type=\"hidden\" name=\"comment\" value=\"$comment\" />\n";
@ -422,7 +422,7 @@ switch($action) {
case 'deletecomment':
$standalone = 1;
require_once('./b2header.php');
require_once('./admin-header.php');
if ($user_level == 0)
die ('Cheatin&#8217; uh?');
@ -437,11 +437,11 @@ switch($action) {
}
$postdata = get_postdata($p) or die('Oops, no post with this ID. <a href="edit.php">Go back</a>!');
$commentdata = get_commentdata($comment, 1, true) or die('Oops, no comment with this ID. <a href="wp-post.php">Go back</a>!');
$commentdata = get_commentdata($comment, 1, true) or die('Oops, no comment with this ID. <a href="post.php">Go back</a>!');
$authordata = get_userdata($postdata['Author_ID']);
if ($user_level < $authordata->user_level)
die ('You don&#8217;t have the right to delete <strong>'.$authordata->user_nickname.'</strong>&#8217;s post comments. <a href="wp-post.php">Go back</a>!');
die ('You don&#8217;t have the right to delete <strong>'.$authordata->user_nickname.'</strong>&#8217;s post comments. <a href="post.php">Go back</a>!');
wp_set_comment_status($comment, "delete");
@ -456,7 +456,7 @@ switch($action) {
case 'unapprovecomment':
$standalone = 1;
require_once('./b2header.php');
require_once('./admin-header.php');
if ($user_level == 0)
die ('Cheatin&#8217; uh?');
@ -484,7 +484,7 @@ switch($action) {
case 'mailapprovecomment':
$standalone = 0;
require_once('./b2header.php');
require_once('./admin-header.php');
if ($user_level == 0)
die ('Cheatin&#8217; uh?');
@ -513,7 +513,7 @@ switch($action) {
case 'approvecomment':
$standalone = 1;
require_once('./b2header.php');
require_once('./admin-header.php');
if ($user_level == 0)
die ('Cheatin&#8217; uh?');
@ -544,7 +544,7 @@ switch($action) {
case 'editedcomment':
$standalone = 1;
require_once('./b2header.php');
require_once('./admin-header.php');
if ($user_level == 0)
die ('Cheatin&#8217; uh?');
@ -594,7 +594,7 @@ switch($action) {
default:
$title = 'Create New Post';
$standalone = 0;
require_once ('./b2header.php');
require_once ('./admin-header.php');
if ($user_level > 0) {
if ((!$withcomments) && (!$c)) {
@ -614,7 +614,7 @@ switch($action) {
$draft->post_title = stripslashes($draft->post_title);
if ($draft->post_title == '')
$draft->post_title = 'Post #'.$draft->ID;
echo "<a href='wp-post.php?action=edit&amp;post=$draft->ID' title='Edit this draft'>$draft->post_title</a>";
echo "<a href='post.php?action=edit&amp;post=$draft->ID' title='Edit this draft'>$draft->post_title</a>";
++$i;
}
?>.</p>
@ -627,7 +627,7 @@ switch($action) {
$ping_status = get_settings('default_ping_status');
$post_pingback = get_settings('default_pingback_flag');
$default_post_cat = get_settings('default_post_category');
include('wp-edit.form.php');
include('edit-form.php');
echo '<br /><br />';
}
@ -647,5 +647,5 @@ switch($action) {
break;
} // end switch
/* </Edit> */
include('b2footer.php');
include('admin-footer.php');
?>

View File

@ -35,13 +35,13 @@ for ($i=0; $i<count($b2varstoreset); $i += 1) {
}
require_once('../wp-config.php');
require_once($abspath.$b2inc.'/b2functions.php');
require_once($abspath.$b2inc.'/functions.php');
switch($action) {
case 'update':
require_once('b2verifauth.php');
require_once('auth.php');
get_currentuserinfo();
@ -112,14 +112,14 @@ break;
case 'viewprofile':
require_once('b2verifauth.php');
require_once('auth.php');
$profiledata = get_userdata($user);
if ($HTTP_COOKIE_VARS['wordpressuser_'.$cookiehash] == $profiledata->user_login)
header ('Location: b2profile.php');
header ('Location: profile.php');
$profile = 1;
include('b2header.php');
include('admin-header.php');
?>
<h1 id="wphead"><a href="http://wordpress.org" rel="external"><span>WordPress</span></a></h1>
@ -193,7 +193,7 @@ break;
case 'IErightclick':
$profile = 1;
include ('b2header.php');
include ('admin-header.php');
$bookmarklet_tbpb = ($use_trackback) ? '&trackback=1' : '';
$bookmarklet_tbpb .= ($use_pingback) ? '&pingback=1' : '';
@ -208,7 +208,7 @@ case 'IErightclick':
<p>To have a one-click bookmarklet, just copy and paste this<br />into a new text file:</p>
<?php
$regedit = "REGEDIT4\r\n[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MenuExt\Post To &WP : ".$blogname."]\r\n@=\"javascript:doc=external.menuArguments.document;Q=doc.selection.createRange().text;void(btw=window.open('".$siteurl."/wp-admin/b2bookmarklet.php?text='+escape(Q)+'".$bookmarklet_tbpb."&popupurl='+escape(doc.location.href)+'&popuptitle='+escape(doc.title),'b2bookmarklet','scrollbars=no,width=480,height=".$bookmarklet_height.",left=100,top=150,status=yes'));btw.focus();\"\r\n\"contexts\"=hex:31\"";
$regedit = "REGEDIT4\r\n[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MenuExt\Post To &WP : ".$blogname."]\r\n@=\"javascript:doc=external.menuArguments.document;Q=doc.selection.createRange().text;void(btw=window.open('".$siteurl."/wp-admin/bookmarklet.php?text='+escape(Q)+'".$bookmarklet_tbpb."&popupurl='+escape(doc.location.href)+'&popuptitle='+escape(doc.title),'b2bookmarklet','scrollbars=no,width=480,height=".$bookmarklet_height.",left=100,top=150,status=yes'));btw.focus();\"\r\n\"contexts\"=hex:31\"";
?>
<pre style="margin: 20px; background-color: #cccccc; border: 1px dashed #333333; padding: 5px; font-size: 12px;"><?php echo $regedit; ?></pre>
<p>Save it as wordpress.reg, and double-click on this file in an Explorer<br />
@ -231,7 +231,7 @@ break;
default:
$profile = 1;
include ('b2header.php');
include ('admin-header.php');
$profiledata=get_userdata($user_ID);
$bookmarklet_tbpb = ($use_trackback) ? '&trackback=1' : '';
@ -240,7 +240,7 @@ default:
?>
<h1 id="wphead"><a href="http://wordpress.org" rel="external"><span>WordPress</span></a></h1>
<form name="profile" id="profile" action="b2profile.php" method="post">
<form name="profile" id="profile" action="profile.php" method="post">
<h2>Edit Your Profile</h2>
<p>
<input type="hidden" name="action" value="update" />
@ -324,17 +324,17 @@ default:
<?php
if ($is_NS4 || $is_gecko) {
?>
<a href="javascript:Q=document.selection?document.selection.createRange().text:document.getSelection();void(window.open('<?php echo $siteurl ?>/wp-admin/b2bookmarklet.php?text='+escape(Q)+'<?php echo $bookmarklet_tbpb ?>&popupurl='+escape(location.href)+'&popuptitle='+escape(document.title),'WordPress bookmarklet','scrollbars=no,width=480,height=<?php echo $bookmarklet_height ?>,left=100,top=150,status=yes'));">WordPress
<a href="javascript:Q=document.selection?document.selection.createRange().text:document.getSelection();void(window.open('<?php echo $siteurl ?>/wp-admin/bookmarklet.php?text='+escape(Q)+'<?php echo $bookmarklet_tbpb ?>&popupurl='+escape(location.href)+'&popuptitle='+escape(document.title),'WordPress bookmarklet','scrollbars=no,width=480,height=<?php echo $bookmarklet_height ?>,left=100,top=150,status=yes'));">WordPress
- <?php echo $blogname ?></a>
<?php
} else if ($is_winIE) {
?>
<a href="javascript:Q='';if(top.frames.length==0)Q=document.selection.createRange().text;void(btw=window.open('<?php echo $siteurl ?>/wp-admin/b2bookmarklet.php?text='+escape(Q)+'<?php echo $bookmarklet_tbpb ?>&popupurl='+escape(location.href)+'&popuptitle='+escape(document.title),'b2bookmarklet','scrollbars=no,width=480,height=<?php echo $bookmarklet_height ?>,left=100,top=150,status=yes'));btw.focus();">WordPress
<a href="javascript:Q='';if(top.frames.length==0)Q=document.selection.createRange().text;void(btw=window.open('<?php echo $siteurl ?>/wp-admin/bookmarklet.php?text='+escape(Q)+'<?php echo $bookmarklet_tbpb ?>&popupurl='+escape(location.href)+'&popuptitle='+escape(document.title),'b2bookmarklet','scrollbars=no,width=480,height=<?php echo $bookmarklet_height ?>,left=100,top=150,status=yes'));btw.focus();">WordPress
- <?php echo $blogname ?></a>
<script type="text/javascript" language="JavaScript">
<!--
function oneclickbookmarklet(blah) {
window.open ("b2profile.php?action=IErightclick", "oneclickbookmarklet", "width=500, height=450, location=0, menubar=0, resizable=0, scrollbars=1, status=1, titlebar=0, toolbar=0, screenX=120, left=120, screenY=120, top=120");
window.open ("profile.php?action=IErightclick", "oneclickbookmarklet", "width=500, height=450, location=0, menubar=0, resizable=0, scrollbars=1, status=1, titlebar=0, toolbar=0, screenX=120, left=120, screenY=120, top=120");
}
// -->
</script>
@ -345,12 +345,12 @@ function oneclickbookmarklet(blah) {
<?php
} else if ($is_opera) {
?>
<a href="javascript:void(window.open('<?php echo $siteurl ?>/wp-admin/b2bookmarklet.php?popupurl='+escape(location.href)+'&popuptitle='+escape(document.title)+'<?php echo $bookmarklet_tbpb ?>','b2bookmarklet','scrollbars=no,width=480,height=<?php echo $bookmarklet_height ?>,left=100,top=150,status=yes'));">WordPress
<a href="javascript:void(window.open('<?php echo $siteurl ?>/wp-admin/bookmarklet.php?popupurl='+escape(location.href)+'&popuptitle='+escape(document.title)+'<?php echo $bookmarklet_tbpb ?>','b2bookmarklet','scrollbars=no,width=480,height=<?php echo $bookmarklet_height ?>,left=100,top=150,status=yes'));">WordPress
- <?php echo $blogname ?></a>
<?php
} else if ($is_macIE) {
?>
<a href="javascript:Q='';if(top.frames.length==0);void(btw=window.open('<?php echo $siteurl ?>/wp-admin/b2bookmarklet.php?text='+escape(document.getSelection())+'&popupurl='+escape(location.href)+'&popuptitle='+escape(document.title)+'<?php echo $bookmarklet_tbpb ?>','b2bookmarklet','scrollbars=no,width=480,height=<?php echo $bookmarklet_height ?>,left=100,top=150,status=yes'));btw.focus();">WordPress
<a href="javascript:Q='';if(top.frames.length==0);void(btw=window.open('<?php echo $siteurl ?>/wp-admin/bookmarklet.php?text='+escape(document.getSelection())+'&popupurl='+escape(location.href)+'&popuptitle='+escape(document.title)+'<?php echo $bookmarklet_tbpb ?>','b2bookmarklet','scrollbars=no,width=480,height=<?php echo $bookmarklet_height ?>,left=100,top=150,status=yes'));btw.focus();">WordPress
- <?php echo $blogname ?></a>
<?php
}
@ -362,7 +362,7 @@ function oneclickbookmarklet(blah) {
function addPanel()
{
if ((typeof window.sidebar == "object") && (typeof window.sidebar.addPanel == "function"))
window.sidebar.addPanel("WordPress Post: <?php echo $blogname ?>","<?php echo $siteurl ?>/wp-admin/b2sidebar.php","");
window.sidebar.addPanel("WordPress Post: <?php echo $blogname ?>","<?php echo $siteurl ?>/wp-admin/sidebar.php","");
else
alert('No Sidebar found! You must use Mozilla 0.9.4 or later!');
}
@ -374,7 +374,7 @@ function addPanel()
<br />
<strong>SideBar</strong><br />
Add this link to your favorites:<br />
<a href="javascript:Q='';if(top.frames.length==0)Q=document.selection.createRange().text;void(_search=open('<?php echo $siteurl ?>/wp-admin/b2sidebar.php?text='+escape(Q)+'&popupurl='+escape(location.href)+'&popuptitle='+escape(document.title),'_search'))">WordPress
<a href="javascript:Q='';if(top.frames.length==0)Q=document.selection.createRange().text;void(_search=open('<?php echo $siteurl ?>/wp-admin/sidebar.php?text='+escape(Q)+'&popupurl='+escape(location.href)+'&popuptitle='+escape(document.title),'_search'))">WordPress
Sidebar</a>.
<?php } ?>
</p>
@ -389,4 +389,4 @@ break;
}
/* </Profile | My Profile> */
include('b2footer.php') ?>
include('admin-footer.php') ?>

2
wp-admin/quicktags.php Normal file
View File

@ -0,0 +1,2 @@
<script src="quicktags.js" language="JavaScript" type="text/javascript"></script>
<script language="JavaScript" type="text/javascript">edToolbar();</script>

View File

@ -7,7 +7,7 @@ function selected($selected, $current) {
$mode = "sidebar";
$standalone = 1;
require_once("b2header.php");
require_once("admin-header.php");
get_currentuserinfo();
@ -35,7 +35,7 @@ if ($a=="b") {
<table cellspacing="0" cellpadding="15" width="90%" border="0" style="border-color: #cccccc; border-width:1; border-style: solid;" align="center">
<td>
<p>Posted !</p>
<p><a href="b2sidebar.php">Click here</a> to post again.</p>
<p><a href="sidebar.php">Click here</a> to post again.</p>
</td>
</table>
</body>
@ -75,7 +75,7 @@ textarea,input,select {
</style>
</head>
<body>
<form name="post" action="wp-post.php" method="POST" accept-charset="iso-8859-1">
<form name="post" action="post.php" method="POST" accept-charset="iso-8859-1">
<input type="hidden" name="action" value="post" />
<input type="hidden" name="user_ID" value="<?php echo $user_ID ?>" />
<input type="hidden" name="mode" value="sidebar" />

View File

@ -39,7 +39,7 @@ switch($action) {
case 'update':
$standalone = 1;
require_once("b2header.php");
require_once("admin-header.php");
if ($user_level < 3) {
die('<p>You have no right to edit the template for this blog.<br />Ask for a promotion to your <a href="mailto:$admin_email">blog admin</a>. :)</p>');
@ -59,7 +59,7 @@ break;
default:
require_once('b2header.php');
require_once('admin-header.php');
if ($user_level <= 3) {
die('<p>You have no right to edit the template for this blog.<br>Ask for a promotion to your <a href="mailto:$admin_email">blog admin</a>. :)</p>');
@ -127,7 +127,7 @@ default:
?>
</div>
<div class="wrap">
<p>You can also edit the <a href="templates.php?file=b2comments.php">comments template</a> or the <a href="templates.php?file=b2commentspopup.php">popup comments template</a>, or edit any other file (provided it&#8217;s writable by the server, e.g. CHMOD 766).</p>
<p>You can also edit the <a href="templates.php?file=wp-comments.php">comments template</a> or the <a href="templates.php?file=wp-comments-popup.php">popup comments template</a>, or edit any other file (provided it&#8217;s writable by the server, e.g. CHMOD 766).</p>
<p>To edit a file, type its name here:</p>
<form name="file" action="templates.php" method="get">
<input type="text" name="file" />
@ -140,4 +140,4 @@ default:
break;
}
include("b2footer.php") ?>
include("admin-footer.php") ?>

View File

@ -2,7 +2,7 @@
$_wp_installing = 1;
if (!file_exists('../wp-config.php')) die("There doesn't seem to be a wp-config.php file. Double check that you updated wp-config.sample.php with the proper database connection information and renamed it to wp-config.php.");
require('../wp-config.php');
require('wp-install-helper.php');
require('install-helper.php');
$thisfile = 'upgrade-071-to-072.php';
$step = $HTTP_GET_VARS['step'];
@ -408,7 +408,7 @@ $option_data = array(
"INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(14,'use_htmltrans', 2, '1', 'IMPORTANT! set this to false if you are using Chinese, Japanese, Korean, or other double-bytes languages', 8, 20)",
"INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(15,'use_balanceTags', 2, '1', 'this could help balance your HTML code. if it gives bad results, set it to false', 8, 20)",
"INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(16,'use_smilies', 2, '1', 'set this to true to enable smiley conversion in posts (note: this makes smiley conversion in ALL posts)', 8, 20)",
"INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(17,'smilies_directory', 3, 'http://example.com/b2-img/smilies', 'the directory where your smilies are (no trailing slash)', 8, 40)",
"INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(17,'smilies_directory', 3, 'http://example.com/wp-images/smilies', 'the directory where your smilies are (no trailing slash)', 8, 40)",
"INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(18,'require_name_email', 2, '0', 'set this to true to require e-mail and name, or false to allow comments without e-mail/name', 8, 20)",
"INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(19,'comment_allowed_tags', 3, '<b><i><strong><em><code><blockquote><p><br><strike><a>', 'here is a list of the tags that are allowed in the comments. You can add tags to the list, just add them in the string, add only the opening tag: for example, only \'&lt;a>\' instead of \'&lt;a href=\"\">&lt;/a>\'', 8, 40)",
"INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(20,'comments_notify', 2, '1', 'set this to true to let every author be notified about comments on their posts', 8, 20)",
@ -709,7 +709,7 @@ foreach ($links_option_data as $query) {
} else {
?>
<p>Hmm... I couldn't find links.config.php so I couldn't transfer all your settings.
You need to check them on the <a href="wp-options.php?option_group_id=8">admin options page</a>.</p>
You need to check them on the <a href="options.php?option_group_id=8">admin options page</a>.</p>
<?php
} // end else no links.config
?>
@ -819,7 +819,7 @@ foreach ($links_option_data as $query) {
} else {
?>
<p>Hmm... I couldn't find b2config.php so I couldn't transfer all your settings.
You need to check them on the <a href="wp-options.php?option_group_id=6">admin options page</a>.</p>
You need to check them on the <a href="options.php?option_group_id=6">admin options page</a>.</p>
<p>You can now go play with your <a href="<?php echo $siteurl ? $siteurl : '../index.php'; ?>">updated blog</a> </p>
<?php
} // end else no b2config

View File

@ -1,6 +1,6 @@
<?php
require_once('../wp-config.php');
require('wp-install-helper.php');
require('install-helper.php');
$step = $HTTP_GET_VARS['step'];
if (!$step) $step = 0;
@ -109,7 +109,7 @@ if (!$wpdb->get_var("SELECT option_name FROM $tableoptions WHERE option_name = '
$wpdb->query("INSERT INTO `$tableoptions`
(`option_id`, `blog_id`, `option_name`, `option_can_override`, `option_type`, `option_value`, `option_width`, `option_height`, `option_description`, `option_admin_level`)
VALUES
('', '0', 'permalink_structure', 'Y', '3', '', '20', '8', 'How the permalinks for your site are constructed. See <a href=\"wp-options-permalink.php\">permalink options page</a> for necessary mod_rewrite rules and more information.', '8');");
('', '0', 'permalink_structure', 'Y', '3', '', '20', '8', 'How the permalinks for your site are constructed. See <a href=\"options-permalink.php\">permalink options page</a> for necessary mod_rewrite rules and more information.', '8');");
}
?>
Done with the name game. Now a little option action. </p>
@ -270,7 +270,7 @@ foreach ($allposts as $post) {
// Going to leave the post table category field in for now. We can remove it in a future version.
?>
All done!</p>
<p>You are ready to rock &#8217;n roll. <a href="../b2login.php">Go crazy</a>.</p>
<p>You are ready to rock &#8217;n roll. <a href="../wp-login.php">Go crazy</a>.</p>
<?php
break;
}

View File

@ -2,7 +2,7 @@
/* b2 File Upload - original hack by shockingbird.com */
$standalone="1";
require_once("./b2header.php");
require_once("./admin-header.php");
if ($user_level == 0) //Checks to see if user has logged in
die ("Cheatin' uh ?");
@ -21,9 +21,9 @@ $allowed_types = explode(" ", trim($fileupload_allowedtypes));
body {
background-image: url('<?php
if ($is_gecko || $is_macIE) {
?>../b2-img/bgbookmarklet3.gif<?php
?>../wp-images/bgbookmarklet3.gif<?php
} else {
?>../b2-img/bgbookmarklet3.gif<?php
?>../wp-images/bgbookmarklet3.gif<?php
}
?>');
background-repeat: no-repeat;
@ -35,7 +35,7 @@ if (!$is_NS4) {
textarea,input,select {
background-color: white;
/*<?php if ($is_gecko || $is_macIE) { ?>
background-image: url('../b2-img/bgbookmarklet3.gif');
background-image: url('../wp-images/bgbookmarklet3.gif');
<?php } elseif ($is_winIE) { ?>
background-color: #cccccc;
filter: alpha(opacity:80);
@ -90,7 +90,7 @@ function targetopener(blah, closeme, closeonly) {
<table align="center" width="100%" height="100%" cellpadding="15" cellspacing="0" border="1" style="border-width: 1px; border-color: #cccccc;">
<tbody>
<tr>
<td valign="top" style="background-color: transparent; <?php if ($is_gecko || $is_macIE) { ?>background-image: url('../b2-img/bgbookmarklet3.gif');<?php } elseif ($is_winIE) { ?>background-color: #cccccc; filter: alpha(opacity:60);<?php } ?>;">
<td valign="top" style="background-color: transparent; <?php if ($is_gecko || $is_macIE) { ?>background-image: url('../wp-images/bgbookmarklet3.gif');<?php } elseif ($is_winIE) { ?>background-color: #cccccc; filter: alpha(opacity:60);<?php } ?>;">
<?php
if (!$HTTP_POST_VARS["submit"]) {
@ -99,7 +99,7 @@ if (!$HTTP_POST_VARS["submit"]) {
<p><strong>File upload</strong></p>
<p>You can upload files of type:<br /><em><?php echo $i ?></em></p>
<p>The maximum size of the file should be:<br /><em><?php echo $fileupload_maxk ?> KB</em></p>
<form action="b2upload.php" method="post" enctype="multipart/form-data">
<form action="upload.php" method="post" enctype="multipart/form-data">
<input type="hidden" name="MAX_FILE_SIZE" value="<?php echo $fileupload_maxk*1024 ?>" />
<input type="file" name="img1" size="30" class="uploadform" />
<br /><br />
@ -184,7 +184,7 @@ if (!empty($HTTP_POST_VARS)) { //$img1_name != "") {
<p><b><em>The filename '<?php echo $img1_name; ?>' already exists!</em></b></p>
<p> filename '<?php echo $img1; ?>' moved to '<?php echo "$pathtofile2 - $img2_name"; ?>'</p>
<p>Confirm or rename:</p>
<form action="b2upload.php" method="post" enctype="multipart/form-data">
<form action="upload.php" method="post" enctype="multipart/form-data">
<input type="hidden" name="MAX_FILE_SIZE" value="<?php echo $fileupload_maxk*1024 ?>" />
<input type="hidden" name="img1_type" value="<?php echo $img1_type;?>" />
<input type="hidden" name="img1_name" value="<?php echo $img2_name;?>" />

View File

@ -23,7 +23,7 @@ switch ($action) {
case 'promote':
$standalone = 1;
require_once('b2header.php');
require_once('admin-header.php');
if (empty($HTTP_GET_VARS['prom'])) {
header('Location: users.php');
@ -53,7 +53,7 @@ break;
case 'delete':
$standalone = 1;
require_once('b2header.php');
require_once('admin-header.php');
$id = $HTTP_GET_VARS['id'];
@ -80,7 +80,7 @@ break;
default:
$standalone = 0;
include ('b2header.php');
include ('admin-header.php');
?>
<div class="wrap">
<h2>Authors</h2>
@ -192,5 +192,5 @@ break;
}
/* </Team> */
include('b2footer.php');
include('admin-footer.php');
?>

View File

@ -293,12 +293,12 @@ textarea, input, select {
#wphead {
height: 44px;
margin: 0;
background: repeat-x url(../b2-img/header-shadow.png) #f2f2f2;
background: repeat-x url(../wp-images/header-shadow.png) #f2f2f2;
}
#wphead a {
display: block;
background: url(../b2-img/wp-small.png) no-repeat;
background: url(../wp-images/wp-small.png) no-repeat;
height: 44px;
text-decoration: none;
text-indent: -1000px;

View File

@ -1,2 +0,0 @@
<script src="wp-quicktags.js" language="JavaScript" type="text/javascript"></script>
<script language="JavaScript" type="text/javascript">edToolbar();</script>

331
wp-blog-header.php Normal file
View File

@ -0,0 +1,331 @@
<?php
// We need to move this into options
$use_cache = 1;
$use_gzipcompression = 1;
/* Including config and functions files */
$curpath = dirname(__FILE__).'/';
if (!file_exists($curpath . '/wp-config.php'))
die("There doesn't seem to be a <code>wp-config.php</code> file. I need this before we can get started. Need more help? <a href='http://wordpress.org/docs/faq/#wp-config'>We got it</a>.");
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');
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 = '';
} else {
$$b2var = $HTTP_GET_VARS[$b2var];
}
} else {
$$b2var = $HTTP_POST_VARS[$b2var];
}
}
}
/* Sending HTTP headers */
// It is presumptious to think that WP is the only thing that might change on the page.
@header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past
@header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // always modified
@header("Cache-Control: no-store, no-cache, must-revalidate"); // HTTP/1.1
@header("Cache-Control: post-check=0, pre-check=0", false);
@header("Pragma: no-cache"); // HTTP/1.0
@header ("X-Pingback: $siteurl/xmlrpc.php");
/* Getting settings from db */
if (isset($doing_rss) && $doing_rss == 1)
$posts_per_page=get_settings('posts_per_rss');
if (!isset($posts_per_page) || $posts_per_page == 0)
$posts_per_page = get_settings('posts_per_page');
$what_to_show = get_settings('what_to_show');
$archive_mode = get_settings('archive_mode');
$dateformat = stripslashes(get_settings('date_format'));
$timeformat = stripslashes(get_settings('time_format'));
$time_difference = get_settings('time_difference');
/* First let's clear some variables */
$whichcat = '';
$whichauthor = '';
$result = '';
$where = '';
$limits = '';
$distinct = '';
$join = '';
if ($pagenow != 'post.php') { timer_start(); }
if (isset($showposts) && $showposts) {
$showposts = (int)$showposts;
$posts_per_page = $showposts;
}
// if a month is specified in the querystring, load that month
if ($m != '') {
$m = ''.intval($m);
$where .= ' AND YEAR(post_date)='.substr($m,0,4);
if (strlen($m)>5)
$where .= ' AND MONTH(post_date)='.substr($m,4,2);
if (strlen($m)>7)
$where .= ' AND DAYOFMONTH(post_date)='.substr($m,6,2);
if (strlen($m)>9)
$where .= ' AND HOUR(post_date)='.substr($m,8,2);
if (strlen($m)>11)
$where .= ' AND MINUTE(post_date)='.substr($m,10,2);
if (strlen($m)>13)
$where .= ' AND SECOND(post_date)='.substr($m,12,2);
}
if ($year != '') {
$year = '' . intval($year);
$where .= ' AND YEAR(post_date)=' . $year;
}
if ($monthnum != '') {
$monthnum = '' . intval($monthnum);
$where .= ' AND MONTH(post_date)=' . $monthnum;
}
if ($day != '') {
$hay = '' . intval($day);
$where .= ' AND DAYOFMONTH(post_date)=' . $day;
}
if ($name != '') {
$name = preg_replace('/[^a-z0-9-]/', '', $name);
$where .= " AND post_name = '$name'";
}
if ($w != '') {
$w = ''.intval($w);
$where .= ' AND WEEK(post_date, 1)=' . $w;
}
// if a post number is specified, load that post
if (($p != '') && ($p != 'all')) {
$p = intval($p);
$where = ' AND ID = '.$p;
}
// if a search pattern is specified, load the posts that match
if (!empty($s)) {
$s = addslashes_gpc($s);
$search = ' AND (';
// puts spaces instead of commas
$s = preg_replace('/, +/', '', $s);
$s = str_replace(',', ' ', $s);
$s = str_replace('"', ' ', $s);
$s = trim($s);
if ($exact) {
$n = '';
} else {
$n = '%';
}
if (!$sentence) {
$s_array = explode(' ',$s);
$search .= '((post_title LIKE \''.$n.$s_array[0].$n.'\') OR (post_content LIKE \''.$s_array[0].'\'))';
for ( $i = 1; $i < count($s_array); $i = $i + 1) {
$search .= ' AND ((post_title LIKE \''.$n.$s_array[$i].$n.'\') OR (post_content LIKE \''.$n.$s_array[$i].$n.'\'))';
}
$search .= ' OR (post_title LIKE \''.$n.$s.$n.'\') OR (post_content LIKE \''.$n.$s.$n.'\')';
$search .= ')';
} else {
$search = ' AND ((post_title LIKE \''.$n.$s.$n.'\') OR (post_content LIKE \''.$n.$s.$n.'\'))';
}
}
// category stuff
if ((empty($cat)) || ($cat == 'all') || ($cat == '0')) {
$whichcat='';
} else {
$cat = ''.urldecode($cat).'';
$cat = addslashes_gpc($cat);
if (stristr($cat,'-')) {
$eq = '!=';
$andor = 'AND';
$cat = explode('-',$cat);
$cat = intval($cat[1]);
} else {
$eq = '=';
$andor = 'OR';
}
$join = " LEFT JOIN $tablepost2cat ON ($tableposts.ID = $tablepost2cat.post_id) ";
$cat_array = explode(' ',$cat);
$whichcat .= ' AND (category_id '.$eq.' '.intval($cat_array[0]);
for ($i = 1; $i < (count($cat_array)); $i = $i + 1) {
$whichcat .= ' '.$andor.' post_category '.$eq.' '.intval($cat_array[$i]);
}
$whichcat .= ')';
}
// Category stuff for nice URIs
if ('' != $category_name) {
$category_name = preg_replace('|[^a-z0-9-/]|', '', $category_name);
$join = " LEFT JOIN $tablepost2cat ON ($tableposts.ID = $tablepost2cat.post_id) LEFT JOIN $tablecategories ON ($tablepost2cat.category_id = $tablecategories.cat_ID) ";
$whichcat = " AND (category_nicename = '$category_name') ";
}
// author stuff
if ((empty($author)) || ($author == 'all') || ($author == '0')) {
$whichauthor='';
} else {
$author = ''.urldecode($author).'';
$author = addslashes_gpc($author);
if (stristr($author, '-')) {
$eq = '!=';
$andor = 'AND';
$author = explode('-', $author);
$author = ''.intval($author[1]);
} else {
$eq = '=';
$andor = 'OR';
}
$author_array = explode(' ', $author);
$whichauthor .= ' AND (post_author '.$eq.' '.intval($author_array[0]);
for ($i = 1; $i < (count($author_array)); $i = $i + 1) {
$whichauthor .= ' '.$andor.' post_author '.$eq.' '.intval($author_array[$i]);
}
$whichauthor .= ')';
}
$where .= $search.$whichcat.$whichauthor;
if ((empty($order)) || ((strtoupper($order) != 'ASC') && (strtoupper($order) != 'DESC'))) {
$order='DESC';
}
// order by stuff
if (empty($orderby)) {
$orderby='date '.$order;
} else {
// used to filter values
$allowed_keys = array('author','date','category','title');
$orderby = urldecode($orderby);
$orderby = addslashes_gpc($orderby);
$orderby_array = explode(' ',$orderby);
if (!in_array($orderby_array[0],$allowed_keys)) {
$orderby_array[0] = 'date';
}
$orderby = $orderby_array[0].' '.$order;
if (count($orderby_array)>1) {
for ($i = 1; $i < (count($orderby_array)); $i = $i + 1) {
// Only allow certain values for safety
if (in_array($orderby_array[$i],$allowed_keys)) {
$orderby .= ',post_'.$orderby_array[$i].' '.$order;
}
}
}
}
if ((!$whichcat) && (!$m) && (!$p) && (!$w) && (!$s) && empty($poststart) && empty($postend)) {
if ($what_to_show == 'posts') {
$limits = ' LIMIT '.$posts_per_page;
} elseif ($what_to_show == 'days') {
$lastpostdate = get_lastpostdate();
$lastpostdate = mysql2date('Y-m-d 00:00:00',$lastpostdate);
$lastpostdate = mysql2date('U',$lastpostdate);
$otherdate = date('Y-m-d H:i:s', ($lastpostdate - (($posts_per_page-1) * 86400)));
$where .= ' AND post_date > \''.$otherdate.'\'';
}
}
if ( !empty($postend) && ($postend > $poststart) && (!$m) && empty($monthnum) && empty($year) && empty($day) &&(!$w) && (!$whichcat) && (!$s) && (!$p)) {
if ($what_to_show == 'posts' || ($what_to_show == 'paged' && (!$paged))) {
$poststart = intval($poststart);
$postend = intval($postend);
$limposts = $postend - $poststart;
$limits = ' LIMIT '.$poststart.','.$limposts;
} elseif ($what_to_show == 'days') {
$poststart = intval($poststart);
$postend = intval($postend);
$limposts = $postend - $poststart;
$lastpostdate = get_lastpostdate();
$lastpostdate = mysql2date('Y-m-d 00:00:00',$lastpostdate);
$lastpostdate = mysql2date('U',$lastpostdate);
$startdate = date('Y-m-d H:i:s', ($lastpostdate - (($poststart -1) * 86400)));
$otherdate = date('Y-m-d H:i:s', ($lastpostdate - (($postend -1) * 86400)));
$where .= ' AND post_date > \''.$otherdate.'\' AND post_date < \''.$startdate.'\'';
}
} else {
if (($what_to_show == 'paged') && (!$p) && (!$more)) {
if ($pagenow != 'post.php') {
$pgstrt = '';
if ($paged) {
$pgstrt = (intval($paged) -1) * $posts_per_page . ', ';
}
$limits = 'LIMIT '.$pgstrt.$posts_per_page;
} else {
if (($m) || ($p) || ($w) || ($s) || ($whichcat)) {
$limits = '';
} else {
$pgstrt = '';
if ($paged) {
$pgstrt = (intval($paged) -1) * $posts_per_page . ', ';
}
$limits = 'LIMIT '.$pgstrt.$posts_per_page;
}
}
}
elseif (($m) || ($p) || ($w) || ($s) || ($whichcat) || ($author) || $monthnum || $year || $day) {
$limits = '';
}
}
if ($p == 'all') {
$where = '';
}
$now = date('Y-m-d H:i:s',(time() + ($time_difference * 3600)));
if ($pagenow != 'post.php') {
if ((empty($poststart)) || (empty($postend)) || !($postend > $poststart)) {
$where .= ' AND post_date <= \''.$now.'\'';
}
$distinct = 'DISTINCT';
if ($use_gzipcompression) {
// gzipping the output of the script
gzip_compression();
}
}
$where .= ' AND (post_status = "publish"';
// Get private posts
if (isset($user_ID) && ('' != intval($user_ID)))
$where .= " OR post_author = $user_ID AND post_status != 'draft')";
else
$where .= ')';
$request = " SELECT $distinct * FROM $tableposts $join WHERE 1=1".$where." ORDER BY post_$orderby $limits";
if ($preview) {
$request = 'SELECT 1-1'; // dummy mysql query for the preview
// little funky fix for IEwin, rawk on that code
$is_winIE = ((preg_match('/MSIE/',$HTTP_USER_AGENT)) && (preg_match('/Win/',$HTTP_USER_AGENT)));
if (($is_winIE) && (!isset($IEWin_bookmarklet_fix))) {
$preview_content = preg_replace('/\%u([0-9A-F]{4,4})/e', "'&#'.base_convert('\\1',16,10).';'", $preview_content);
}
}
// error_log("$request");
// echo $request;
$posts = $wpdb->get_results($request);
if (1 == count($posts)) {
if ($p || $name) {
$more = 1;
$c = 1;
$single = 1;
}
if ($s) { // If they were doing a search and got one result
header('Location: ' . get_permalink($posts[0]->ID));
}
}
?>

111
wp-comments-popup.php Normal file
View File

@ -0,0 +1,111 @@
<?php
/* Don't remove these lines. */
$blog = 1;
require ('wp-blog-header.php');
add_filter('comment_text', 'popuplinks');
foreach ($posts as $post) { start_b2();
?>
<!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>
<title><?php echo $blogname ?> - Comments on "<?php the_title() ?>"</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style type="text/css" media="screen">
@import url( wp-layout.css );
body { margin: 3px; }
</style>
</head>
<body id="commentspopup">
<h1 id="header"><a href="" title="<?php echo $blogname ?>"><?php echo $blogname ?></a></h1>
<h2 id="comments">Comments</h2>
<p><a href="<?php echo $siteurl; ?>/wp-commentsrss2.php?p=<?php echo $post->ID; ?>">RSS feed for comments on this post.</a></p>
<?php if ('open' == $post->ping_status) { ?>
<p>The <acronym title="Uniform Resource Identifier">URI</acronym> to TrackBack this entry is: <em><?php trackback_url() ?></em></p>
<?php } ?>
<?php
// this line is WordPress' motor, do not delete it.
$comments = $wpdb->get_results("SELECT * FROM $tablecomments WHERE comment_post_ID = $id AND comment_approved = '1' ORDER BY comment_date");
$commentstatus = $wpdb->get_row("SELECT comment_status, post_password FROM $tableposts WHERE ID = $id");
if (!empty($commentstatus->post_password) && $HTTP_COOKIE_VARS['wp-postpass_'.$cookiehash] != $commentstatus->post_password) { // and it doesn't match the cookie
echo(get_the_password_form());
} else { ?>
<?php if ($comments) { ?>
<ol id="commentlist">
<?php foreach ($comments as $comment) { ?>
<li id="comment-<?php comment_ID() ?>">
<?php comment_text() ?>
<p><cite><?php comment_type(); ?> by <?php comment_author_link() ?> &#8212; <?php comment_date() ?> @ <a href="#comment-<?php comment_ID() ?>"><?php comment_time() ?></a></cite></p>
</li>
<?php } // end for each comment ?>
</ol>
<?php } else { // this is displayed if there are no comments so far ?>
<p>No comments yet.</p>
<?php } ?>
<?php if ('open' == $commentstatus->comment_status) { ?>
<h2>Leave a Comment</h2>
<p>Line and paragraph breaks automatic, website trumps email, <acronym title="Hypertext Markup Language">HTML</acronym> allowed: <code><?php echo htmlentities(str_replace('<', ' <', $comment_allowed_tags)); ?></code></p>
<form action="<?php echo $siteurl; ?>/wp-comments-post.php" method="post" id="commentform">
<p>
<input type="text" name="author" id="author" class="textarea" value="<?php echo $comment_author; ?>" size="28" tabindex="1" />
<label for="author">Name</label>
<input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" />
<input type="hidden" name="redirect_to" value="<?php echo htmlspecialchars($_SERVER["REQUEST_URI"]); ?>" />
</p>
<p>
<input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="28" tabindex="2" />
<label for="email">Email</label>
</p>
<p>
<input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="28" tabindex="3" />
<label for="url"><acronym title="Uniform Resource Identifier">URI</acronym></label>
</p>
<p>
<label for="comment">Your Comment</label>
<br />
<textarea name="comment" id="comment" cols="70" rows="4" tabindex="4"></textarea>
</p>
<p>
<input name="submit" type="submit" tabindex="5" value="Say it!" />
</p>
</form>
<?php } else { // comments are closed ?>
<p>Sorry, comments are closed at this time.</p>
<?php }
} // end password check
?>
<div><strong><a href="javascript:window.close()">Close this window</a>.</strong></div>
<?php // if you delete this the sky will fall on your head
}
?>
<!-- // this is just the end of the motor - don't touch that line either :) -->
<?php //} ?>
<p class="credit"><?php timer_stop(1); ?> <cite>Powered by <a href="http://wordpress.org"><strong>Wordpress</strong></a></cite></p>
<?php // Seen at http://www.mijnkopthee.nl/log2/archive/2003/05/28/esc(18) ?>
<script type="text/javascript">
<!--
document.onkeypress = function esc(e) {
if(typeof(e) == "undefined") { e=event; }
if (e.keyCode == 27) { self.close(); }
}
// -->
</script>
</body>
</html>

View File

@ -1,8 +1,5 @@
<?php
require_once('wp-config.php');
require_once($abspath.$b2inc.'/b2template.functions.php');
require_once($abspath.$b2inc.'/b2vars.php');
require_once($abspath.$b2inc.'/b2functions.php');
require(dirname(__FILE__) . '/wp-config.php');
function add_magic_quotes($array) {
foreach ($array as $k => $v) {

View File

@ -1,5 +1,5 @@
<?php // Do not delete these lines
if ('b2comments.php' == basename($HTTP_SERVER_VARS['SCRIPT_FILENAME']))
if ('wp-comments.php' == basename($HTTP_SERVER_VARS['SCRIPT_FILENAME']))
die ('Please do not load this page directly. Thanks!');
if (($withcomments) or ($c)) {
@ -46,7 +46,7 @@
<?php if ('open' == $post->comment_status) { ?>
<p>Line and paragraph breaks automatic, website trumps email, <acronym title="Hypertext Markup Language">HTML</acronym> allowed: <code><?php echo htmlentities(str_replace('<', ' <', $comment_allowed_tags)); ?></code></p>
<form action="<?php echo $siteurl; ?>/b2comments.post.php" method="post" id="commentform">
<form action="<?php echo $siteurl; ?>/wp-comments-post.php" method="post" id="commentform">
<p>
<input type="text" name="author" id="author" class="textarea" value="<?php echo $comment_author; ?>" size="28" tabindex="1" />
<label for="author">Name</label>

View File

@ -7,7 +7,7 @@
In every template you do, you got to copy them before the CafeLog 'loop' */
$blog=1; // enter your blog's ID
header('Content-type: text/xml');
include('blog.header.php');
require('wp-blog-header.php');
if (!isset($rss_language)) { $rss_language = 'en'; }
echo "<?xml version=\"1.0\"?".">";
@ -108,4 +108,4 @@ foreach ($posts as $post) { start_b2();
}
?>
</channel>
</rss>
</rss>

26
wp-config-sample.php Normal file
View File

@ -0,0 +1,26 @@
<?php
/** WordPress's config file **/
/** http://wordpress.org/ **/
// ** MySQL settings ** //
define('DB_NAME', 'wordpress'); // The name of the database
define('DB_USER', 'username'); // Your MySQL username
define('DB_PASSWORD', 'password'); // ...and password
define('DB_HOST', 'localhost'); // 99% chance you won't need to change this value
// Change the prefix if you want to have multiple blogs in a single database.
$table_prefix = 'wp_'; // example: 'wp_' or 'b2' or 'mylogin_'
/* Stop editing */
$server = DB_HOST;
$loginsql = DB_USER;
$passsql = DB_PASSWORD;
$base = DB_NAME;
$abspath = dirname(__FILE__).'/';
// Get everything else
require_once($abspath.'wp-settings.php');
?>

View File

@ -222,7 +222,7 @@ function smarty_comments_popup_script( $params )
{
$width=400;
$height=400;
$file='b2commentspopup.php';
$file='wp-comments-popup.php';
extract( $params );
return comments_popup_script( $width, $height, $file );
}

View File

@ -40,7 +40,7 @@
// OF THE POSSIBILITY OF SUCH DAMAGE.
// XML RPC Server class
// requires: xmlrpc.inc
// requires: class-xmlrpc.php
// listMethods: either a string, or nothing
$_xmlrpcs_listMethods_sig=array(array($xmlrpcArray, $xmlrpcString),

View File

@ -656,7 +656,7 @@ function get_catname($cat_ID) {
function profile($user_login) {
global $user_data;
echo "<a href='b2profile.php?user=".$user_data->user_login."' onclick=\"javascript:window.open('b2profile.php?user=".$user_data->user_login."','Profile','toolbar=0,status=1,location=0,directories=0,menuBar=1,scrollbars=1,resizable=0,width=480,height=320,left=100,top=100'); return false;\">$user_login</a>";
echo "<a href='profile.php?user=".$user_data->user_login."' onclick=\"javascript:window.open('profile.php?user=".$user_data->user_login."','Profile','toolbar=0,status=1,location=0,directories=0,menuBar=1,scrollbars=1,resizable=0,width=480,height=320,left=100,top=100'); return false;\">$user_login</a>";
}
function dropdown_categories($default = 0) {
@ -1522,10 +1522,10 @@ function wp_notify_moderator($comment_id) {
$notify_message .= "URL : $comment->comment_author_url\r\n";
$notify_message .= "Whois : http://ws.arin.net/cgi-bin/whois.pl?queryinput=$comment->comment_author_IP\r\n";
$notify_message .= "Comment:\r\n".stripslashes($comment->comment_content)."\r\n\r\n";
$notify_message .= "To approve this comment, visit: $siteurl/wp-admin/wp-post.php?action=mailapprovecomment&p=".$comment->comment_post_ID."&comment=$comment_id\r\n";
$notify_message .= "To delete this comment, visit: $siteurl/wp-admin/wp-post.php?action=confirmdeletecomment&p=".$comment->comment_post_ID."&comment=$comment_id\r\n";
$notify_message .= "To approve this comment, visit: $siteurl/wp-admin/post.php?action=mailapprovecomment&p=".$comment->comment_post_ID."&comment=$comment_id\r\n";
$notify_message .= "To delete this comment, visit: $siteurl/wp-admin/post.php?action=confirmdeletecomment&p=".$comment->comment_post_ID."&comment=$comment_id\r\n";
$notify_message .= "Currently $comments_waiting comments are waiting for approval. Please visit the moderation panel:\r\n";
$notify_message .= "$siteurl/wp-admin/wp-moderation.php\r\n";
$notify_message .= "$siteurl/wp-admin/moderation.php\r\n";
$subject = '[' . stripslashes($blogname) . '] Please approve: "' .stripslashes($post->post_title).'"';
$admin_email = get_settings("admin_email");

View File

@ -1455,7 +1455,7 @@ function comments_link($file='', $echo=true) {
else echo get_permalink() . '#comments';
}
function comments_popup_script($width=400, $height=400, $file='b2commentspopup.php') {
function comments_popup_script($width=400, $height=400, $file='wp-comments-popup.php') {
global $b2commentspopupfile, $b2trackbackpopupfile, $b2pingbackpopupfile, $b2commentsjavascript;
$b2commentspopupfile = $file;
$b2commentsjavascript = 1;
@ -1677,7 +1677,7 @@ function permalink_comments_rss() {
function trackback_url($display = true) {
global $siteurl, $id;
$tb_url = $siteurl.'/b2trackback.php/'.$id;
$tb_url = $siteurl.'/wp-trackback.php/'.$id;
if ($display) {
echo $tb_url;
} else {

View File

@ -136,7 +136,7 @@ $b2_htmltranswinuni = array(
# these are used for b2's interface design
$tabletop = "\t<table cellspacing=\"0\" cellpadding=\"1\" width=\"85%\" border=\"0\" bgcolor=\"#cccccc\" align=\"center\">\n\t<td align=\"left\">\n\t\t<table cellspacing=\"0\" cellpadding=\"15\" width=\"100%\" border=\"0\"bgcolor=\"#ffffff\" align=\"center\">\n\t\t<td align=\"left\">\n";
$tablebottom = "\t\t</td>\n\t</table>\n\t</td>\n\t</table>\n";
$blankline = '<img src="../b2-img/blank.gif" width="10" height="5" border="0" /><br />';
$blankline = '<img src="../wp-images/blank.gif" width="10" height="5" border="0" /><br />';
# on which page are we ?
$PHP_SELF = $HTTP_SERVER_VARS['PHP_SELF'];
@ -144,7 +144,7 @@ $pagenow = explode('/', $PHP_SELF);
$pagenow = trim($pagenow[(sizeof($pagenow)-1)]);
$pagenow = explode('?', $pagenow);
$pagenow = $pagenow[0];
if (($querystring_start == '/') && ($pagenow != 'wp-post.php')) {
if (($querystring_start == '/') && ($pagenow != 'post.php')) {
$pagenow = $siteurl.'/'.$blogfilename;
}

View File

@ -1,6 +1,6 @@
<?php $blog = 1; // enter your blog's ID
header('Content-type: text/xml');
include('blog.header.php');
include('wp-blog-header.php');
?><?php echo "<?xml version=\"1.0\"?".">\n"; ?>
<travels>
<?php

View File

@ -1,8 +1,5 @@
<?php
require_once('wp-config.php');
require_once($abspath.$b2inc.'/b2template.functions.php');
require_once($abspath.$b2inc.'/b2functions.php');
require_once($abspath.$b2inc.'/b2vars.php');
require(dirname(__FILE__) . '/wp-config.php');
if (!function_exists('add_magic_quotes')) {
function add_magic_quotes($array) {
@ -51,9 +48,9 @@ case 'logout':
header('Cache-Control: no-cache, must-revalidate');
header('Pragma: no-cache');
if ($is_IIS) {
header('Refresh: 0;url=b2login.php');
header('Refresh: 0;url=wp-login.php');
} else {
header('Location: b2login.php');
header('Location: wp-login.php');
}
exit();
@ -114,9 +111,9 @@ case 'login':
header('Cache-Control: no-cache, must-revalidate');
header('Pragma: no-cache');
if ($is_IIS) {
header('Refresh: 0;url=b2login.php');
header('Refresh: 0;url=wp-login.php');
} else {
header('Location: b2login.php');
header('Location: wp-login.php');
}
exit();
} else {
@ -138,7 +135,7 @@ case 'login':
switch($mode) {
case 'bookmarklet':
$location = "wp-admin/b2bookmarklet.php?text=$text&popupurl=$popupurl&popuptitle=$popuptitle";
$location = "wp-admin/bookmarklet.php?text=$text&popupurl=$popupurl&popuptitle=$popuptitle";
break;
case 'sidebar':
$location = "wp-admin/sidebar.php?text=$text&popupurl=$popupurl&popuptitle=$popuptitle";
@ -187,7 +184,7 @@ case 'lostpassword':
if ($error) echo "<div align=\"right\" style=\"padding:4px;\"><font color=\"#FF0000\">$error</font><br />&nbsp;</div>";
?>
<form name="" action="b2login.php" method="post" id="lostpass">
<form name="" action="wp-login.php" method="post" id="lostpass">
<input type="hidden" name="action" value="retrievepassword" />
<label>Login: <input type="text" name="user_login" id="user_login" value="" size="12" /></label>
<input type="submit" name="Submit2" value="OK" class="search">
@ -222,7 +219,7 @@ case 'retrievepassword':
die();
} else {
echo "<p>The email was sent successfully to $user_login's email address.<br />
<a href='b2login.php' title='Check your email first, of course'>Click here to login!</a></p>";
<a href='wp-login.php' title='Check your email first, of course'>Click here to login!</a></p>";
die();
}
@ -283,14 +280,14 @@ default:
<?php if ($users_can_register) { ?>
<a href="<?php echo $siteurl; ?>/wp-register.php" title="Register to be an author">Register?</a><br />
<?php } ?>
<a href="<?php echo $siteurl; ?>/b2login.php?action=lostpassword" title="Password Lost and Found">Lost your password?</a>
<a href="<?php echo $siteurl; ?>/wp-login.php?action=lostpassword" title="Password Lost and Found">Lost your password?</a>
</p>
<?php
if ($error) echo "<div align=\"right\" style=\"padding:4px;\"><font color=\"#FF0000\">$error</font><br />&nbsp;</div>";
?>
<form name="login" id="loginform" action="b2login.php" method="post">
<form name="login" id="loginform" action="wp-login.php" method="post">
<?php if ($mode=="bookmarklet") { ?>
<input type="hidden" name="mode" value="<?php echo $mode ?>" />
<input type="hidden" name="text" value="<?php echo $text ?>" />

View File

@ -1,15 +1,8 @@
<?php
require(dirname(__FILE__) . '/wp-config.php');
# pop3-2-b2 mail to blog
# v0.3 20020716
require_once($abspath.$b2inc.'/class-pop3.php');
require_once('wp-config.php');
require_once($abspath.$b2inc."/b2template.functions.php");
require_once($abspath.$b2inc.'/b2vars.php');
require_once($abspath.$b2inc.'/class.POP3.php');
require_once($abspath.$b2inc.'/b2functions.php');
require_once($abspath.$b2inc."/xmlrpc.inc");
require_once($abspath.$b2inc."/xmlrpcs.inc");
timer_start();

View File

@ -1,11 +1,10 @@
<?php
/*
This is just a very simple script to set a cookie with a posted password and redirect back from whence the browser came.
It doesn't need to connect to the DB, or do anything fancy at all. Yum.
-- Matt
*/
include_once('wp-config.php');
require(dirname(__FILE__) . '/wp-config.php');
setcookie('wp-postpass_'.$cookiehash, $HTTP_POST_VARS['post_password'], time()+60*60*24*30);
header('Location: ' . $HTTP_SERVER_VARS['HTTP_REFERER']);

View File

@ -2,7 +2,7 @@
$blog = 1; // enter your blog's ID
$doing_rss = 1;
header('Content-type: text/xml', true);
include('blog.header.php');
require('wp-blog-header.php');
// Get the time of the most recent article
$maxdate = $wpdb->get_var("SELECT max(post_date) FROM $tableposts");

View File

@ -1,8 +1,5 @@
<?php
/* <Register> */
require_once('wp-config.php');
require_once($abspath.$b2inc.'/b2functions.php');
require(dirname(__FILE__) . '/wp-config.php');
function add_magic_quotes($array) {
foreach ($array as $k => $v) {
@ -126,7 +123,7 @@ case 'register':
<p>Login: <strong><?php echo $user_login; ?></strong><br />
Password: <strong><?php echo $stars; ?></strong><br />
E-mail: <strong><?php echo $user_email; ?></strong></p>
<form action="b2login.php" method="post" name="login">
<form action="wp-login.php" method="post" name="login">
<input type="hidden" name="log" value="<?php echo $user_login; ?>" />
<input type="submit" value="Login" name="submit" />
</form>

View File

@ -3,7 +3,7 @@
$blog = 1; // enter your blog's ID
$doing_rss = 1;
header('Content-type: text/xml', true);
include('blog.header.php');
require('wp-blog-header.php');
// Get the time of the most recent article
$maxdate = $wpdb->get_var("SELECT max(post_date) FROM $tableposts");

View File

@ -2,7 +2,7 @@
$blog = 1;
$doing_rss = 1;
header('Content-type: text/xml', true);
include('blog.header.php');
require('wp-blog-header.php');
// Get the time of the most recent article
$maxdate = $wpdb->get_var("SELECT max(post_date) FROM $tableposts");

View File

@ -1,4 +1,20 @@
<?php
// This is the name of the include directory. No "/" allowed.
$b2inc = '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 . '/vars.php');
require ($abspath . $b2inc . '/class-xmlrpc.php');
require ($abspath . $b2inc . '/class-xmlrpcs.php');
require ($abspath . '/wp-links/links.php');
$HTTP_HOST = getenv('HTTP_HOST'); /* domain name */
$REMOTE_ADDR = getenv('REMOTE_ADDR'); /* visitor's IP */
$HTTP_USER_AGENT = getenv('HTTP_USER_AGENT'); /* visitor's browser */
// Table names
$tableposts = $table_prefix . 'posts';
$tableusers = $table_prefix . 'users';
@ -78,13 +94,6 @@ if (!isset($_wp_installing) || !$_wp_installing) {
$default_geourl_lat = get_settings('default_geourl_lat');
$default_geourl_lon = get_settings('default_geourl_lon');
/* not currently used
if (get_settings('search_engine_friendly_urls')) {
$querystring_start = '/';
$querystring_equal = '/';
$querystring_separator = '/';
} else {
*/
$querystring_start = '?';
$querystring_equal = '=';
$querystring_separator = '&amp;';

89
wp-trackback.php Normal file
View File

@ -0,0 +1,89 @@
<?php
require(dirname(__FILE__) . '/wp-config.php');
if (!empty($HTTP_GET_VARS['tb_id'])) {
// trackback is done by a GET
$tb_id = intval($HTTP_GET_VARS['tb_id']);
$tb_url = $HTTP_GET_VARS['url'];
$title = $HTTP_GET_VARS['title'];
$excerpt = $HTTP_GET_VARS['excerpt'];
$blog_name = $HTTP_GET_VARS['blog_name'];
} elseif (!empty($HTTP_POST_VARS['url'])) {
// trackback is done by a POST
$request_array = 'HTTP_POST_VARS';
$tb_id = explode('/', $HTTP_SERVER_VARS['REQUEST_URI']);
$tb_id = intval($tb_id[count($tb_id)-1]);
$tb_url = $HTTP_POST_VARS['url'];
$title = $HTTP_POST_VARS['title'];
$excerpt = $HTTP_POST_VARS['excerpt'];
$blog_name = $HTTP_POST_VARS['blog_name'];
}
if ((strlen(''.$tb_id)) && (empty($HTTP_GET_VARS['__mode'])) && (strlen(''.$tb_url))) {
@header('Content-Type: text/xml');
if (!$use_trackback)
trackback_response(1, 'Sorry, this weblog does not allow you to trackback its posts.');
$pingstatus = $wpdb->get_var("SELECT ping_status FROM $tableposts WHERE ID = $tb_id");
if ('closed' == $pingstatus)
trackback_response(1, 'Sorry, trackbacks are closed for this item.');
$tb_url = addslashes($tb_url);
$title = strip_tags($title);
$title = (strlen($title) > 255) ? substr($title, 0, 252).'...' : $title;
$excerpt = strip_tags($excerpt);
$excerpt = (strlen($excerpt) > 255) ? substr($excerpt, 0, 252).'...' : $excerpt;
$blog_name = htmlspecialchars($blog_name);
$blog_name = (strlen($blog_name) > 255) ? substr($blog_name, 0, 252).'...' : $blog_name;
$comment = '<trackback />';
$comment .= "<strong>$title</strong>\n$excerpt";
$author = addslashes($blog_name);
$email = '';
$original_comment = $comment;
$comment_post_ID = $tb_id;
$user_ip = $HTTP_SERVER_VARS['REMOTE_ADDR'];
$user_domain = gethostbyaddr($user_ip);
$time_difference = get_settings('time_difference');
$now = current_time('mysql');
$comment = convert_chars($comment);
$comment = format_to_post($comment);
$comment_author = $author;
$comment_author_email = $email;
$comment_author_url = $tb_url;
$author = addslashes($author);
$comment_moderation = get_settings('comment_moderation');
$moderation_notify = get_settings('moderation_notify');
if ('manual' == $comment_moderation) {
$approved = 0;
} else if ('auto' == $comment_moderation) {
$approved = 0;
} else { // none
$approved = 1;
}
$result = $wpdb->query("INSERT INTO $tablecomments
(comment_post_ID, comment_author, comment_author_email, comment_author_url, comment_author_IP, comment_date, comment_content, comment_approved)
VALUES
('$comment_post_ID', '$author', '$email', '$tb_url', '$user_ip', '$now', '$comment', '$approved')
");
if (!$result) {
die ("There is an error with the database, it can't store your comment...<br />Please contact the <a href='mailto:$admin_email'>webmaster</a>.");
} else {
$comment_ID = $wpdb->get_var('SELECT last_insert_id()');
if ($comments_notify)
wp_notify_postauthor($comment_ID, 'trackback');
trackback_response(0);
}
}
?>