Changeset 482
- Timestamp:
- 10/16/2006 06:26:02 PM (19 years ago)
- Location:
- trunk
- Files:
-
- 5 added
- 7 edited
-
bb-admin/admin-header.php (modified) (1 diff)
-
bb-admin/install-rtl.css (added)
-
bb-admin/install.css (added)
-
bb-admin/style-rtl.css (added)
-
bb-includes/functions.php (modified) (3 diffs)
-
bb-includes/l10n.php (modified) (3 diffs)
-
bb-includes/locale.php (added)
-
bb-includes/template-functions.php (modified) (1 diff)
-
bb-settings.php (modified) (2 diffs)
-
bb-templates/header.php (modified) (2 diffs)
-
bb-templates/style-rtl.css (added)
-
config-sample.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bb-admin/admin-header.php
r342 r482 1 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php _e('en'); ?>">2 <html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>> 3 3 <head> 4 4 <title><?php bb_admin_title() ?></title> 5 5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 6 <style type="text/css"> 7 @import url(<?php option('uri'); ?>bb-admin/style.css); 8 </style> 6 <link rel="stylesheet" href="<?php option('uri'); ?>bb-admin/style.css" type="text/css" /> 7 <?php global $bb_locale; if ( ('rtl' == $bb_locale->text_direction) ) : ?> 8 <link rel="stylesheet" href="<?php option('uri'); ?>bb-admin/style-rtl.css" type="text/css" /> 9 <?php endif; ?> 9 10 </head> 10 11 -
trunk/bb-includes/functions.php
r480 r482 305 305 case 'edit_lock' : 306 306 return $bb->edit_lock; 307 break; 308 case 'language': 309 return str_replace('_', '-', get_locale()); 310 break; 311 case 'text_direction': 312 global $bb_locale; 313 return $bb_locale->text_direction; 307 314 break; 308 315 case 'version' : … … 1435 1442 1436 1443 function bb_die($message, $title = '') { 1444 global $bb_locale; 1445 1437 1446 header('Content-Type: text/html; charset=utf-8'); 1438 1447 … … 1441 1450 ?> 1442 1451 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 1443 <html xmlns="http://www.w3.org/1999/xhtml" >1452 <html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>> 1444 1453 <head> 1445 1454 <title><?php echo $title ?></title> 1446 1455 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 1447 <style media="screen" type="text/css"> 1448 <!-- 1449 html { 1450 background: #eee; 1451 } 1452 body { 1453 background: #fff; 1454 color: #000; 1455 font-family: Georgia, "Times New Roman", Times, serif; 1456 margin-left: 25%; 1457 margin-right: 25%; 1458 padding: .2em 2em; 1459 } 1460 1461 h1 { 1462 color: #060; 1463 font-size: 18px; 1464 font-weight: lighter; 1465 } 1466 1467 h2 { 1468 font-size: 16px; 1469 } 1470 1471 p, li, dt { 1472 line-height: 140%; 1473 padding-bottom: 2px; 1474 } 1475 1476 ul, ol { 1477 padding: 5px 5px 5px 20px; 1478 } 1479 #logo { 1480 margin-bottom: 2em; 1481 } 1482 --> 1483 </style> 1456 <link rel="stylesheet" href="<?php option('uri'); ?>bb-admin/install.css" type="text/css" /> 1457 <?php if ( ('rtl' == $bb_locale->text_direction) ) : ?> 1458 <link rel="stylesheet" href="<?php option('uri'); ?>bb-admin/install-rtl.css" type="text/css" /> 1459 <?php endif; ?> 1484 1460 </head> 1485 1461 <body> -
trunk/bb-includes/l10n.php
r465 r482 6 6 return $locale; 7 7 8 // WPLANG is defined in wp-config.9 if (defined(' WPLANG'))10 $locale = WPLANG;8 // BBLANG is defined in config.php 9 if (defined('BBLANG')) 10 $locale = BBLANG; 11 11 12 12 if (empty($locale)) … … 70 70 71 71 $locale = get_locale(); 72 $mofile = ABSPATH . BBLANGDIR . "/$locale.mo";72 $mofile = BBPATH . BBLANGDIR . "/$locale.mo"; 73 73 74 74 load_textdomain('default', $mofile); … … 80 80 $path = BBPLUGINDIR; 81 81 82 $mofile = ABSPATH . "$path/$domain-$locale.mo";82 $mofile = BBPATH . "$path/$domain-$locale.mo"; 83 83 load_textdomain($domain, $mofile); 84 84 } -
trunk/bb-includes/template-functions.php
r480 r482 10 10 } 11 11 12 function bb_stylesheet_uri() { 12 function language_attributes() { 13 $output = ''; 14 if ( $dir = bb_get_option('text_direction') ) 15 $output = "dir=\"$dir\""; 16 if ( $lang = bb_get_option('language') ) { 17 if ( $dir ) $output .= ' '; 18 $output .= "lang=\"$lang\" xml:lang=\"$lang\""; 19 } 20 21 echo $output; 22 } 23 24 function bb_stylesheet_uri( $stylesheet = '' ) { 25 echo bb_get_stylesheet_uri( $stylesheet ); 26 } 27 28 function bb_get_stylesheet_uri( $stylesheet = '' ) { 29 if ( 'rtl' == $stylesheet ) 30 $css_file = 'style-rtl.css'; 31 else 32 $css_file = 'style.css'; 33 13 34 if ( file_exists( BBPATH . 'my-templates/style.css') ) 14 echo bb_get_option('uri') . 'my-templates/style.css'; 15 else 16 echo bb_get_option('uri') . 'bb-templates/style.css'; 35 $r = bb_get_option('uri') . 'my-templates/' . $css_file; 36 else 37 $r = bb_get_option('uri') . 'bb-templates/' . $css_file; 38 return apply_filters( 'bb_get_stylesheet_uri', $r, $stylesheet ); 17 39 } 18 40 -
trunk/bb-settings.php
r470 r482 66 66 require( BBPATH . BBINC . '/deprecated.php'); 67 67 require( BBPATH . BBINC . '/wp-functions.php'); 68 if ( defined('BBLANG') && '' != constant('BBLANG') ) { 69 include_once(BBPATH . BBINC . '/streams.php'); 70 include_once(BBPATH . BBINC . '/gettext.php'); 71 } 68 72 if ( !( defined('WP_BB') && WP_BB ) ) { // Don't include these when WP is running. 69 73 require( BBPATH . BBINC . '/kses.php'); 70 if ( defined('WPLANG') && '' != constant('WPLANG') ) {71 include_once(BBPATH . BBINC . '/streams.php');72 include_once(BBPATH . BBINC . '/gettext.php');73 }74 74 require( BBPATH . BBINC . '/l10n.php'); 75 75 } … … 129 129 $bb_cache = new BB_Cache(); 130 130 131 $bb_roles = new BB_Roles(); 131 // Load the default text localization domain. 132 load_default_textdomain(); 133 134 // Pull in locale data after loading text domain. 135 require_once(BBPATH . BBINC . '/locale.php'); 136 $bb_locale = new BB_Locale(); 137 138 $bb_roles = new BB_Roles(); 132 139 do_action('bb_got_roles', ''); 133 140 -
trunk/bb-templates/header.php
r461 r482 1 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php _e('en'); ?>">2 <html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>> 3 3 <head> 4 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> … … 6 6 <?php bb_feed_head(); ?> 7 7 <link rel="stylesheet" href="<?php bb_stylesheet_uri(); ?>" type="text/css" /> 8 <?php global $bb_locale; if ( ('rtl' == $bb_locale->text_direction) ) : ?> 9 <link rel="stylesheet" href="<?php bb_stylesheet_uri( 'rtl' ); ?>" type="text/css" /> 10 <?php endif; ?> 8 11 9 12 <?php if ( is_topic() && bb_is_user_logged_in() ) : ?> -
trunk/config-sample.php
r481 r482 35 35 $bb->gmt_offset = 0; 36 36 37 // Change this to localize bbPress. A corresponding MO file for the 38 // chosen language must be installed to bb-includes/languages. 39 // For example, install de.mo to bb-includes/languages and set BBLANG to 'de' 40 // to enable German language support. 41 define('BBLANG', ''); 42 37 43 // Your Akismet Key. You do not need a key to run bbPress, but if you want to take advantage 38 44 // of Akismet's powerful spam blocking, you'll need one. You can get an Akismet key at
Note: See TracChangeset
for help on using the changeset viewer.