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

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

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