New path system.

git-svn-id: http://svn.automattic.com/wordpress/trunk@96 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
saxmatt 2003-05-25 12:43:31 +00:00
parent 3bb065d0d2
commit 91de6b846c
21 changed files with 96 additions and 90 deletions

View File

@ -267,12 +267,12 @@ foreach($b2smiliestrans as $smiley => $img) {
} }
$b2_smiliesreplace[] = "<img src='$smilies_directory/$img' alt='$smiley_masked' />"; $b2_smiliesreplace[] = "<img src='$smilies_directory/$img' alt='$smiley_masked' />";
} }
include_once('textile.php');
add_filter('all', 'wptexturize'); add_filter('all', 'wptexturize');
add_filter('the_content', 'wpautop'); add_filter('the_content', 'wpautop');
add_filter('comment_text', 'wpautop'); add_filter('comment_text', 'wpautop');
// Uncomment the next line for Textile support // Uncomment the following for Textile support
// include_once('textile.php');
// add_filter('the_content', 'textile'); // add_filter('the_content', 'textile');
// There is some duplication of effore so textile.php really should be tweaked to eliminate that. // There is some duplication of effore so textile.php really should be tweaked to eliminate that.
?> ?>

View File

@ -2,8 +2,8 @@
// *** b2 Archive file // *** b2 Archive file
require_once('./b2config.php'); require('b2config.php');
require_once($b2inc.'/b2functions.php'); require($abspath.$b2inc.'/b2functions.php');
dbconnect(); dbconnect();

View File

@ -51,10 +51,10 @@ $calendaremptycellcontent = '&nbsp;';
/* stop customizing (unless you really know what you're doing) */ /* stop customizing (unless you really know what you're doing) */
include('b2config.php'); require('b2config.php');
require_once("$b2inc/b2template.functions.php"); require_once($abspath.$b2inc.'/b2template.functions.php');
require_once("$b2inc/b2functions.php"); require_once($abspath.$b2inc.'/b2functions.php');
require_once("$b2inc/b2vars.php"); require_once($abspath.$b2inc.'/b2vars.php');
dbconnect(); dbconnect();
if (isset($calendar) && ($calendar != '')) { if (isset($calendar) && ($calendar != '')) {

View File

@ -3,10 +3,10 @@
# if you want to change the paths here, remember to put your new path BEFORE $b2inc, # if you want to change the paths here, remember to put your new path BEFORE $b2inc,
# like this: "b2/$b2inc/b2functions.php" # like this: "b2/$b2inc/b2functions.php"
require("b2config.php"); require('b2config.php');
require("$b2inc/b2template.functions.php"); require($abspath.$b2inc.'/b2template.functions.php');
include("$b2inc/b2vars.php"); include($abspath.$b2inc.'/b2vars.php');
include("$b2inc/b2functions.php"); include($abspath.$b2inc.'/b2functions.php');
dbconnect(); dbconnect();

View File

@ -1,10 +1,8 @@
<?php <?php
/* * /* *
* WordPress's config file * * WordPress's config file *
* */ * */
// Reminder: everything that starts with #, /* or // is a comment // Reminder: everything that starts with #, /* or // is a comment
/* Start editing */ /* Start editing */
@ -13,7 +11,7 @@
// $blogfilename is the name of the default file for your blog // $blogfilename is the name of the default file for your blog
// $blogname is the name of your blog // $blogname is the name of your blog
$siteurl = 'http://example.com'; $siteurl = 'http://example.com'; // Double check this, it's very important.
$blogfilename = 'index.php'; $blogfilename = 'index.php';
$blogname = "my weblog"; $blogname = "my weblog";
$blogdescription = "babblings !"; $blogdescription = "babblings !";
@ -23,11 +21,14 @@ $admin_email = 'you@example.com';
// ** MySQL settings ** // ** MySQL settings **
// fill with your database details $dbname = 'b2'; // The name of the database
$dbname = 'b2'; // the name of the database $dbusername = 'user'; // Your MySQL username
$dbusername = 'user'; // your MySQL username
$dbpassword = 'pass'; // ...and password $dbpassword = 'pass'; // ...and password
$dbhost = 'localhost'; // 99% chances you won't need to change this value $dbhost = 'localhost'; // 99% chance you won't need to change this value
// If you've finished up to here you should be able to install now.
// set this to 0 or 1, whether you want new users to be able to post entries once they registered // set this to 0 or 1, whether you want new users to be able to post entries once they registered
$new_users_can_blog = 0; $new_users_can_blog = 0;
@ -259,8 +260,7 @@ $month['12']='December';
// $b2inc is where the included b2 files are: that's generally the directory b2-include, // This is the name of the include directory. No "/" allowed.
// so you shouldn't have to change that setting
$b2inc = 'b2-include'; $b2inc = 'b2-include';
@ -321,9 +321,14 @@ $passsql = $dbpassword;
$path = $siteurl; $path = $siteurl;
$base = $dbname; $base = $dbname;
// This is so the new admin location works
// Set this path separator appropriately for your OS: semi-colon on windows, colon on unix // This should get us the relative path of WordPress and the absolute path on the server. Yipee!
//$path_sep=';'; $relpath = '';
$path_sep = ':'; $url = explode('/', $siteurl);
ini_set('include_path', ".$path_sep..$path_sep../$b2inc$path_sep./$b2inc"); for ($i = 3; $i < count($url); $i++) {
$relpath .= '/'. $url[$i];
}
$abspath = getenv('DOCUMENT_ROOT') . $relpath . '/';
$b2inc = "/$b2inc";
$pathserver = &$siteurl;
?> ?>

View File

@ -1,8 +1,8 @@
<?php <?php
require('b2config.php'); require('b2config.php');
require_once($b2inc.'/b2template.functions.php'); require_once($abspath.$b2inc.'/b2template.functions.php');
require_once($b2inc.'/b2functions.php'); require_once($abspath.$b2inc.'/b2functions.php');
require_once($b2inc.'/b2vars.php'); require_once($abspath.$b2inc.'/b2vars.php');
if (!function_exists('add_magic_quotes')) { if (!function_exists('add_magic_quotes')) {
function add_magic_quotes($array) { function add_magic_quotes($array) {

View File

@ -4,12 +4,12 @@
# v0.3 20020716 # v0.3 20020716
require('b2config.php'); require('b2config.php');
require($b2inc."/b2template.functions.php"); require($abspath.$b2inc."/b2template.functions.php");
require($b2inc.'/b2vars.php'); require($abspath.$b2inc.'/b2vars.php');
require($b2inc.'/class.POP3.php'); require($abspath.$b2inc.'/class.POP3.php');
require($b2inc.'/b2functions.php'); require($abspath.$b2inc.'/b2functions.php');
require($b2inc."/xmlrpc.inc"); require($abspath.$b2inc."/xmlrpc.inc");
require($b2inc."/xmlrpcs.inc"); require($abspath.$b2inc."/xmlrpcs.inc");
dbconnect(); dbconnect();
timer_start(); timer_start();

View File

@ -1,10 +1,11 @@
<?php /* RDF 1.0 generator, original version by garym@teledyn.com */ <?php /* RDF 1.0 generator, original version by garym@teledyn.com */
$blog=1; // enter your blog's ID $blog = 1; // enter your blog's ID
header("Content-type: text/xml"); header('Content-type: text/xml');
include ("blog.header.php"); include('blog.header.php');
add_filter('the_content', 'trim'); add_filter('the_content', 'trim');
if (!isset($rss_language)) { $rss_language = 'en'; } if (!isset($rss_language)) { $rss_language = 'en'; }
?><?php echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?".">"; ?> ?>
<?php echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?".">"; ?>
<!-- generator="wordpress/<?php echo $b2_version ?>" --> <!-- generator="wordpress/<?php echo $b2_version ?>" -->
<rdf:RDF <rdf:RDF
xmlns="http://purl.org/rss/1.0/" xmlns="http://purl.org/rss/1.0/"

View File

@ -1,8 +1,8 @@
<?php <?php
/* <Register> */ /* <Register> */
include("./b2config.php"); require('b2config.php');
include($b2inc."/b2functions.php"); require($abspath.$b2inc.'/b2functions.php');
function add_magic_quotes($array) { function add_magic_quotes($array) {
foreach ($array as $k => $v) { foreach ($array as $k => $v) {

View File

@ -1,12 +1,13 @@
<?php /* These first lines are the first part of a CaféLog template. <?php /* These first lines are the first part of a CaféLog template.
In every template you do, you got to copy them before the CaféLog 'loop' */ In every template you do, you got to copy them before the CaféLog 'loop' */
$blog=1; // enter your blog's ID $blog = 1; // enter your blog's ID
header("Content-type: text/xml"); header('Content-type: text/xml');
include ("blog.header.php"); include('blog.header.php');
if (!isset($rss_language)) { $rss_language = 'en'; } if (!isset($rss_language)) { $rss_language = 'en'; }
if (!isset($rss_encoded_html)) { $rss_encoded_html = 0; } if (!isset($rss_encoded_html)) { $rss_encoded_html = 0; }
if (!isset($rss_excerpt_length) || ($rss_encoded_html == 1)) { $rss_excerpt_length = 0; } if (!isset($rss_excerpt_length) || ($rss_encoded_html == 1)) { $rss_excerpt_length = 0; }
?><?php echo "<?xml version=\"1.0\"?".">"; ?> ?>
<?php echo "<?xml version=\"1.0\"?".">"; ?>
<!-- generator="wordpress/<?php echo $b2_version ?>" --> <!-- generator="wordpress/<?php echo $b2_version ?>" -->
<rss version="0.92"> <rss version="0.92">
<channel> <channel>

View File

@ -1,12 +1,13 @@
<?php /* These first lines are the first part of a WordPress template. <?php /* These first lines are the first part of a WordPress template.
In every template you do, you got to copy them before the CafeLog 'loop' */ In every template you do, you got to copy them before the CafeLog 'loop' */
$blog=1; // enter your blog's ID $blog=1; // enter your blog's ID
header("Content-type: text/xml"); header('Content-type: text/xml');
include ("blog.header.php"); include('blog.header.php"');
if (!isset($rss_language)) { $rss_language = 'en'; } if (!isset($rss_language)) { $rss_language = 'en'; }
if (!isset($rss_encoded_html)) { $rss_encoded_html = 0; } if (!isset($rss_encoded_html)) { $rss_encoded_html = 0; }
if (!isset($rss_excerpt_length) || ($rss_encoded_html == 1)) { $rss_excerpt_length = 0; } if (!isset($rss_excerpt_length) || ($rss_encoded_html == 1)) { $rss_excerpt_length = 0; }
?><?php echo "<?xml version=\"1.0\"?".">"; ?> ?>
<?php echo "<?xml version=\"1.0\"?".">"; ?>
<!-- generator="wordpress/<?php echo $b2_version ?>" --> <!-- generator="wordpress/<?php echo $b2_version ?>" -->
<rss version="2.0" <rss version="2.0"
xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dc="http://purl.org/dc/elements/1.1/"

View File

@ -57,10 +57,10 @@ if ((strlen(''.$tb_id)) && (empty($HTTP_GET_VARS['__mode'])) && (strlen(''.$url)
@header('Content-Type: text/xml'); @header('Content-Type: text/xml');
require_once("b2config.php"); require_once('b2config.php');
require_once("$b2inc/b2template.functions.php"); require_once($abspath.$b2inc.'/b2template.functions.php');
require_once("$b2inc/b2vars.php"); require_once($abspath.$b2inc.'/b2vars.php');
require_once("$b2inc/b2functions.php"); require_once($abspath.$b2inc.'/b2functions.php');
if (!$use_trackback) { if (!$use_trackback) {
trackback_response(1, 'Sorry, this weblog does not allow you to trackback its posts.'); trackback_response(1, 'Sorry, this weblog does not allow you to trackback its posts.');

View File

@ -4,16 +4,14 @@ $use_cache = 1;
$use_gzipcompression = 1; $use_gzipcompression = 1;
/* Including config and functions files */ /* Including config and functions files */
require_once (dirname(__FILE__).'/b2config.php'); require_once('b2config.php');
$b2blah = dirname(__FILE__).'/'; $b2blah = dirname(__FILE__).'/';
if ( (substr($b2inc,0,1)=='/') || (substr($b2inc,1,1)==':') ) {
$b2blah='./'; require_once ($abspath.$b2inc.'/b2template.functions.php');
} require_once ($abspath.$b2inc.'/b2vars.php');
require_once ($b2blah.$b2inc.'/b2template.functions.php'); require_once ($abspath.$b2inc.'/b2functions.php');
require_once ($b2blah.$b2inc.'/b2vars.php'); require_once ($abspath.$b2inc.'/xmlrpc.inc');
require_once ($b2blah.$b2inc.'/b2functions.php'); require_once ($abspath.$b2inc.'/xmlrpcs.inc');
require_once ($b2blah.$b2inc.'/xmlrpc.inc');
require_once ($b2blah.$b2inc.'/xmlrpcs.inc');
$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'); $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');

View File

@ -20,9 +20,9 @@ switch ($action) {
case "step1": case "step1":
require("b2config.php"); require('b2config.php');
require("$b2inc/b2functions.php"); require($abspath.$b2inc.'/b2functions.php');
require("$b2inc/b2vars.php"); require($abspath.$b2inc.'/b2vars.php');
?> ?>
<html> <html>

View File

@ -4,8 +4,8 @@
// 2. upload on your server in the directory where your b2 files are // 2. upload on your server in the directory where your b2 files are
// 3. load in the browser from there // 3. load in the browser from there
require("b2config.php"); require('b2config.php');
require($b2inc."/b2functions.php"); require($abspath.$b2inc.'/b2functions.php');
$b2varstoreset = array('action', 'gmpath', 'archivespath'); $b2varstoreset = array('action', 'gmpath', 'archivespath');
for ($i=0; $i<count($b2varstoreset); $i += 1) { for ($i=0; $i<count($b2varstoreset); $i += 1) {

View File

@ -1,7 +1,7 @@
<?php /* Don't remove this line, it calls the b2 function files ! */ $blog=1; <?php /* Don't remove this line, it calls the b2 function files ! */ $blog=1;
require('blog.header.php'); require('blog.header.php');
require('wp-links/links.php'); require($abspath.'wp-links/links.php');
require('wp-links/links.weblogs.com.php'); require($abspath.'wp-links/links.weblogs.com.php');
?> ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!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"> <html xmlns="http://www.w3.org/1999/xhtml">
@ -13,10 +13,10 @@ require('wp-links/links.weblogs.com.php');
<meta name="generator" content="WordPress .7" /> <!-- leave this for stats --> <meta name="generator" content="WordPress .7" /> <!-- leave this for stats -->
<style type="text/css" media="screen"> <style type="text/css" media="screen">
@import url( <?php echo $pathserver; ?>/layout2b.css ); @import url( <?php echo $siteurl; ?>/layout2b.css );
</style> </style>
<link rel="stylesheet" type="text/css" media="print" href="<?php echo $pathserver; ?>/print.css" /> <link rel="stylesheet" type="text/css" media="print" href="<?php echo $siteurl; ?>/print.css" />
<link rel="alternate" type="text/xml" title="RDF" href="<?php bloginfo('rdf_url'); ?>" /> <link rel="alternate" type="text/xml" title="RDF" href="<?php bloginfo('rdf_url'); ?>" />
<link rel="alternate" type="text/xml" title="RSS" href="<?php bloginfo('rss2_url'); ?>" /> <link rel="alternate" type="text/xml" title="RSS" href="<?php bloginfo('rss2_url'); ?>" />
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" /> <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />

View File

@ -108,9 +108,8 @@
<li>The templates are so much better, and there is so much more going <li>The templates are so much better, and there is so much more going
on than before it's probably worth it to start from scratch and work on than before it's probably worth it to start from scratch and work
back to your design.</li> back to your design.</li>
<li>You can keeep your <code>b2config.php</code> file if you want to, <li>You <em>must</em> update your <code>b2config.php</code>. There's all
but it is <strong>very important</strong> that you take the last few sort of new stuff in there.</li>
lines from the WordPress and add those in, otherwise, nothing will work.</li>
<li>WordPress issues should be discussed in our <a href="http://wordpress.org/support/">support <li>WordPress issues should be discussed in our <a href="http://wordpress.org/support/">support
forums</a>.</li> forums</a>.</li>
<li><strong>Back up</strong> your database before you do anything. Yes, <li><strong>Back up</strong> your database before you do anything. Yes,
@ -869,9 +868,9 @@
<p>Your XMLRPC server/path are as described here: if you login to b2 on <p>Your XMLRPC server/path are as described here: if you login to b2 on
http://mydomain.com/me/b2login.php, then you have:</p> http://mydomain.com/me/b2login.php, then you have:</p>
<ul> <ul>
<li>server: http://mydomain.com/me</li> <li>server: http://example.com/me</li>
<li>path: /me/xmlrpc.php</li> <li>path: /me/xmlrpc.php</li>
<li>complete URL (just in case): http://mydomain.com/me/xmlrpc.php</li> <li>complete URL (just in case): http://example.com/me/xmlrpc.php</li>
</ul> </ul>
<p>There's also a b2-specific method: b2.getCategories. Request it with <p>There's also a b2-specific method: b2.getCategories. Request it with
3 strings: blog_ID (use '1'), username, password. The response is an array 3 strings: blog_ID (use '1'), username, password. The response is an array
@ -973,12 +972,12 @@
<h1><br /> <h1><br />
Final notes:</h1> Final notes:</h1>
<ul> <ul>
<li>WordPress is functionnal, but a lot of coding and code clean-up remain <li>WordPress is functional, but a lot of coding and code clean-up remain
to be done.</li> to be done.</li>
<li>If you've got suggestions, ideas, or comments, or if you found a bug, <li>If you've got suggestions, ideas, or comments, or if you found a bug,
why not joining us in the <a href="http://wordpress.org/support/">Support why not joining us in the <a href="http://wordpress.org/support/">Support
Forums</a>?</li> Forums</a>?</li>
<li>If you can code in PHP, you'll see the structure of b2 is flexible <li>If you can code in PHP, you'll see the structure of WordPress is flexible
enough to allow for more functions and sections to be added.</li> enough to allow for more functions and sections to be added.</li>
</ul> </ul>
<h1><br /> <h1><br />
@ -986,7 +985,8 @@
<ul> <ul>
<li> Wherever third party code has been used, credit has been given in <li> Wherever third party code has been used, credit has been given in
the code's comments.</li> the code's comments.</li>
<li>WordPress is released under the GPL (see license.txt).</li> <li>WordPress is released under the <acronym title="GNU Public License">GPL</acronym>
(see license.txt).</li>
</ul></td> </ul></td>
</tr> </tr>
</table> </table>

View File

@ -1,7 +1,7 @@
<div class="wrap"> <div class="wrap">
<?php <?php
require_once('b2config.php'); require_once('../b2config.php');
if (!$posts) { if (!$posts) {
if ($posts_per_page) { if ($posts_per_page) {
@ -228,7 +228,7 @@ if ($i == "ASC")
<?php <?php
// these lines are b2's "motor", do not alter nor remove them // these lines are b2's "motor", do not alter nor remove them
include("blog.header.php"); include($abspath.'blog.header.php');
while($row = mysql_fetch_object($result)) { while($row = mysql_fetch_object($result)) {
$posts_per_page = 10; $posts_per_page = 10;

View File

@ -1,12 +1,12 @@
<?php <?php
require("../b2config.php"); require('../b2config.php');
require_once($b2inc."/b2template.functions.php"); require_once($abspath.$b2inc.'/b2template.functions.php');
require_once("b2verifauth.php"); require_once($abspath.'/wp-admin/b2verifauth.php');
require_once($b2inc."/b2vars.php"); require_once($abspath.$b2inc.'/b2vars.php');
require_once($b2inc."/b2functions.php"); require_once($abspath.$b2inc.'/b2functions.php');
require_once($b2inc."/xmlrpc.inc"); require_once($abspath.$b2inc.'/xmlrpc.inc');
require_once($b2inc."/xmlrpcs.inc"); require_once($abspath.$b2inc.'/xmlrpcs.inc');
if (!isset($use_cache)) $use_cache=1; if (!isset($use_cache)) $use_cache=1;
if (!isset($blogID)) $blog_ID=1; if (!isset($blogID)) $blog_ID=1;

View File

@ -34,8 +34,8 @@ for ($i=0; $i<count($b2varstoreset); $i += 1) {
} }
} }
require_once("../b2config.php"); require_once('../b2config.php');
require_once("$b2inc/b2functions.php"); require_once($abspath.$b2inc.'/b2functions.php');
dbconnect(); dbconnect();

View File

@ -26,7 +26,7 @@
// //
// Mike Little (mike@zed1.com) // Mike Little (mike@zed1.com)
// ***************************************************************** // *****************************************************************
include_once('../b2config.php');
include_once('../wp-links/links.config.php'); include_once('../wp-links/links.config.php');
include_once("../wp-links/links.php"); include_once("../wp-links/links.php");