Changeset 13242


Ignore:
Timestamp:
Feb 18, 2012, 10:18:34 PM (9 years ago)
Author:
patdenice
Message:

feature:2577
Automaticaly install smartpocket during install or upgrade.
hide mobile theme from themes list on user side.

Location:
trunk
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/include/functions_install.inc.php

    r12922 r13242  
    135135  foreach ($themes->fs_themes as $theme_id => $fs_theme)
    136136  {
    137     if (in_array($theme_id, array('Sylvia', 'clear', 'dark')))
     137    if (in_array($theme_id, array('Sylvia', 'clear', 'dark', 'smartpocket')))
    138138    {
    139139      $themes->perform_action('activate', $theme_id);
  • trunk/admin/themes/default/template/themes_installed.tpl

    r13172 r13242  
    1818{foreach from=$active_themes item=theme}
    1919  <div class="themeBox{if $theme.is_default} themeDefault{/if}">
    20     <div class="themeName">{$theme.name}{if $theme.is_default} <em>({'default'|@translate})</em>{/if} {if $theme.mobile} <em>({'mobile'|@translate})</em>{/if}</div>
     20    <div class="themeName">{$theme.name}{if $theme.is_default} <em>({'default'|@translate})</em>{/if} {if $theme.mobile} <em>({'Mobile'|@translate})</em>{/if}</div>
    2121    <div class="themeShot"><a href="{$theme.screenshot}" class="preview-box" title="{$theme.name}"><img src="{$theme.screenshot}" alt=""></a></div>
    2222    <div class="themeActions">
     
    4848{foreach from=$inactive_themes item=theme}
    4949  <div class="themeBox">
    50     <div class="themeName">{$theme.name}{if $theme.mobile} <em>({'mobile'|@translate})</em>{/if}</div>
     50    <div class="themeName">{$theme.name}{if $theme.mobile} <em>({'Mobile'|@translate})</em>{/if}</div>
    5151    <div class="themeShot"><a href="{$theme.screenshot}" class="preview-box" title="{$theme.name}"><img src="{$theme.screenshot}" alt=""></a></div>
    5252    <div class="themeActions">
  • trunk/include/functions.inc.php

    r13240 r13242  
    758758 * returns available themes
    759759 */
    760 function get_pwg_themes()
     760function get_pwg_themes($show_mobile=false)
    761761{
    762762  global $conf;
     
    774774  while ($row = pwg_db_fetch_assoc($result))
    775775  {
     776    if ($row['id'] == $conf['mobile_theme'])
     777    {
     778      if (!$show_mobile)
     779      {
     780        continue;
     781      }
     782      $row['name'] .= ' ('.l10n('Mobile').')';
     783    }
    776784    if (check_theme_installed($row['id']))
    777785    {
  • trunk/install/config.sql

    r13004 r13242  
    7474INSERT INTO piwigo_config (param,value) VALUES ('original_resize_maxheight','2016');
    7575INSERT INTO piwigo_config (param,value) VALUES ('original_resize_quality','95');
     76INSERT INTO piwigo_config (param,value) VALUES ('mobile_theme',null);
  • trunk/plugins/LocalFilesEditor/include/css.inc.php

    r11586 r13242  
    1111  $edited_file = $_POST['edited_file'];
    1212}
    13 elseif (isset($_GET['theme']) and in_array($_GET['theme'], array_keys(get_pwg_themes())))
     13elseif (isset($_GET['theme']) and in_array($_GET['theme'], array_keys(get_pwg_themes(true))))
    1414{
    1515  $edited_file = PHPWG_ROOT_PATH.PWG_LOCAL_DIR . 'css/'.$_GET['theme'].'-rules.css';
Note: See TracChangeset for help on using the changeset viewer.