Make WordPress Core

Changeset 96


Ignore:
Timestamp:
05/25/2003 12:43:31 PM (22 years ago)
Author:
saxmatt
Message:

New path system.

Location:
trunk
Files:
21 edited

Legend:

Unmodified
Added
Removed
  • trunk/b2-include/b2vars.php

    r46 r96  
    268268    $b2_smiliesreplace[] = "<img src='$smilies_directory/$img' alt='$smiley_masked' />";
    269269}
    270 include_once('textile.php');
    271270
    272271    add_filter('all', 'wptexturize');
    273272    add_filter('the_content', 'wpautop');
    274273    add_filter('comment_text', 'wpautop');
    275     // Uncomment the next line for Textile support
     274    // Uncomment the following for Textile support
     275    // include_once('textile.php');
    276276    // add_filter('the_content', 'textile');
    277277    // There is some duplication of effore so textile.php really should be tweaked to eliminate that.
  • trunk/b2archives.php

    r14 r96  
    33// *** b2 Archive file
    44
    5 require_once('./b2config.php');
    6 require_once($b2inc.'/b2functions.php');
     5require('b2config.php');
     6require($abspath.$b2inc.'/b2functions.php');
    77
    88dbconnect();
  • trunk/b2calendar.php

    r74 r96  
    5252
    5353
    54 include('b2config.php');
    55 require_once("$b2inc/b2template.functions.php");
    56 require_once("$b2inc/b2functions.php");
    57 require_once("$b2inc/b2vars.php");
     54require('b2config.php');
     55require_once($abspath.$b2inc.'/b2template.functions.php');
     56require_once($abspath.$b2inc.'/b2functions.php');
     57require_once($abspath.$b2inc.'/b2vars.php');
    5858dbconnect();
    5959
  • trunk/b2comments.post.php

    r7 r96  
    44#  like this: "b2/$b2inc/b2functions.php"
    55
    6 require("b2config.php");
    7 require("$b2inc/b2template.functions.php");
    8 include("$b2inc/b2vars.php");
    9 include("$b2inc/b2functions.php");
     6require('b2config.php');
     7require($abspath.$b2inc.'/b2template.functions.php');
     8include($abspath.$b2inc.'/b2vars.php');
     9include($abspath.$b2inc.'/b2functions.php');
    1010
    1111dbconnect();
  • trunk/b2config.php

    r94 r96  
    11<?php
    2 
    32/* *
    43 * WordPress's config file *
    54                         * */
    65
    7 
    86// Reminder: everything that starts with #, /* or // is a comment
    97
     
    1412// $blogname is the name of your blog
    1513
    16 $siteurl = 'http://example.com';
     14$siteurl = 'http://example.com'; // Double check this, it's very important.
    1715$blogfilename = 'index.php';
    1816$blogname = "my weblog";
     
    2422// ** MySQL settings **
    2523
    26 // fill with your database details
    27 $dbname = 'b2';             // the name of the database
    28 $dbusername = 'user';       // your MySQL username
     24$dbname = 'b2';             // The name of the database
     25$dbusername = 'user';       // Your MySQL username
    2926$dbpassword = 'pass';       // ...and password
    30 $dbhost = 'localhost';      // 99% chances you won't need to change this value
     27$dbhost = 'localhost';      // 99% chance you won't need to change this value
     28
     29
     30// If you've finished up to here you should be able to install now.
     31
    3132
    3233// set this to 0 or 1, whether you want new users to be able to post entries once they registered
     
    260261
    261262
    262 // $b2inc is where the included b2 files are: that's generally the directory b2-include,
    263 //  so you shouldn't have to change that setting
     263// This is the name of the include directory. No "/" allowed.
    264264$b2inc = 'b2-include';
    265265
     
    322322$base = $dbname;
    323323
    324 // This is so the new admin location works
    325 // Set this path separator appropriately for your OS: semi-colon on windows, colon on unix
    326 //$path_sep=';';
    327 $path_sep = ':';
    328 ini_set('include_path', ".$path_sep..$path_sep../$b2inc$path_sep./$b2inc");
     324
     325// This should get us the relative path of WordPress and the absolute path on the server. Yipee!
     326$relpath = '';
     327$url = explode('/', $siteurl);
     328for ($i = 3; $i < count($url); $i++) {
     329    $relpath .= '/'. $url[$i];
     330}
     331$abspath =  getenv('DOCUMENT_ROOT') . $relpath . '/';
     332$b2inc = "/$b2inc";
     333$pathserver = &$siteurl;
    329334?>
  • trunk/b2login.php

    r85 r96  
    11<?php
    22require('b2config.php');
    3 require_once($b2inc.'/b2template.functions.php');
    4 require_once($b2inc.'/b2functions.php');
    5 require_once($b2inc.'/b2vars.php');
     3require_once($abspath.$b2inc.'/b2template.functions.php');
     4require_once($abspath.$b2inc.'/b2functions.php');
     5require_once($abspath.$b2inc.'/b2vars.php');
    66
    77if (!function_exists('add_magic_quotes')) {
  • trunk/b2mail.php

    r3 r96  
    55
    66require('b2config.php');
    7 require($b2inc."/b2template.functions.php");
    8 require($b2inc.'/b2vars.php');
    9 require($b2inc.'/class.POP3.php');
    10 require($b2inc.'/b2functions.php');
    11 require($b2inc."/xmlrpc.inc");
    12 require($b2inc."/xmlrpcs.inc");
     7require($abspath.$b2inc."/b2template.functions.php");
     8require($abspath.$b2inc.'/b2vars.php');
     9require($abspath.$b2inc.'/class.POP3.php');
     10require($abspath.$b2inc.'/b2functions.php');
     11require($abspath.$b2inc."/xmlrpc.inc");
     12require($abspath.$b2inc."/xmlrpcs.inc");
    1313
    1414dbconnect();
  • trunk/b2rdf.php

    r29 r96  
    11<?php /* RDF 1.0 generator, original version by garym@teledyn.com */
    2 $blog=1; // enter your blog's ID
    3 header("Content-type: text/xml");
    4 include ("blog.header.php");
     2$blog = 1; // enter your blog's ID
     3header('Content-type: text/xml');
     4include('blog.header.php');
    55add_filter('the_content', 'trim');
    66if (!isset($rss_language)) { $rss_language = 'en'; }
    7 ?><?php echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?".">"; ?>
     7?>
     8<?php echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?".">"; ?>
    89<!-- generator="wordpress/<?php echo $b2_version ?>" -->
    910<rdf:RDF
  • trunk/b2register.php

    r82 r96  
    22/* <Register> */
    33
    4 include("./b2config.php");
    5 include($b2inc."/b2functions.php");
     4require('b2config.php');
     5require($abspath.$b2inc.'/b2functions.php');
    66
    77function add_magic_quotes($array) {
  • trunk/b2rss.php

    r29 r96  
    11<?php /* These first lines are the first part of a CaféLog template.
    22         In every template you do, you got to copy them before the CaféLog 'loop' */
    3 $blog=1; // enter your blog's ID
    4 header("Content-type: text/xml");
    5 include ("blog.header.php");
     3$blog = 1; // enter your blog's ID
     4header('Content-type: text/xml');
     5include('blog.header.php');
    66if (!isset($rss_language)) { $rss_language = 'en'; }
    77if (!isset($rss_encoded_html)) { $rss_encoded_html = 0; }
    88if (!isset($rss_excerpt_length) || ($rss_encoded_html == 1)) { $rss_excerpt_length = 0; }
    9 ?><?php echo "<?xml version=\"1.0\"?".">"; ?>
     9?>
     10<?php echo "<?xml version=\"1.0\"?".">"; ?>
    1011<!-- generator="wordpress/<?php echo $b2_version ?>" -->
    1112<rss version="0.92">
  • trunk/b2rss2.php

    r68 r96  
    22           In every template you do, you got to copy them before the CafeLog 'loop' */
    33$blog=1; // enter your blog's ID
    4 header("Content-type: text/xml");
    5 include ("blog.header.php");
     4header('Content-type: text/xml');
     5include('blog.header.php"');
    66if (!isset($rss_language)) { $rss_language = 'en'; }
    77if (!isset($rss_encoded_html)) { $rss_encoded_html = 0; }
    88if (!isset($rss_excerpt_length) || ($rss_encoded_html == 1)) { $rss_excerpt_length = 0; }
    9 ?><?php echo "<?xml version=\"1.0\"?".">"; ?>
     9?>
     10<?php echo "<?xml version=\"1.0\"?".">"; ?>
    1011<!-- generator="wordpress/<?php echo $b2_version ?>" -->
    1112<rss version="2.0"
  • trunk/b2trackback.php

    r60 r96  
    5858
    5959
    60     require_once("b2config.php");
    61     require_once("$b2inc/b2template.functions.php");
    62     require_once("$b2inc/b2vars.php");
    63     require_once("$b2inc/b2functions.php");
     60    require_once('b2config.php');
     61    require_once($abspath.$b2inc.'/b2template.functions.php');
     62    require_once($abspath.$b2inc.'/b2vars.php');
     63    require_once($abspath.$b2inc.'/b2functions.php');
    6464
    6565    if (!$use_trackback) {
  • trunk/blog.header.php

    r83 r96  
    55
    66/* Including config and functions files */
    7 require_once (dirname(__FILE__).'/b2config.php');
     7require_once('b2config.php');
    88$b2blah = dirname(__FILE__).'/';
    9 if ( (substr($b2inc,0,1)=='/') || (substr($b2inc,1,1)==':') ) {
    10     $b2blah='./';
    11 }
    12 require_once ($b2blah.$b2inc.'/b2template.functions.php');
    13 require_once ($b2blah.$b2inc.'/b2vars.php');
    14 require_once ($b2blah.$b2inc.'/b2functions.php');
    15 require_once ($b2blah.$b2inc.'/xmlrpc.inc');
    16 require_once ($b2blah.$b2inc.'/xmlrpcs.inc');
     9
     10require_once ($abspath.$b2inc.'/b2template.functions.php');
     11require_once ($abspath.$b2inc.'/b2vars.php');
     12require_once ($abspath.$b2inc.'/b2functions.php');
     13require_once ($abspath.$b2inc.'/xmlrpc.inc');
     14require_once ($abspath.$b2inc.'/xmlrpcs.inc');
    1715
    1816$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');
  • trunk/blogger-2-b2.php

    r86 r96  
    2121case "step1":
    2222
    23     require("b2config.php");
    24     require("$b2inc/b2functions.php");
    25     require("$b2inc/b2vars.php");
     23    require('b2config.php');
     24    require($abspath.$b2inc.'/b2functions.php');
     25    require($abspath.$b2inc.'/b2vars.php');
    2626   
    2727?>
  • trunk/gm-2-b2.php

    r86 r96  
    55// 3. load in the browser from there
    66
    7 require("b2config.php");
    8 require($b2inc."/b2functions.php");
     7require('b2config.php');
     8require($abspath.$b2inc.'/b2functions.php');
    99
    1010$b2varstoreset = array('action', 'gmpath', 'archivespath');
  • trunk/index.php

    r56 r96  
    11<?php /* Don't remove this line, it calls the b2 function files ! */ $blog=1;
    22require('blog.header.php');
    3 require('wp-links/links.php');
    4 require('wp-links/links.weblogs.com.php');
     3require($abspath.'wp-links/links.php');
     4require($abspath.'wp-links/links.weblogs.com.php');
    55?>
    66<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
     
    1414
    1515    <style type="text/css" media="screen">
    16         @import url( <?php echo $pathserver; ?>/layout2b.css );
     16        @import url( <?php echo $siteurl; ?>/layout2b.css );
    1717    </style>
    1818   
    19     <link rel="stylesheet" type="text/css" media="print" href="<?php echo $pathserver; ?>/print.css" />
     19    <link rel="stylesheet" type="text/css" media="print" href="<?php echo $siteurl; ?>/print.css" />
    2020    <link rel="alternate" type="text/xml" title="RDF" href="<?php bloginfo('rdf_url'); ?>" />
    2121    <link rel="alternate" type="text/xml" title="RSS" href="<?php bloginfo('rss2_url'); ?>" />
  • trunk/readme.html

    r95 r96  
    109109          on than before it's probably worth it to start from scratch and work
    110110          back to your design.</li>
    111         <li>You can keeep your <code>b2config.php</code> file if you want to,
    112           but it is <strong>very important</strong> that you take the last few
    113           lines from the WordPress and add those in, otherwise, nothing will work.</li>
     111        <li>You <em>must</em> update your <code>b2config.php</code>. There's all
     112          sort of new stuff in there.</li>
    114113        <li>WordPress issues should be discussed in our <a href="http://wordpress.org/support/">support
    115114          forums</a>.</li>
     
    870869        http://mydomain.com/me/b2login.php, then you have:</p>
    871870      <ul>
    872         <li>server: http://mydomain.com/me</li>
     871        <li>server: http://example.com/me</li>
    873872        <li>path: /me/xmlrpc.php</li>
    874         <li>complete URL (just in case): http://mydomain.com/me/xmlrpc.php</li>
     873        <li>complete URL (just in case): http://example.com/me/xmlrpc.php</li>
    875874      </ul>
    876875      <p>There's also a b2-specific method: b2.getCategories. Request it with
     
    974973        Final notes:</h1>
    975974      <ul>
    976         <li>WordPress is functionnal, but a lot of coding and code clean-up remain
     975        <li>WordPress is functional, but a lot of coding and code clean-up remain
    977976          to be done.</li>
    978977        <li>If you've got suggestions, ideas, or comments, or if you found a bug,
    979978          why not joining us in the <a href="http://wordpress.org/support/">Support
    980979          Forums</a>?</li>
    981         <li>If you can code in PHP, you'll see the structure of b2 is flexible
     980        <li>If you can code in PHP, you'll see the structure of WordPress is flexible
    982981          enough to allow for more functions and sections to be added.</li>
    983982      </ul>
     
    987986        <li> Wherever third party code has been used, credit has been given in
    988987          the code's comments.</li>
    989         <li>WordPress is released under the GPL (see license.txt).</li>
     988        <li>WordPress is released under the <acronym title="GNU Public License">GPL</acronym>
     989          (see license.txt).</li>
    990990      </ul></td>
    991991  </tr>
  • trunk/wp-admin/b2edit.showposts.php

    r92 r96  
    22<?php
    33
    4 require_once('b2config.php');
     4require_once('../b2config.php');
    55
    66if (!$posts) {
     
    229229    <?php
    230230    // these lines are b2's "motor", do not alter nor remove them
    231     include("blog.header.php");
     231    include($abspath.'blog.header.php');
    232232
    233233    while($row = mysql_fetch_object($result)) {
  • trunk/wp-admin/b2header.php

    r44 r96  
    11<?php
    22
    3 require("../b2config.php");
    4 require_once($b2inc."/b2template.functions.php");
    5 require_once("b2verifauth.php");
    6 require_once($b2inc."/b2vars.php");
    7 require_once($b2inc."/b2functions.php");
    8 require_once($b2inc."/xmlrpc.inc");
    9 require_once($b2inc."/xmlrpcs.inc");
     3require('../b2config.php');
     4require_once($abspath.$b2inc.'/b2template.functions.php');
     5require_once($abspath.'/wp-admin/b2verifauth.php');
     6require_once($abspath.$b2inc.'/b2vars.php');
     7require_once($abspath.$b2inc.'/b2functions.php');
     8require_once($abspath.$b2inc.'/xmlrpc.inc');
     9require_once($abspath.$b2inc.'/xmlrpcs.inc');
    1010
    1111if (!isset($use_cache)) $use_cache=1;
  • trunk/wp-admin/b2profile.php

    r83 r96  
    3535}
    3636
    37 require_once("../b2config.php");
    38 require_once("$b2inc/b2functions.php");
     37require_once('../b2config.php');
     38require_once($abspath.$b2inc.'/b2functions.php');
    3939
    4040dbconnect();
  • trunk/wp-admin/linkmanager.php

    r54 r96  
    2727// Mike Little (mike@zed1.com)
    2828// *****************************************************************
    29 
     29include_once('../b2config.php');
    3030include_once('../wp-links/links.config.php');
    3131include_once("../wp-links/links.php");
Note: See TracChangeset for help on using the changeset viewer.