Changeset 10938


Ignore:
Timestamp:
May 19, 2011, 12:34:45 AM (9 years ago)
Author:
repie38
Message:

2.2.x compatible

Location:
extensions/Random_Header
Files:
1 added
1 deleted
1 edited
2 moved

Legend:

Unmodified
Added
Removed
  • extensions/Random_Header/main.inc.php

    r7414 r10938  
    22/*
    33Plugin Name: Random Header
    4 Version: 2.1.2
     4Version: 2.2
    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://piwigo.org/ext/extension_view.php?eid=188
     
    1010
    1111if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
    12 DEFINE('RH_VERSION','v2.1.2');
     12DEFINE('RH_VERSION','v2.2');
    1313define('RH_PATH' , PHPWG_PLUGINS_PATH . basename(dirname(__FILE__)) . '/');
    1414
     
    5757                array_push($menu,array(
    5858                                'NAME' => 'Random Header',
    59                                 'URL'  => get_admin_plugin_menu_link(dirname(__FILE__).'/admin/rh_admin.php')));
     59                                'URL'  =>  get_root_url().'admin.php?page=plugin-'.basename(dirname(__FILE__))));
    6060                return $menu;
    6161        }
     
    7777
    7878                                if ($this->rh_config[$usertheme]['mode_background']=='on') {
    79                                         $template->append('head_elements','<style>#theHeader{background: url('.$toto[0].') no-repeat;'. $this->rh_config[$usertheme]['head_css'] .'}</style>');
     79                                        $template->append('head_elements','<style type="text/css">#theHeader{background: url('.$toto[0].') no-repeat;'. $this->rh_config[$usertheme]['head_css'] .'}</style>');
    8080                                }
    8181                                else {
    8282                                        if ($this->rh_config[$usertheme]['img_css']!='' || $this->rh_config[$usertheme]['head_css']!='')
    83                                                 $template->append('head_elements','<style>#theHeader{'. $this->rh_config[$usertheme]['head_css'] .'}#theHeader #RandomImage{'. $this->rh_config[$usertheme]['img_css'] .'}</style>');
     83                                                $template->append('head_elements','<style type="text/css">#theHeader{'. $this->rh_config[$usertheme]['head_css'] .'}#theHeader #RandomImage{'. $this->rh_config[$usertheme]['img_css'] .'}</style>');
    8484                                        $page['page_banner'] = ($this->rh_config[$usertheme]['concat_before']=='on') ? $conf['page_banner'] : '';
    8585                                        $page['page_banner'].= ($this->rh_config[$usertheme]['root_link']=='on') ? '<a href="'.PHPWG_ROOT_PATH.'" title="'.l10n('Home').'">'    : '';
Note: See TracChangeset for help on using the changeset viewer.