Changeset 5920


Ignore:
Timestamp:
04/18/10 20:59:37 (9 years ago)
Author:
nikrou
Message:

Bug 1617 fixed : help page is displayed in current theme in public or admin pages

Location:
trunk
Files:
18 edited
2 copied

Legend:

Unmodified
Added
Removed
  • trunk/admin/cat_modify.php

    r5335 r5920  
    258258        ? '' : stripslashes($_POST['mail_content']), 
    259259    'U_CHILDREN' => $cat_list_url.'&parent_id='.$category['id'], 
    260     'U_HELP' => get_root_url().'popuphelp.php?page=cat_modify', 
     260    'U_HELP' => get_root_url().'admin/popuphelp.php?page=cat_modify', 
    261261 
    262262    'F_ACTION' => $form_action, 
  • trunk/admin/cat_move.php

    r5196 r5920  
    6666$template->assign( 
    6767  array( 
    68     'U_HELP' => PHPWG_ROOT_PATH.'popuphelp.php?page=cat_move', 
    69     'F_ACTION' => PHPWG_ROOT_PATH.'admin.php?page=cat_move', 
     68    'U_HELP' => get_root_url().'admin/popuphelp.php?page=cat_move', 
     69    'F_ACTION' => get_root_url().'admin.php?page=cat_move', 
    7070    ) 
    7171  ); 
  • trunk/admin/cat_options.php

    r5196 r5920  
    152152$template->assign( 
    153153  array( 
    154     'U_HELP' => PHPWG_ROOT_PATH.'/popuphelp.php?page=cat_options', 
     154    'U_HELP' => get_root_url().'admin/popuphelp.php?page=cat_options', 
    155155    'F_ACTION'=>$base_url.$page['section'] 
    156156   ) 
  • trunk/admin/cat_perm.php

    r5196 r5920  
    203203        'admin.php?page=cat_modify&cat_id=' 
    204204        ), 
    205     'U_HELP' => get_root_url().'popuphelp.php?page=cat_perm', 
     205    'U_HELP' => get_root_url().'admin/popuphelp.php?page=cat_perm', 
    206206    'F_ACTION' => get_root_url().'admin.php?page=cat_perm&cat='.$page['cat'] 
    207207    ) 
  • trunk/admin/configuration.php

    r5723 r5920  
    234234$template->assign( 
    235235  array( 
    236     'U_HELP' => get_root_url().'popuphelp.php?page=configuration', 
     236    'U_HELP' => get_root_url().'admin/popuphelp.php?page=configuration', 
    237237    'F_ACTION'=>$action 
    238238    )); 
  • trunk/admin/extend_for_templates.php

    r5196 r5920  
    173173$template->assign( 
    174174  array( 
    175     'U_HELP' => get_root_url().'popuphelp.php?page=extend_for_templates', 
     175    'U_HELP' => get_root_url().'admin/popuphelp.php?page=extend_for_templates', 
    176176    )); 
    177177ksort($tpl_extension); 
  • trunk/admin/group_list.php

    r5196 r5920  
    160160  array( 
    161161    'F_ADD_ACTION' => get_root_url().'admin.php?page=group_list', 
    162     'U_HELP' => get_root_url().'popuphelp.php?page=group_list', 
     162    'U_HELP' => get_root_url().'admin/popuphelp.php?page=group_list', 
    163163    'PWG_TOKEN' => get_pwg_token(), 
    164164    ) 
  • trunk/admin/history.php

    r5576 r5920  
    171171$template->assign( 
    172172  array( 
    173     'U_HELP' => PHPWG_ROOT_PATH.'popuphelp.php?page=history', 
     173    'U_HELP' => get_root_url().'admin/popuphelp.php?page=history', 
    174174    'F_ACTION' => get_root_url().'admin.php?page=history' 
    175175    ) 
  • trunk/admin/maintenance.php

    r5745 r5920  
    141141        'U_MAINT_SEARCH' => $start_url.'search', 
    142142    'U_MAINT_COMPILED_TEMPLATES' => $start_url.'compiled-templates', 
    143     'U_HELP' => PHPWG_ROOT_PATH.'popuphelp.php?page=maintenance', 
     143    'U_HELP' => get_root_url().'admin/popuphelp.php?page=maintenance', 
    144144    ) 
    145145  ); 
  • trunk/admin/notification_by_mail.php

    r5573 r5920  
    583583  array 
    584584  ( 
    585     'U_HELP' => add_url_params(get_root_url().'popuphelp.php', array('page' => 'notification_by_mail')), 
     585    'U_HELP' => get_root_url().'admin/popuphelp.php?page=notification_by_mail', 
    586586    'F_ACTION'=> $base_url.get_query_string_diff(array()) 
    587587  ) 
  • trunk/admin/permalinks.php

    r5196 r5920  
    174174} 
    175175$template->assign('deleted_permalinks', $deleted_permalinks); 
    176 $template->assign('U_HELP', get_root_url().'popuphelp.php?page=permalinks'); 
     176$template->assign('U_HELP', get_root_url().'admin/popuphelp.php?page=permalinks'); 
    177177 
    178178$template->assign_var_from_handle('ADMIN_CONTENT', 'permalinks'); 
  • trunk/admin/popuphelp.php

    r5917 r5920  
    2222// +-----------------------------------------------------------------------+ 
    2323 
    24 if (!defined('PHPWG_ROOT_PATH')) 
    25 { 
    26   die('Hacking attempt!'); 
    27 } 
     24// +-----------------------------------------------------------------------+ 
     25// |                           initialization                              | 
     26// +-----------------------------------------------------------------------+ 
    2827 
    29 include_once(PHPWG_ROOT_PATH.'admin/include/functions.php'); 
     28define('PHPWG_ROOT_PATH', '../'); 
     29define('PWG_HELP', true); 
     30define('IN_ADMIN', true); 
     31include_once( PHPWG_ROOT_PATH.'include/common.inc.php' ); 
    3032 
    3133// +-----------------------------------------------------------------------+ 
     
    3436check_status(ACCESS_ADMINISTRATOR); 
    3537 
     38$page['body_id'] = 'thePopuphelpPage'; 
     39$title = l10n('Piwigo Help'); 
     40$page['page_banner'] = '<h1>'.$title.'</h1>'; 
     41$page['meta_robots']=array('noindex'=>1, 'nofollow'=>1); 
     42include(PHPWG_ROOT_PATH.'include/page_header.php'); 
     43 
     44if 
     45  ( 
     46    isset($_GET['page']) 
     47    and preg_match('/^[a-z_]*$/', $_GET['page']) 
     48  ) 
     49{ 
     50  $help_content = 
     51    load_language('help/'.$_GET['page'].'.html', '', array('return'=>true) ); 
     52 
     53  if ($help_content == false) 
     54  { 
     55    $help_content = ''; 
     56  } 
     57 
     58  $help_content = trigger_event( 
     59    'get_popup_help_content', $help_content, $_GET['page']); 
     60} 
     61else 
     62{ 
     63  die('Hacking attempt!'); 
     64} 
     65 
     66$template->set_filename('popuphelp','popuphelp.tpl'); 
     67 
     68$template->assign( 
     69  array 
     70  ( 
     71    'HELP_CONTENT' => $help_content 
     72  )); 
     73 
    3674// +-----------------------------------------------------------------------+ 
    37 // |                               functions                               | 
     75// |                           html code display                           | 
    3876// +-----------------------------------------------------------------------+ 
    3977 
     78$template->pparse('popuphelp'); 
    4079 
    41 // +-----------------------------------------------------------------------+ 
    42 // |                          categories movement                          | 
    43 // +-----------------------------------------------------------------------+ 
     80include(PHPWG_ROOT_PATH.'include/page_tail.php'); 
    4481 
    45 if (isset($_POST['submit'])) 
    46 { 
    47   if (count($_POST['selection']) > 0) 
    48   { 
    49     // TODO: tests 
    50     move_categories($_POST['selection'], $_POST['parent']); 
    51   } 
    52   else 
    53   { 
    54     array_push( 
    55       $page['errors'], 
    56       l10n('Select at least one category') 
    57       ); 
    58   } 
    59 } 
    60  
    61 // +-----------------------------------------------------------------------+ 
    62 // |                       template initialization                         | 
    63 // +-----------------------------------------------------------------------+ 
    64 $template->set_filename('cat_move', 'cat_move.tpl'); 
    65  
    66 $template->assign( 
    67   array( 
    68     'U_HELP' => PHPWG_ROOT_PATH.'popuphelp.php?page=cat_move', 
    69     'F_ACTION' => PHPWG_ROOT_PATH.'admin.php?page=cat_move', 
    70     ) 
    71   ); 
    72    
    73 // +-----------------------------------------------------------------------+ 
    74 // |                          Categories display                           | 
    75 // +-----------------------------------------------------------------------+ 
    76  
    77 $query = ' 
    78 SELECT id,name,uppercats,global_rank 
    79   FROM '.CATEGORIES_TABLE.' 
    80   WHERE dir IS NULL 
    81 ;'; 
    82 display_select_cat_wrapper( 
    83   $query, 
    84   array(), 
    85   'category_to_move_options' 
    86   ); 
    87  
    88 $query = ' 
    89 SELECT id,name,uppercats,global_rank 
    90   FROM '.CATEGORIES_TABLE.' 
    91 ;'; 
    92  
    93 display_select_cat_wrapper( 
    94   $query, 
    95   array(), 
    96   'category_parent_options' 
    97   ); 
    98  
    99 // +-----------------------------------------------------------------------+ 
    100 // |                          sending html code                            | 
    101 // +-----------------------------------------------------------------------+ 
    102  
    103 $template->assign_var_from_handle('ADMIN_CONTENT', 'cat_move'); 
    10482?> 
  • trunk/admin/site_manager.php

    r5196 r5920  
    206206$template->assign( 
    207207  array( 
    208     'U_HELP'    => get_root_url().'popuphelp.php?page=site_manager', 
     208    'U_HELP'    => get_root_url().'admin/popuphelp.php?page=site_manager', 
    209209    'F_ACTION'  => get_root_url().'admin.php'.get_query_string_diff(array('action','site','pwg_token')), 
    210210    'PWG_TOKEN' => get_pwg_token(), 
  • trunk/admin/site_update.php

    r5207 r5920  
    847847    'L_RESULT_METADATA'=>$result_title.l10n('Metadata synchronization results'), 
    848848    'METADATA_LIST' => $used_metadata, 
    849     'U_HELP' => get_root_url().'popuphelp.php?page=synchronize', 
     849    'U_HELP' => get_root_url().'admin/popuphelp.php?page=synchronize', 
    850850    )); 
    851851 
  • trunk/admin/stats.php

    r5196 r5920  
    383383    'L_STAT_TITLE' => implode($conf['level_separator'], $title_parts), 
    384384    'PERIOD_LABEL' => $period_label, 
    385     'U_HELP' => get_root_url().'popuphelp.php?page=history', 
     385    'U_HELP' => get_root_url().'admin/popuphelp.php?page=history', 
    386386    'F_ACTION' => $base_url, 
    387387    ) 
  • trunk/admin/themes/default/template/popuphelp.tpl

    r5123 r5920  
     1{known_script id="jquery.tipTip" src=$ROOT_URL|@cat:"themes/default/js/plugins/jquery.tipTip.minified.js" } 
     2 
    13<div id="content" class="content"> 
    24{$HELP_CONTENT} 
  • trunk/admin/thumbnail.php

    r5196 r5920  
    163163$template->set_filenames( array('thumbnail'=>'thumbnail.tpl') ); 
    164164 
    165 $template->assign(array( 
    166   'U_HELP' => PHPWG_ROOT_PATH.'popuphelp.php?page=thumbnail', 
    167   )); 
     165$template->assign( 
     166  array('U_HELP' => get_root_url().'admin/popuphelp.php?page=thumbnail') 
     167  ); 
    168168// +-----------------------------------------------------------------------+ 
    169169// |                   search pictures without thumbnails                  | 
     
    171171$wo_thumbnails = array(); 
    172172$thumbnalized = array(); 
    173  
    174173 
    175174// what is the directory to search in ? 
  • trunk/admin/user_list.php

    r5196 r5920  
    517517$template->assign( 
    518518  array( 
    519     'U_HELP' => get_root_url().'popuphelp.php?page=user_list', 
     519    'U_HELP' => get_root_url().'admin/popuphelp.php?page=user_list', 
    520520 
    521521    'F_ADD_ACTION' => $base_url, 
  • trunk/include/common.inc.php

    r5509 r5920  
    153153 
    154154// template instance 
    155 if (( defined('IN_ADMIN') and IN_ADMIN ) 
    156     or (defined('PWG_HELP') and PWG_HELP)) 
     155if (defined('IN_ADMIN') and IN_ADMIN ) 
    157156{// Admin template 
    158157  $template = new Template(PHPWG_ROOT_PATH.'admin/themes', $conf['admin_theme']); 
  • trunk/themes/default/template/popuphelp.tpl

    r5917 r5920  
    66  <li> 
    77    <a href="#" onclick="window.close();" title="{'Close this window'|@translate}"> 
    8       <img src="{$ROOT_URL}{$themeconf.admin_icon_dir}/exit.png" class="button" alt="exit"> 
     8      <img src="{$ROOT_URL}{$themeconf.icon_dir}/exit.png" class="button" alt="exit"> 
    99    </a> 
    1010  </li> 
Note: See TracChangeset for help on using the changeset viewer.