diff options
| author | Christian Fowler <spider@viovio.com> | 2010-04-07 05:04:02 +0000 |
|---|---|---|
| committer | Christian Fowler <spider@viovio.com> | 2010-04-07 05:04:02 +0000 |
| commit | 44067f73943cf8fb3cc440ba6216b711b24f6ac6 (patch) | |
| tree | 9e33b317d0fe90b1bbdfaa9ea18838cfebc6d357 | |
| parent | 579f959a6dab8fd69609e07cee16bc71a696147d (diff) | |
| download | themes-44067f73943cf8fb3cc440ba6216b711b24f6ac6.tar.gz themes-44067f73943cf8fb3cc440ba6216b711b24f6ac6.tar.bz2 themes-44067f73943cf8fb3cc440ba6216b711b24f6ac6.zip | |
check pContent->getPreference( 'style' ) for a per content style override - there is no interface to shove this into liberty_content_prefs right now (except for your database shell)
| -rw-r--r-- | BitThemes.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/BitThemes.php b/BitThemes.php index ba48a4b..4935153 100644 --- a/BitThemes.php +++ b/BitThemes.php @@ -1,6 +1,6 @@ <?php /** - * @version $Header: /cvsroot/bitweaver/_bit_themes/BitThemes.php,v 1.109 2010/03/10 02:29:30 wjames5 Exp $ + * @version $Header: /cvsroot/bitweaver/_bit_themes/BitThemes.php,v 1.110 2010/04/07 05:04:02 spiderr Exp $ * @package themes */ @@ -1955,7 +1955,9 @@ function themes_content_display( $pContent ) { global $gBitSystem, $gBitSmarty, $gBitThemes, $gBitUser, $gQueryUser; // users_themes='u' is for all users content - if( $gBitSystem->getConfig( 'users_themes' ) == 'u' ) { + if( is_a( $pContent, 'LibertyContent' ) && $pContent->getPreference( 'style' ) ) { + $theme = $pContent->getPreference( 'style' ); + } elseif( $gBitSystem->getConfig( 'users_themes' ) == 'u' ) { if( $gBitSystem->isFeatureActive( 'users_preferences' ) && is_object( $pContent ) && $pContent->isValid() ) { if( $pContent->getField( 'user_id' ) == $gBitUser->mUserId ) { // small optimization to reduce checking when we are looking at our own content, which is frequent @@ -1967,6 +1969,7 @@ function themes_content_display( $pContent ) { } } } + if( !empty( $theme ) && $theme != DEFAULT_THEME ) { $gBitThemes->setStyle( $theme ); if( !is_object( $gQueryUser ) ) { |
