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' />";
}
include_once('textile.php');
add_filter('all', 'wptexturize');
add_filter('the_content', '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');
// 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
require_once('./b2config.php');
require_once($b2inc.'/b2functions.php');
require('b2config.php');
require($abspath.$b2inc.'/b2functions.php');
dbconnect();

View File

@ -51,10 +51,10 @@ $calendaremptycellcontent = '&nbsp;';
/* stop customizing (unless you really know what you're doing) */
include('b2config.php');
require_once("$b2inc/b2template.functions.php");
require_once("$b2inc/b2functions.php");
require_once("$b2inc/b2vars.php");
require('b2config.php');
require_once($abspath.$b2inc.'/b2template.functions.php');
require_once($abspath.$b2inc.'/b2functions.php');
require_once($abspath.$b2inc.'/b2vars.php');
dbconnect();
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,
# like this: "b2/$b2inc/b2functions.php"
require("b2config.php");
require("$b2inc/b2template.functions.php");
include("$b2inc/b2vars.php");
include("$b2inc/b2functions.php");
require('b2config.php');
require($abspath.$b2inc.'/b2template.functions.php');
include($abspath.$b2inc.'/b2vars.php');
include($abspath.$b2inc.'/b2functions.php');
dbconnect();

View File

@ -1,10 +1,8 @@
<?php
/* *
* WordPress's config file *
* */
// Reminder: everything that starts with #, /* or // is a comment
/* Start editing */
@ -13,7 +11,7 @@
// $blogfilename is the name of the default file for 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';
$blogname = "my weblog";
$blogdescription = "babblings !";
@ -23,11 +21,14 @@ $admin_email = 'you@example.com';
// ** MySQL settings **
// fill with your database details
$dbname = 'b2'; // the name of the database
$dbusername = 'user'; // your MySQL username
$dbname = 'b2'; // The name of the database
$dbusername = 'user'; // Your MySQL username
$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
$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,
// so you shouldn't have to change that setting
// This is the name of the include directory. No "/" allowed.
$b2inc = 'b2-include';
@ -321,9 +321,14 @@ $passsql = $dbpassword;
$path = $siteurl;
$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
//$path_sep=';';
$path_sep = ':';
ini_set('include_path', ".$path_sep..$path_sep../$b2inc$path_sep./$b2inc");
// This should get us the relative path of WordPress and the absolute path on the server. Yipee!
$relpath = '';
$url = explode('/', $siteurl);
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
require('b2config.php');
require_once($b2inc.'/b2template.functions.php');
require_once($b2inc.'/b2functions.php');
require_once($b2inc.'/b2vars.php');
require_once($abspath.$b2inc.'/b2template.functions.php');
require_once($abspath.$b2inc.'/b2functions.php');
require_once($abspath.$b2inc.'/b2vars.php');
if (!function_exists('add_magic_quotes')) {
function add_magic_quotes($array) {

View File

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

View File

@ -1,10 +1,11 @@
<?php /* RDF 1.0 generator, original version by garym@teledyn.com */
$blog=1; // enter your blog's ID
header("Content-type: text/xml");
include ("blog.header.php");
$blog = 1; // enter your blog's ID
header('Content-type: text/xml');
include('blog.header.php');
add_filter('the_content', 'trim');
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 ?>" -->
<rdf:RDF
xmlns="http://purl.org/rss/1.0/"

View File

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

View File

@ -1,12 +1,13 @@
<?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' */
$blog=1; // enter your blog's ID
header("Content-type: text/xml");
include ("blog.header.php");
$blog = 1; // enter your blog's ID
header('Content-type: text/xml');
include('blog.header.php');
if (!isset($rss_language)) { $rss_language = 'en'; }
if (!isset($rss_encoded_html)) { $rss_encoded_html = 0; }
if (!isset($rss_excerpt_length) || ($rss_encoded_html == 1)) { $rss_excerpt_length = 0; }
?><?php echo "<?xml version=\"1.0\"?".">"; ?>
?>
<?php echo "<?xml version=\"1.0\"?".">"; ?>
<!-- generator="wordpress/<?php echo $b2_version ?>" -->
<rss version="0.92">
<channel>

View File

@ -1,12 +1,13 @@
<?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' */
$blog=1; // enter your blog's ID
header("Content-type: text/xml");
include ("blog.header.php");
header('Content-type: text/xml');
include('blog.header.php"');
if (!isset($rss_language)) { $rss_language = 'en'; }
if (!isset($rss_encoded_html)) { $rss_encoded_html = 0; }
if (!isset($rss_excerpt_length) || ($rss_encoded_html == 1)) { $rss_excerpt_length = 0; }
?><?php echo "<?xml version=\"1.0\"?".">"; ?>
?>
<?php echo "<?xml version=\"1.0\"?".">"; ?>
<!-- generator="wordpress/<?php echo $b2_version ?>" -->
<rss version="2.0"
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');
require_once("b2config.php");
require_once("$b2inc/b2template.functions.php");
require_once("$b2inc/b2vars.php");
require_once("$b2inc/b2functions.php");
require_once('b2config.php');
require_once($abspath.$b2inc.'/b2template.functions.php');
require_once($abspath.$b2inc.'/b2vars.php');
require_once($abspath.$b2inc.'/b2functions.php');
if (!$use_trackback) {
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;
/* Including config and functions files */
require_once (dirname(__FILE__).'/b2config.php');
require_once('b2config.php');
$b2blah = dirname(__FILE__).'/';
if ( (substr($b2inc,0,1)=='/') || (substr($b2inc,1,1)==':') ) {
$b2blah='./';
}
require_once ($b2blah.$b2inc.'/b2template.functions.php');
require_once ($b2blah.$b2inc.'/b2vars.php');
require_once ($b2blah.$b2inc.'/b2functions.php');
require_once ($b2blah.$b2inc.'/xmlrpc.inc');
require_once ($b2blah.$b2inc.'/xmlrpcs.inc');
require_once ($abspath.$b2inc.'/b2template.functions.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');
$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":
require("b2config.php");
require("$b2inc/b2functions.php");
require("$b2inc/b2vars.php");
require('b2config.php');
require($abspath.$b2inc.'/b2functions.php');
require($abspath.$b2inc.'/b2vars.php');
?>
<html>

View File

@ -4,8 +4,8 @@
// 2. upload on your server in the directory where your b2 files are
// 3. load in the browser from there
require("b2config.php");
require($b2inc."/b2functions.php");
require('b2config.php');
require($abspath.$b2inc.'/b2functions.php');
$b2varstoreset = array('action', 'gmpath', 'archivespath');
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;
require('blog.header.php');
require('wp-links/links.php');
require('wp-links/links.weblogs.com.php');
require($abspath.'wp-links/links.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">
<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 -->
<style type="text/css" media="screen">
@import url( <?php echo $pathserver; ?>/layout2b.css );
@import url( <?php echo $siteurl; ?>/layout2b.css );
</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="RSS" href="<?php bloginfo('rss2_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
on than before it's probably worth it to start from scratch and work
back to your design.</li>
<li>You can keeep your <code>b2config.php</code> file if you want to,
but it is <strong>very important</strong> that you take the last few
lines from the WordPress and add those in, otherwise, nothing will work.</li>
<li>You <em>must</em> update your <code>b2config.php</code>. There's all
sort of new stuff in there.</li>
<li>WordPress issues should be discussed in our <a href="http://wordpress.org/support/">support
forums</a>.</li>
<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
http://mydomain.com/me/b2login.php, then you have:</p>
<ul>
<li>server: http://mydomain.com/me</li>
<li>server: http://example.com/me</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>
<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
@ -973,12 +972,12 @@
<h1><br />
Final notes:</h1>
<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>
<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
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>
</ul>
<h1><br />
@ -986,7 +985,8 @@
<ul>
<li> Wherever third party code has been used, credit has been given in
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>
</tr>
</table>

View File

@ -1,7 +1,7 @@
<div class="wrap">
<?php
require_once('b2config.php');
require_once('../b2config.php');
if (!$posts) {
if ($posts_per_page) {
@ -228,7 +228,7 @@ if ($i == "ASC")
<?php
// 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)) {
$posts_per_page = 10;

View File

@ -1,12 +1,12 @@
<?php
require("../b2config.php");
require_once($b2inc."/b2template.functions.php");
require_once("b2verifauth.php");
require_once($b2inc."/b2vars.php");
require_once($b2inc."/b2functions.php");
require_once($b2inc."/xmlrpc.inc");
require_once($b2inc."/xmlrpcs.inc");
require('../b2config.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');
if (!isset($use_cache)) $use_cache=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("$b2inc/b2functions.php");
require_once('../b2config.php');
require_once($abspath.$b2inc.'/b2functions.php');
dbconnect();

View File

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