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

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

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