File:  [mozdev] / cdn / www / b2config.php
Revision 1.16: download - view: text, annotated - select for diffs - revision graph
Fri Mar 7 20:32:11 2003 UTC (16 years ago) by cdn
Branches: MAIN
CVS tags: HEAD
O.

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

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