Changeset 3687


Ignore:
Timestamp:
07/27/09 00:07:06 (11 years ago)
Author:
repie38
Message:

[random header]fix issue with yoga/grum-dark II and gally/grum-dark II (caused by the space in the theme name)
version is now 2.0.b

Location:
extensions/Random_Header
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • extensions/Random_Header/admin/rh_admin.php

    r3684 r3687  
    88$template->assign( 'RH_VERSION' , RH_VERSION ); 
    99 
    10 foreach (get_pwg_themes() as $pwg_template) { 
     10foreach (str_replace(" ", "_", get_pwg_themes()) as $pwg_template) { 
    1111        if (isset($_POST['submit'])) { 
    1212                $me->rh_config[$pwg_template]['selected_cat']           = $_POST[$pwg_template.'selected_cat']; 
     
    3030                                'CATSELECTED'           =>  $me->rh_config[$pwg_template]['selected_cat'] 
    3131                                )); 
     32} 
    3233 
    33          
    34          
    35 } 
    3634display_select_cat_wrapper( 
    3735          'SELECT id,name,uppercats,global_rank FROM '.CATEGORIES_TABLE, 
  • extensions/Random_Header/main.inc.php

    r3684 r3687  
    22/* 
    33Plugin Name: Random Header 
    4 Version: 2.0 
     4Version: 2.0.b 
    55Description: Random Header allow you to show in the header a random picture from the choosen categorie, as a normal image, or as a background 
    66Plugin URI: http://phpwebgallery.net/ext/extension_view.php?eid=188 
    7 Author: Repié38 
     7Author: repie38 
    88Author URI: http://www.pierre-b.com 
    99*/ 
    1010 
    1111if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 
    12 DEFINE('RH_VERSION','v2.0'); 
     12DEFINE('RH_VERSION','v2.0.b'); 
    1313define('RH_PATH' , PHPWG_PLUGINS_PATH . basename(dirname(__FILE__)) . '/'); 
    1414class RandomHeader 
     
    2121                $this->rh_config = unserialize($x); 
    2222         
    23                 foreach (get_pwg_themes() as $pwg_template) { 
     23                foreach (str_replace(" ", "_", get_pwg_themes()) as $pwg_template) { 
    2424                          if (empty($this->rh_config[$pwg_template]['selected_cat']))  { 
    2525                         
     
    5858                global $conf; 
    5959                global $user; 
    60                 $usertheme=$user['template'].'/'.$user['theme']; 
     60                $usertheme=str_replace(" ", "_", $user['template'].'/'.$user['theme'] ); 
    6161                if ( !defined('IN_ADMIN') && isset($page['body_id']) && ($page['body_id']!='thePicturePage' || $this->rh_config[$usertheme]['active_on_picture']=='on') ) { 
    6262                         
Note: See TracChangeset for help on using the changeset viewer.