From df0d5d19054bca46a2bcc2f9d8bee136ffa8c8ad Mon Sep 17 00:00:00 2001 From: z0rglub Date: Wed, 21 May 2003 17:46:57 +0000 Subject: *** empty log message *** git-svn-id: http://piwigo.org/svn/trunk@15 68402e56-0260-453c-a942-63ccdbb3a9ee --- admin/infos_images.php | 3 +- include/functions.inc.php | 32 ++++++++++++++----- template/default/admin/edit_cat.vtp | 48 ++++++++++++++++++++++++++++ template/default/admin/infos_image.vtp | 58 ++++++++++++++++++++++++++++++++++ 4 files changed, 132 insertions(+), 9 deletions(-) create mode 100644 template/default/admin/edit_cat.vtp create mode 100644 template/default/admin/infos_image.vtp diff --git a/admin/infos_images.php b/admin/infos_images.php index 92a7a3885..546234189 100644 --- a/admin/infos_images.php +++ b/admin/infos_images.php @@ -163,7 +163,8 @@ if ( isset( $page['cat'] ) ) if ( is_numeric( $_GET['num'] ) and $_GET['num'] >= 0 ) { - $page['start'] = floor( $_GET['num'] / $page['nb_image_page'] ) * $page['nb_image_page']; + $page['start'] = + floor( $_GET['num'] / $page['nb_image_page'] ) * $page['nb_image_page']; } // retrieving category information $result = get_cat_info( $page['cat'] ); diff --git a/include/functions.inc.php b/include/functions.inc.php index 41611df86..5ff119f29 100644 --- a/include/functions.inc.php +++ b/include/functions.inc.php @@ -101,23 +101,39 @@ function get_elapsed_time( $start, $end ) // - This function was created because IE5 does not respect the // CSS "white-space: nowrap;" property unless space and minus // characters are replaced like this function does. +// - Example : +//
My friend
+// ( 01234567891111111111222222222233 ) +// ( 0123456789012345678901 ) +// becomes : +//
My friend
function replace_space( $string ) { - //return $string; - $return_string = ""; + //return $string; + $return_string = ''; + // $remaining is the rest of the string where to replace spaces characters $remaining = $string; - + // $start represents the position of the next '<' character + // $end represents the position of the next '>' character $start = 0; $end = 0; - $start = strpos ( $remaining, '<' ); - $end = strpos ( $remaining, '>' ); + $start = strpos ( $remaining, '<' ); // -> 0 + $end = strpos ( $remaining, '>' ); // -> 16 + // as long as a '<' and his friend '>' are found, we loop while ( is_numeric( $start ) and is_numeric( $end ) ) { + // $treatment is the part of the string to treat + // In the first loop of our example, this variable is empty, but in the + // second loop, it equals 'My friend' $treatment = substr ( $remaining, 0, $start ); + // Replacement of ' ' by his equivalent ' ' $treatment = str_replace( ' ', ' ', $treatment ); $treatment = str_replace( '-', '−', $treatment ); - $return_string.= $treatment.substr ( $remaining, $start, - $end - $start + 1 ); + // composing the string to return by adding the treated string and the + // following HTML tag -> 'My friend' + $return_string.= $treatment.substr( $remaining, $start, $end-$start+1 ); + // the remaining string is deplaced to the part after the '>' of this + // loop $remaining = substr ( $remaining, $end + 1, strlen( $remaining ) ); $start = strpos ( $remaining, '<' ); $end = strpos ( $remaining, '>' ); @@ -125,7 +141,7 @@ function replace_space( $string ) $treatment = str_replace( ' ', ' ', $remaining ); $treatment = str_replace( '-', '−', $treatment ); $return_string.= $treatment; - + return $return_string; } diff --git a/template/default/admin/edit_cat.vtp b/template/default/admin/edit_cat.vtp new file mode 100644 index 000000000..56ec99505 --- /dev/null +++ b/template/default/admin/edit_cat.vtp @@ -0,0 +1,48 @@ + +
+ {#editcat_confirm} [ {#editcat_back} ]
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{#editcat_title1} "{#cat:name}" [ {#cat:dir} ]
{#remote_site}{#url}
{#editcat_name} + +
{#editcat_comment} + +
{#editcat_status} + + {#editcat_status_info} +
 
+ +
+
\ No newline at end of file diff --git a/template/default/admin/infos_image.vtp b/template/default/admin/infos_image.vtp new file mode 100644 index 000000000..c6f3db7f1 --- /dev/null +++ b/template/default/admin/infos_image.vtp @@ -0,0 +1,58 @@ +
+ + + + + + + + + + + + + + +
{#infoimage_general} "{#cat_name}"
{#author}
+ + + + {#infoimage_useforall} +
+
{#infoimage_creation_date} [DD/MM/YYYY]
+
+ + + + {#infoimage_useforall} +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
{#infoimage_detailed}
{#navigation_bar}
{#thumbnail}{#infoimage_title}{#author}{#infoimage_comment}{#infoimage_creation_date}
{#default_name}
+ +
+
\ No newline at end of file -- cgit v1.2.3