Annotation of cdn/www/b2config.php, revision 1.23

1.1       cdn         1: <?php
                      2: 
1.22      cdn         3:  // require('/usr/local/sandbox/php/include/globals.h');
                      4: 
                      5:   if (!isset($project))
                      6:   {
                      7:   // bit after a '/', before 'www/'
                      8: 
                      9:    // $project = str_replace(, '', dirname(__FILE__));
                     10: 
1.23    ! cdn        11:     $_project = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), 'www') - 1);
        !            12: 
        !            13:     $project = substr($_project, strrpos($echo, '/') + 1);
1.22      cdn        14: 
                     15:   }
                     16: 
                     17:   require('/usr/local/sandbox/php/include/globals.h');
                     18: 
1.8       cdn        19:   require(PHP_INC.CONNECT);
1.14      cdn        20: 
1.16      cdn        21:   $_p_ = false;
1.22      cdn        22: 
1.14      cdn        23:   if (!isset($project) || empty($project))
1.15      cdn        24:   {
1.16      cdn        25:     $project = 'cdn'; $_p_ = true;
1.15      cdn        26:   }
                     27: 
1.1       cdn        28: /* *
                     29:  * b2's config file *
                     30:                   * */
                     31: 
                     32: 
                     33: # Reminder: everything that starts with #, /* or // is a comment
                     34: 
                     35: /* Start editing */
                     36: 
                     37: # $siteurl is your blog's URL: for example, 'http://mydomain.com' (no trailing slash !)
                     38: # $blogfilename is the name of the default file for your blog
                     39: # $blogname is the name of your blog
                     40: 
1.14      cdn        41: $siteurl = 'http://' . $project . '.' . HOST;
1.9       cdn        42: $blogfilename = 'blog.html';
1.20      cdn        43: $blogname = "mozdev.org - b2og";
1.1       cdn        44: $blogdescription = "babblings !";
                     45: 
                     46: 
                     47: # fill these only if you have a Cafelog ID,
                     48: # this enables your blog to be in the Recently Updated b2 blogs list.
                     49: # to obtain this ID, e-mail update@tidakada.com with these details:
                     50: #  name of the weblog, weblog's URL, your e-mail address, and a password
                     51: # in the future, the password will allow you to change these details online
                     52: 
                     53: $cafelogID = '';
                     54: $use_cafelogping = 0;    # set this to 1 if you do have a Cafelog ID
                     55: 
                     56: 
                     57: # $pathserver is where you have uploaded b2: for example, 'http://mydomain.com' (no ending slash !)
                     58: #   by default b2 is set to run in the folder your blog resides, same as $siteurl
                     59: 
1.19      cdn        60: $pathserver = 'http://' . PROJECT_DIR . '.' . HOST;
1.18      cdn        61: //$pathserver = 'http://cdn.mozdev.org';
1.1       cdn        62: 
                     63: 
                     64: # your email (obvious uh ?)
1.2       cdn        65: $admin_email = 'cdn@cdn.cx';
1.1       cdn        66: 
                     67: 
                     68: # set this to 0 or 1, whether you want new users to be able to post entries once they registered
1.2       cdn        69: $new_users_can_blog = 0;
1.1       cdn        70: 
                     71: 
                     72: # set this to 0 or 1, whether you want to allow users to register on your blog.      
1.17      cdn        73: $users_can_register = 0;
1.1       cdn        74: 
                     75: 
                     76: # day at the start of the week: 0 for Sunday, 1 for Monday, 2 for Tuesday, etc
                     77: $start_of_week = 1;
                     78: 
                     79: 
                     80: 
                     81: // ** MySQL settings **
                     82: 
                     83: # fill with your database details
1.2       cdn        84: $dbname = $database;//'b2';                    // the name of the database
                     85: $dbhost = $host;//'ankh.local';                // 99% chances you won't need to change this value
                     86: $dbusername = $user;//'root';                  // your MySQL username
                     87: $dbpassword = $password;//'';          // ...and password
1.1       cdn        88: 
                     89: # database tables' names (change them if you want to have multiple b2's in a single database)
1.2       cdn        90: 
                     91: $b2prefix = '_cdn_';
                     92: //$b2prefix = '';
                     93: 
                     94: $tableposts = $b2prefix . 'b2posts';
                     95: $tableusers = $b2prefix . 'b2users';
                     96: $tablesettings = $b2prefix . 'b2settings';
                     97: $tablecategories = $b2prefix . 'b2categories';
                     98: $tablecomments = $b2prefix . 'b2comments';
1.1       cdn        99: 
                    100: 
                    101: // ** Post preview function **
                    102: 
                    103: # set this to 1 if you want to use the 'preview' function
1.17      cdn       104: $use_preview = 0;
1.21      cdn       105: $use_preview = 1;
1.1       cdn       106: 
                    107: 
                    108: // ** Spell Checker functions **
                    109: 
                    110: 
                    111: # set this to 0 to disable the spell checker, or 1 to enable it
1.2       cdn       112: $use_spellchecker = 0;
1.1       cdn       113: 
                    114: 
                    115: 
                    116: // ** Text formatting options **
                    117: 
                    118: # these options can help you format your text without using too much html
1.2       cdn       119: $use_bbcode = 1;       // use BBCode, like [b]bold[/b]
1.1       cdn       120: $use_gmcode = 0;       // use GreyMatter-styles: **bold** \italic\ __underline__
                    121: $use_quicktags = 1;    // buttons for HTML tags (they won't work on IE Mac yet)
                    122: 
                    123: # IMPORTANT! set this to 0 if you are using Chinese, Japanese, Korean,
                    124: #                                           or other double-bytes languages
                    125: $use_htmltrans = 1;
                    126: 
                    127: # this could help balance your HTML code. if it gives bad results, set it to 0
                    128: $use_balanceTags = 1;
                    129: 
                    130: # this would convert quotes into smart/curly quotes, set it to 1 to enable it
                    131: $use_smartquotes = 0;
                    132: 
                    133: 
                    134: // ** Image upload **
                    135: 
                    136: 
                    137: # set this to 0 to disable file upload, or 1 to enable it
                    138: $use_fileupload = 0;
                    139: 
                    140: # enter the real path of the directory where you'll upload the pictures
                    141: #   if you're unsure about what your real path is, please ask your host's support staff
                    142: #   note that the  directory must be writable by the webserver (ChMod 766)
                    143: #   note for windows-servers users: use forwardslashes instead of backslashes
                    144: #$fileupload_realpath = '/home/your/site/b2/images';
                    145: $fileupload_realpath = '/home/example/public_html/images';
                    146: 
                    147: # enter the URL of that directory (it's used to generate the links to the pictures)
                    148: $fileupload_url = 'http://example.com/images';
                    149: 
                    150: # accepted file types, you can add to that list if you want
                    151: #   note: add a space before and after each file type
                    152: #   example: $fileupload_allowedtypes = ' jpg gif png ';
                    153: $fileupload_allowedtypes = ' jpg gif png ';
                    154: 
                    155: # by default, most servers limit the size of uploads to 2048 KB
                    156: #   if you want to set it to a lower value, here it is (you cannot set a higher value)
                    157: $fileupload_maxk = '96';
                    158: 
                    159: # you may not want all users to upload pictures/files, so you can set a minimum level for this
                    160: $fileupload_minlevel = '1';
                    161: 
                    162: # ...or you may authorize only some users. enter their logins here, separated by spaces
                    163: #   if you leave that variable blank, all users who have the minimum level are authorized to upload
                    164: #   note: add a space before and after each login name
                    165: #   example: $fileupload_allowedusers = ' barbara anne ';
                    166: $fileupload_allowedusers = '';
                    167: 
                    168: // ** LiveJournal Integration settings **
                    169: // enable livejournal integration
1.2       cdn       170: $use_ljupdate = 0;
1.1       cdn       171: 
                    172: // database tables' names (change them if you want to have multiple b2's with ljupdate in a single database)
                    173: $tableljusers = 'ljusers';
                    174: $tableljposts = 'ljposts';
                    175: 
                    176: // post default settings
                    177: // lju_post: 0/1 - post to LiveJournal
                    178: // lju_disablecomments: 0/1 - disable commentting on the post at LiveJournal
                    179: // lju_sourcefooter: 0/1 - include a link back to the b2 post
                    180: $lju_post = 1;
                    181: $lju_disablecomments = 1;
                    182: $lju_sourcefooter = 1;
                    183: 
                    184: // ** end LiveJournal Integration settings **
                    185: 
                    186: 
                    187: // ** RSS syndication options **
                    188: 
                    189: # these options are used by b2rdf.php (1.0), b2rss.php (0.92), and b2rss2.php (2.0)
                    190: #  note: if you don't want to syndicate your news, you can delete these files
                    191: 
                    192: # number of last posts to syndicate
                    193: $posts_per_rss = 10;
                    194: 
                    195: # the language of your blog ( see this: http://backend.userland.com/stories/storyReader$16 )
                    196: $rss_language = 'en';
                    197: 
                    198: # for b2rss.php: allow encoded HTML in <description> tag? 1=yes, 0=no
                    199: $rss_encoded_html = 0;
                    200: 
                    201: # length (in words) of excerpts in the RSS feed? 0=unlimited
                    202: #  note: in b2rss.php, this will be set to 0 if you use encoded HTML
                    203: $rss_excerpt_length = 50;
                    204: 
                    205: 
                    206: 
                    207: // ** Weblogs.com ping **
                    208: 
                    209: # set this to 1 if you want your site to be listed on http://weblogs.com when you add a new post
                    210: $use_weblogsping = 0;
                    211: 
                    212: 
                    213: // ** Blo.gs ping **
                    214: 
                    215: # set this to 1 if you want your site to be listed on http://blo.gs when you add a new post
                    216: $use_blodotgsping = 0;
                    217: 
                    218: # if you ping blo.gs, this is the URL that will be sent to it (enter your blog's URL):
                    219: $blodotgsping_url = 'http://example.com';
                    220: 
                    221: 
                    222: 
                    223: // ** Trackback / PingBack **
                    224: 
                    225: # set this to 0 or 1, whether you want to allow your posts to be trackback'able or not
                    226: # note: setting it to zero would also disable sending trackbacks
1.17      cdn       227: $use_trackback = 1;
1.1       cdn       228: 
                    229: # set this to 0 or 1, whether you want to allow your posts to be pingback'able or not
                    230: # note: setting it to zero would also disable sending pingbacks
1.17      cdn       231: $use_pingback = 1;
1.1       cdn       232: 
                    233: 
                    234: 
                    235: // ** Comments options **
                    236: 
                    237: # set this to 1 to require e-mail and name, or 0 to allow comments without e-mail/name
1.2       cdn       238: $require_name_email = 1;
1.1       cdn       239: 
                    240: # here is a list of the tags that are allowed in the comments.
                    241: #  you can add tags to the list, just add them in the string,
                    242: #  add only the opening tag: for example, only '<a>' instead of '<a href=""></a>'
                    243: 
                    244: $comment_allowed_tags = '<b><i><u><strong><em><code><blockquote><p><br><strike><a>';
                    245: 
                    246: # set this to 1 to let every author be notified about comments on their posts
                    247: $comments_notify = 0;
                    248: 
                    249: 
                    250: 
                    251: // ** Smilies options **
                    252: 
                    253: # set this to 1 to enable smiley conversion in posts
                    254: #     (note: this makes smiley conversion in ALL posts)
                    255: $use_smilies = 0;
                    256: 
                    257: # the directory where your smilies are (no trailing slash)
                    258: $smilies_directory = 'http://example.com/b2-img/smilies';
                    259: 
                    260: # here's the conversion table, you can modify it if you know what you're doing
                    261: $b2smiliestrans = array(
                    262:        ':)'            => 'icon_smile.gif',
                    263:        ':D'            => 'icon_biggrin.gif',
                    264:        ':-D'           => 'icon_biggrin.gif',
                    265:        ':grin:'                => 'icon_biggrin.gif',
                    266:        ':)'            => 'icon_smile.gif',
                    267:        ':-)'           => 'icon_smile.gif',
                    268:        ':smile:'               => 'icon_smile.gif',
                    269:        ':('            => 'icon_sad.gif',
                    270:        ':-('           => 'icon_sad.gif',
                    271:        ':sad:'         => 'icon_sad.gif',
                    272:        ':o'            => 'icon_surprised.gif',
                    273:        ':-o'           => 'icon_surprised.gif',
                    274:        ':eek:'         => 'icon_surprised.gif',
                    275:        '8O'            => 'icon_eek.gif',
                    276:        '8-O'           => 'icon_eek.gif',
                    277:        ':shock:'               => 'icon_eek.gif',
                    278:        ':?'            => 'icon_confused.gif',
                    279:        ':-?'           => 'icon_confused.gif',
                    280:        ':???:'         => 'icon_confused.gif',
                    281:        '8)'            => 'icon_cool.gif',
                    282:        '8-)'           => 'icon_cool.gif',
                    283:        ':cool:'                => 'icon_cool.gif',
                    284:        ':lol:'         => 'icon_lol.gif',
                    285:        ':x'            => 'icon_mad.gif',
                    286:        ':-x'           => 'icon_mad.gif',
                    287:        ':mad:'         => 'icon_mad.gif',
                    288:        ':P'            => 'icon_razz.gif',
                    289:        ':-P'           => 'icon_razz.gif',
                    290:        ':razz:'                => 'icon_razz.gif',
                    291:        ':oops:'                => 'icon_redface.gif',
                    292:        ':cry:'         => 'icon_cry.gif',
                    293:        ':evil:'                => 'icon_evil.gif',
                    294:        ':twisted:'             => 'icon_twisted.gif',
                    295:        ':roll:'                => 'icon_rolleyes.gif',
                    296:        ':wink:'                => 'icon_wink.gif',
                    297:        ';)'            => 'icon_wink.gif',
                    298:        ';-)'           => 'icon_wink.gif',
                    299:        ':!:'           => 'icon_exclaim.gif',
                    300:        ':?:'           => 'icon_question.gif',
                    301:        ':idea:'                => 'icon_idea.gif',
                    302:        ':arrow:'               => 'icon_arrow.gif',
                    303:        ':|'            => 'icon_neutral.gif',
                    304:        ':-|'           => 'icon_neutral.gif',
                    305:        ':neutral:'             => 'icon_neutral.gif',
                    306:        ':mrgreen:'             => 'icon_mrgreen.gif',
                    307: );
                    308: 
                    309: 
                    310: # the weekdays and the months.. translate them if necessary
                    311: 
                    312: $weekday[0]='Sunday';
                    313: $weekday[1]='Monday';
                    314: $weekday[2]='Tuesday';
                    315: $weekday[3]='Wednesday';
                    316: $weekday[4]='Thursday';
                    317: $weekday[5]='Friday';
                    318: $weekday[6]='Saturday';
                    319: 
                    320: 
                    321: # the months, translate them if necessary - note: this isn't active everywhere yet
                    322: $month['01']='January';
                    323: $month['02']='February';
                    324: $month['03']='March';
                    325: $month['04']='April';
                    326: $month['05']='May';
                    327: $month['06']='June';
                    328: $month['07']='July';
                    329: $month['08']='August';
                    330: $month['09']='September';
                    331: $month['10']='October';
                    332: $month['11']='November';
                    333: $month['12']='December';
                    334: 
                    335: 
                    336: 
                    337: # $b2inc is where the included b2 files are: that's generally the directory b2-include,
                    338: #  so you shouldn't have to change that setting
1.2       cdn       339: $b2inc = substr(basename(__FILE__), 0, strrpos(basename(__FILE__), '/')) . '/b2-include';
                    340: $b2inc = dirname(__FILE__) . '/b2-include';
1.1       cdn       341: $b2inc = './b2-include';
1.3       cdn       342: $b2inc = 'b2-include';
1.1       cdn       343: 
                    344: // ** Querystring Configuration ** (don't change if you don't know what you're doing)
                    345: 
                    346: $querystring_start = '?';
                    347: $querystring_equal = '=';
                    348: $querystring_separator = '&amp;';
                    349: 
1.2       cdn       350: /*
                    351: $querystring_start = '/';
                    352: $querystring_equal = '/';
                    353: $querystring_separator = '/';
                    354: */
1.1       cdn       355: 
                    356: 
                    357: // ** Configuration for b2mail.php ** (skip this if you don't intend to blog via email)
                    358: 
                    359: # mailserver settings
                    360: $mailserver_url = 'mail.example.com';
                    361: $mailserver_login = 'login@example.com';
                    362: $mailserver_pass = 'password';
                    363: $mailserver_port = 110;
                    364: 
                    365: # by default posts will have this category
                    366: $default_category = 1;
                    367: 
                    368: # subject prefix
                    369: $subjectprefix = 'blog:';
                    370: 
                    371: # body terminator string (starting from this string, everything will be ignored, including this string)
                    372: $bodyterminator = "___";
                    373: 
                    374: # set this to 1 to run in test mode
1.2       cdn       375: $thisisforfunonly = 01;
1.1       cdn       376: 
                    377: 
                    378: ### Special Configuration for some phone email services
                    379: 
                    380: # some mobile phone email services will send identical subject & content on the same line
                    381: # if you use such a service, set $use_phoneemail to 1, and indicate a separator string
                    382: # when you compose your message, you'll type your subject then the separator string
                    383: # then you type your login:password, then the separator, then content
                    384: 
                    385: $use_phoneemail = 0;
                    386: $phoneemail_separator = ':::';
                    387: 
                    388: 
                    389: 
                    390: 
                    391: 
                    392: /* Stop editing */
                    393: 
                    394: 
                    395: $HTTP_HOST=getenv('HTTP_HOST');  /* domain name */
                    396: $REMOTE_ADDR=getenv('REMOTE_ADDR'); /* visitor's IP */
                    397: $HTTP_USER_AGENT=getenv('HTTP_USER_AGENT'); /* visitor's browser */
                    398: 
                    399: $server = $dbhost;
                    400: $loginsql = $dbusername;
                    401: $passsql = $dbpassword;
                    402: $path = $pathserver;
                    403: $base = $dbname;
                    404: 
1.2       cdn       405: ?>

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>