Ignore:
Timestamp:
Mar 17, 2010, 1:48:38 AM (14 years ago)
Author:
plg
Message:

feature 1514: new screen to manage installed themes; activate, deactivate,
delete, set as default.

plugins.class.php was merged back to a state it doesn't manage themes at all.
themes.class.php was created instead, from a duplication of plugins.class.php
and strongly modified then.

feature 1507: the display of available themes is now much more "graphic".

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/themes_new.php

    r5143 r5153  
    33// | Piwigo - a PHP based picture gallery                                  |
    44// +-----------------------------------------------------------------------+
    5 // | Copyright(C) 2008-2009 Piwigo Team                  http://piwigo.org |
     5// | Copyright(C) 2008-2010 Piwigo Team                  http://piwigo.org |
    66// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
    77// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
     
    2727}
    2828
    29 include_once(PHPWG_ROOT_PATH.'admin/include/plugins.class.php');
     29include_once(PHPWG_ROOT_PATH.'admin/include/themes.class.php');
    3030
    3131$base_url = get_root_url().'admin.php?page='.$page['page'];
    3232
    33 $themes = new plugins();
     33$themes = new themes();
     34$themes->set_tabsheet('themes_new');
    3435
    3536// +-----------------------------------------------------------------------+
     
    5556if (isset($_GET['revision']) and isset($_GET['extension']) and !is_adviser())
    5657{
    57   $install_status = $themes->extract_plugin_files(
     58  $install_status = $themes->extract_theme_files(
    5859    'install',
    5960    $_GET['revision'],
    60     $_GET['extension'],
    61     'theme'
     61    $_GET['extension']
    6262    );
    6363 
     
    106106$template->set_filenames(array('themes' => 'themes_new.tpl'));
    107107
    108 if ($themes->get_server_plugins(true, 'theme'))
     108if ($themes->get_server_themes(true)) // only new themes
    109109{
    110   foreach($themes->server_plugins as $theme)
     110  foreach($themes->server_themes as $theme)
    111111  {
    112112    $url_auto_install = htmlentities($base_url)
     
    119119      array(
    120120        'name' => $theme['extension_name'],
    121         'src' => PEM_URL.'/upload/extension-'.$theme['extension_id'].'/thumbnail.jpg',
     121        'screenshot' => PEM_URL.'/upload/extension-'.$theme['extension_id'].'/thumbnail.jpg',
    122122        'install_url' => $url_auto_install,
    123123        )
Note: See TracChangeset for help on using the changeset viewer.