bbPress

Simple, Fast, Elegant

bbPress plugin browser »

bbPress-Mobile (0.73)

  1. Copy bb-mobile.php into your /my-plugins/ directory
  2. Copy mobile.css into your /my-templates/ directory
  3. If you don't already have a header.php in /my-templates/, copy header.php from /bb-templates/ and place it in /my-templates/
  4. Edit header.php in a text editor changing:

    <link rel="stylesheet" href="<?php bb_stylesheet_uri(); ?>" type="text/css" />
    

To:

<!--  BB-Mobile Plugin -->
<?php if ( mobile_check() ) : ?>
<?php $stylesheet = (bb_get_option('uri') . 'my-templates/mobile.css'); ?>
    <link rel="stylesheet" href="<?php echo $stylesheet; ?>" type="text/css" />
<?php else : ?>
    <link rel="stylesheet" href="<?php bb_stylesheet_uri(); ?>" type="text/css" />
<?php endif; ?>
<!-- End of BB-Mobile Plugin -->
  1. Navigate a mobile phone or PDA device to your site!

Note: If you are using an internationalized version of bbPress, you have to also do step 6!

  1. If internationalized, also change:

    <link rel="stylesheet" href="<?php bb_stylesheet_uri( 'rtl' ); ?>" type="text/css" />
    

To:

<!--  BB-Mobile Plugin -->
<?php if ( mobile_check() ) : ?>
<?php $stylesheet = (bb_get_option('uri') . 'my-templates/mobile.css'); ?>
    <link rel="stylesheet" href="<?php echo $stylesheet; ?>" type="text/css" />
<?php else : ?>
    <link rel="stylesheet" href="<?php bb_stylesheet_uri( 'rtl' ); ?>" type="text/css" />
<?php endif; ?>
<!-- End of BB-Mobile Plugin -->

Code is Poetry.