diff options
author | z0rglub <z0rglub@piwigo.org> | 2003-07-21 20:51:47 +0000 |
---|---|---|
committer | z0rglub <z0rglub@piwigo.org> | 2003-07-21 20:51:47 +0000 |
commit | b125c3b0863d61de32bb02a5beaa26fe0ab0d54a (patch) | |
tree | 8f00a6367ab46af4bc392b8ad9db5d78608fbff6 /admin | |
parent | e9b4e0e0de65caebd47b5e6df6d252f9d1b85932 (diff) |
['template'] as user_template for displaying pictures in the template
git-svn-id: http://piwigo.org/svn/trunk@29 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'admin')
-rw-r--r-- | admin/admin.php | 1 | ||||
-rw-r--r-- | admin/cat_list.php | 1 | ||||
-rw-r--r-- | admin/cat_perm.php | 1 | ||||
-rw-r--r-- | admin/comments.php | 1 | ||||
-rw-r--r-- | admin/group_list.php | 1 | ||||
-rw-r--r-- | admin/group_perm.php | 1 | ||||
-rw-r--r-- | admin/stats.php | 1 | ||||
-rw-r--r-- | admin/thumbnail.php | 1 | ||||
-rw-r--r-- | admin/update.php | 11 | ||||
-rw-r--r-- | admin/user_perm.php | 1 |
10 files changed, 16 insertions, 4 deletions
diff --git a/admin/admin.php b/admin/admin.php index 388ce9eb0..37365fd51 100644 --- a/admin/admin.php +++ b/admin/admin.php @@ -23,6 +23,7 @@ $handle = $vtp->Open( '../template/'.$user['template'].'/admin/admin.vtp' ); // language $tpl = array( 'menu_title', 'title_default', 'charset' ); templatize_array( $tpl, 'lang', $handle ); +$vtp->setGlobalVar( $handle, 'user_template', $user['template'] ); //--------------------------------------- validating page and creation of title $page_valide = false; $title = ''; diff --git a/admin/cat_list.php b/admin/cat_list.php index a0c7696b7..ea744d48d 100644 --- a/admin/cat_list.php +++ b/admin/cat_list.php @@ -25,6 +25,7 @@ $vtp->setGlobalVar( $sub, 'cat_down', $lang['cat_down'] ); $vtp->setGlobalVar( $sub, 'cat_image_info', $lang['cat_image_info'] ); $vtp->setGlobalVar( $sub, 'cat_permission', $lang['cat_permission'] ); $vtp->setGlobalVar( $sub, 'cat_update', $lang['cat_update'] ); +$vtp->setGlobalVar( $sub, 'user_template', $user['template'] ); //--------------------------------------------------------------- rank updates if ( isset( $_GET['up'] ) && is_numeric( $_GET['up'] ) ) { diff --git a/admin/cat_perm.php b/admin/cat_perm.php index d8e0f28dc..6ea50a73a 100644 --- a/admin/cat_perm.php +++ b/admin/cat_perm.php @@ -21,6 +21,7 @@ $error = array(); $tpl = array( 'permuser_authorized','permuser_forbidden','menu_groups', 'submit','menu_users','permuser_parent_forbidden' ); templatize_array( $tpl, 'lang', $sub ); +$vtp->setGlobalVar( $sub, 'user_template', $user['template'] ); //-------------------------------------------------------------- category infos if ( isset( $_GET['cat_id'] ) ) { diff --git a/admin/comments.php b/admin/comments.php index fdf2b3823..d6bd55379 100644 --- a/admin/comments.php +++ b/admin/comments.php @@ -139,6 +139,7 @@ if ( isset( $_POST['submit'] ) ) $sub = $vtp->Open( '../template/'.$user['template'].'/admin/comments.vtp' ); $tpl = array( 'stats_last_days','delete','close','submit','open' ); templatize_array( $tpl, 'lang', $sub ); +$vtp->setGlobalVar( $sub, 'user_template', $user['template'] ); //--------------------------------------------------- number of days to display if ( isset( $_GET['last_days'] ) ) define( MAX_DAYS, $_GET['last_days'] ); else define( MAX_DAYS, 0 ); diff --git a/admin/group_list.php b/admin/group_list.php index f58dff1ff..c600480bc 100644 --- a/admin/group_list.php +++ b/admin/group_list.php @@ -20,6 +20,7 @@ $sub = $vtp->Open( '../template/'.$user['template'].'/admin/group_list.vtp' ); $tpl = array( 'group_add','add','listuser_permission','delete', 'group_confirm','yes','no','group_list_title' ); templatize_array( $tpl, 'lang', $sub ); +$vtp->setGlobalVar( $sub, 'user_template', $user['template'] ); //-------------------------------------------------------------- delete a group $error = array(); if ( isset ( $_GET['delete'] ) and is_numeric( $_GET['delete'] ) ) diff --git a/admin/group_perm.php b/admin/group_perm.php index 67e5e2cd3..ef514f6b2 100644 --- a/admin/group_perm.php +++ b/admin/group_perm.php @@ -22,6 +22,7 @@ $tpl = array( 'permuser_authorized','permuser_forbidden','submit', 'permuser_parent_forbidden','permuser_info_message', 'adduser_info_back' ); templatize_array( $tpl, 'lang', $sub ); +$vtp->setGlobalVar( $sub, 'user_template', $user['template'] ); //--------------------------------------------------------------------- updates if ( isset( $_POST['submit'] ) ) { diff --git a/admin/stats.php b/admin/stats.php index 39f5888fb..66cdec2de 100644 --- a/admin/stats.php +++ b/admin/stats.php @@ -38,6 +38,7 @@ $tpl = array( 'stats_last_days','date','login', 'stats_visitors','stats_empty', 'stats_pages_seen_graph_title', 'stats_visitors_graph_title'); templatize_array( $tpl, 'lang', $sub ); +$vtp->setGlobalVar( $sub, 'user_template', $user['template'] ); //--------------------------------------------------- number of days to display if ( isset( $_GET['last_days'] ) ) { diff --git a/admin/thumbnail.php b/admin/thumbnail.php index 538b536b7..747c22dd3 100644 --- a/admin/thumbnail.php +++ b/admin/thumbnail.php @@ -267,6 +267,7 @@ $tpl = array( 'tn_results_gen_time','tn_stats','tn_stats_nb','tn_stats_total', 'tn_stats_max','tn_stats_min','tn_stats_mean' ); templatize_array( $tpl, 'lang', $sub ); +$vtp->setGlobalVar( $sub, 'user_template', $user['template'] ); //----------------------------------------------------- miniaturization results if ( isset( $_GET['dir'] ) ) { diff --git a/admin/update.php b/admin/update.php index eefd913c1..30d8e0f88 100644 --- a/admin/update.php +++ b/admin/update.php @@ -19,7 +19,7 @@ include_once( './include/isadmin.inc.php' ); //------------------------------------------------------------------- functions function insert_local_category( $cat_id ) { - global $conf, $page; + global $conf, $page, $user; $site_id = 1; @@ -31,7 +31,8 @@ function insert_local_category( $cat_id ) $result = get_cat_info( $cat_id ); $cat_directory.= '/'.$result['local_dir']; // 1. display the category name to update - $output = '<img src="./images/puce.gif" alt=">" />'; + $src = '../template/'.$user['template'].'/admin/images/puce.gif'; + $output = '<img src="'.$src.'" alt=">" />'; $output.= '<span style="font-weight:bold;">'.$result['name'][0].'</span>'; $output.= ' [ '.$result['last_dir'].' ]'; $output.= '<div class="retrait">'; @@ -370,7 +371,7 @@ function remote_images() // the xml_file. function insert_remote_category( $xml_dir, $site_id, $id_uppercat, $level ) { - global $conf; + global $conf,$user; $output = ''; $categories = array(); @@ -382,7 +383,8 @@ function insert_remote_category( $xml_dir, $site_id, $id_uppercat, $level ) $name = getAttribute( $list_dirs[$i], 'name' ); $categories[$i] = $name; - $output.= '<img src="./images/puce.gif">'; + $src = '../template/'.$user['template'].'/admin/images/puce.gif'; + $output.= '<img src="'.$src.'" alt=">" />'; $output.= '<span style="font-weight:bold;">'.$name.'</span>'; $output.= '<div class="retrait">'; @@ -552,6 +554,7 @@ $tpl = array( 'update_default_title', 'update_only_cat', 'update_all', 'update_research_conclusion', 'update_deletion_conclusion', 'remote_site', 'update_part_research' ); templatize_array( $tpl, 'lang', $sub ); +$vtp->setGlobalVar( $sub, 'user_template', $user['template'] ); //-------------------------------------------- introduction : choices of update // Display choice if "update" var is not specified check_cat_id( $_GET['update'] ); diff --git a/admin/user_perm.php b/admin/user_perm.php index 081560c54..5cffe2cbf 100644 --- a/admin/user_perm.php +++ b/admin/user_perm.php @@ -22,6 +22,7 @@ $tpl = array( 'permuser_authorized','permuser_forbidden','submit', 'permuser_parent_forbidden','permuser_info_message', 'adduser_info_back' ); templatize_array( $tpl, 'lang', $sub ); +$vtp->setGlobalVar( $sub, 'user_template', $user['template'] ); //--------------------------------------------------------------------- updates if ( isset( $_POST['submit'] ) ) { |