- Change of the picture page behavior to be able to open the full size image in a new window

- Minor modification for template migration
- Rename of script.js in scripts.js


git-svn-id: http://piwigo.org/svn/trunk@539 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
gweltas
2004-10-01 22:50:50 +00:00
parent e7b24ebdd0
commit 28dcfea993
13 changed files with 42 additions and 63 deletions
+1 -1
View File
@@ -39,7 +39,7 @@ $template->set_filenames(array('about'=>'about.tpl'));
$template->assign_vars(array( $template->assign_vars(array(
'PAGE_TITLE' => $title, 'PAGE_TITLE' => $title,
'L_ABOUT' => $lang['about_message'], 'L_ABOUT' => $lang['about_message'],
'L_RETURN' => $lang['about_return'], 'L_RETURN' => $lang['return_main_page'],
'U_RETURN' => add_session_id(PHPWG_ROOT_PATH.'category.php?'.$_SERVER['QUERY_STRING']) 'U_RETURN' => add_session_id(PHPWG_ROOT_PATH.'category.php?'.$_SERVER['QUERY_STRING'])
) )
); );
+3 -21
View File
@@ -42,27 +42,9 @@ switch ( $_GET['page'] )
case 'user_modify': case 'user_modify':
$title = $lang['title_modify']; $page_valide = true; break; $title = $lang['title_modify']; $page_valide = true; break;
case 'user_search': case 'user_search':
/* if ( !is_numeric( $_GET['user_id'] ) ) $_GET['user_id'] = -1; $username='';
$query = 'SELECT status,username'; if (isset($_POST['username'])) $username=$_POST['username'];
$query.= ' FROM '.USERS_TABLE; $title = $lang['title_user_perm'].' '.$username;
$query.= ' WHERE id = '.$_GET['user_id'];
$query.= ';';
$result = mysql_query( $query );
if ( mysql_num_rows( $result ) > 0 )
{
$row = mysql_fetch_array( $result );
$page['user_status'] = $row['status'];
if ( $row['username'] == 'guest' ) $row['username'] = $lang['guest'];
$page['user_username'] = $row['username'];
$page_valide = true;
$title = $lang['title_user_perm'].' "'.$page['user_username'].'"';
}
else
{
$page_valide = false;
}*/
$title = $lang['title_user_perm'];
//.' '.$_POST['username'];
$page_valide = true; break; $page_valide = true; break;
case 'group_list' : case 'group_list' :
$title = $lang['title_groups']; $page_valide = true; break; $title = $lang['title_groups']; $page_valide = true; break;
+2 -2
View File
@@ -30,14 +30,14 @@ if( !defined("PHPWG_ROOT_PATH") )
} }
include_once( PHPWG_ROOT_PATH.'admin/include/isadmin.inc.php' ); include_once( PHPWG_ROOT_PATH.'admin/include/isadmin.inc.php' );
$url_img_monthly_report = PHPWG_ROOT_PATH.'/admin/images/monthly_visits.img.php'; $url_img_global_report = PHPWG_ROOT_PATH.'admin/images/global_stats.img.php';
//----------------------------------------------------- template initialization //----------------------------------------------------- template initialization
$template->set_filenames( array('stats'=>'admin/stats.tpl') ); $template->set_filenames( array('stats'=>'admin/stats.tpl') );
$template->assign_vars(array( $template->assign_vars(array(
'L_STAT_TITLE'=>$lang['stats_last_days'], 'L_STAT_TITLE'=>$lang['stats_last_days'],
'L_STAT_MONTHLY_ALT'=>$lang['stats_pages_seen_graph_title'], 'L_STAT_MONTHLY_ALT'=>$lang['stats_pages_seen_graph_title'],
'IMG_MONTHLY_REPORT'=>add_session_id($url_img_monthly_report) 'IMG_MONTHLY_REPORT'=>add_session_id($url_img_global_report)
)); ));
//---------------------------------------------------------------- log history //---------------------------------------------------------------- log history
+2 -4
View File
@@ -64,11 +64,9 @@ if ( isset( $_POST['submit'] ) )
} }
} }
check_favorites( $_GET['user_id'] ); check_favorites( $_GET['user_id'] );
synchronize_user( $_GET['user_id'] );
} }
$user_id = (!empty($userdata['id']))?$userdata['id']:''; $user_id = (!empty($userdata['id']))?$userdata['id']:'';
$template->set_filenames( array('user'=>'admin/user_perm.tpl') ); $template->set_filenames( array('user'=>'admin/user_perm.tpl') );
$template->assign_vars(array( $template->assign_vars(array(
'L_SELECT_USERNAME'=>$lang['Select_username'], 'L_SELECT_USERNAME'=>$lang['Select_username'],
@@ -76,8 +74,8 @@ $template->assign_vars(array(
'L_FIND_USERNAME'=>$lang['Find_username'], 'L_FIND_USERNAME'=>$lang['Find_username'],
'L_AUTH_USER'=>$lang['permuser_only_private'], 'L_AUTH_USER'=>$lang['permuser_only_private'],
'L_SUBMIT'=>$lang['submit'], 'L_SUBMIT'=>$lang['submit'],
'L_AUTHORIZED'=>$lang['permuser_authorized'], 'L_AUTHORIZED'=>$lang['authorized'],
'L_FORBIDDEN'=>$lang['permuser_forbidden'], 'L_FORBIDDEN'=>$lang['forbidden'],
'L_PARENT_FORBIDDEN'=>$lang['permuser_parent_forbidden'], 'L_PARENT_FORBIDDEN'=>$lang['permuser_parent_forbidden'],
'F_SEARCH_USER_ACTION' => add_session_id(PHPWG_ROOT_PATH.'admin.php?page=user_search'), 'F_SEARCH_USER_ACTION' => add_session_id(PHPWG_ROOT_PATH.'admin.php?page=user_search'),
+4
View File
@@ -26,3 +26,7 @@ for( i=0; i<len; i++)
} }
} }
function phpWGOpenWindow(theURL,winName,features)
{
window.open(theURL,winName,features);
}
+2 -5
View File
@@ -33,7 +33,7 @@ $lang_info['direction'] = 'ltr';
$lang_info['code'] = 'en'; $lang_info['code'] = 'en';
// Main words // Main words
$lang['gallery_index'] = 'Gallery index'; $lang['gallery_index'] = 'Home';
$lang['category'] = 'Category'; $lang['category'] = 'Category';
$lang['categories'] = 'Categories'; $lang['categories'] = 'Categories';
$lang['thumbnail'] = 'Thumbnail'; $lang['thumbnail'] = 'Thumbnail';
@@ -184,7 +184,6 @@ $lang['about_message'] = '<div style="text-align:center;font-weigh:bold;">Inform
<li>Technicaly, PhpWebGallery is fully developped with PHP (the elePHPant) with a MySQL database (the SQuirreL).</li> <li>Technicaly, PhpWebGallery is fully developped with PHP (the elePHPant) with a MySQL database (the SQuirreL).</li>
<li>If you have any suggestions or comments, please visit <a href="http://www.phpwebgallery.net" style="text-decoration:underline">PhpWebGallery</a> official site, and its dedicated <a href="http://forum.phpwebgallery.net" style="text-decoration:underline">forum</a>.</li> <li>If you have any suggestions or comments, please visit <a href="http://www.phpwebgallery.net" style="text-decoration:underline">PhpWebGallery</a> official site, and its dedicated <a href="http://forum.phpwebgallery.net" style="text-decoration:underline">forum</a>.</li>
</ul>'; </ul>';
$lang['about_return'] = 'Back';
$lang['ident_page_title'] = 'Identification'; $lang['ident_page_title'] = 'Identification';
$lang['ident_title'] = 'Identification'; $lang['ident_title'] = 'Identification';
$lang['ident_register'] = 'Register'; $lang['ident_register'] = 'Register';
@@ -193,7 +192,6 @@ $lang['ident_guest_visit'] = 'Go through the gallery as a visitor';
$lang['previous_image'] = 'Previous'; $lang['previous_image'] = 'Previous';
$lang['next_image'] = 'Next'; $lang['next_image'] = 'Next';
$lang['back'] = 'Click on the image to go back to the thumbnails page';
$lang['info_image_title'] = 'Image information'; $lang['info_image_title'] = 'Image information';
$lang['link_info_image'] = 'Modify information'; $lang['link_info_image'] = 'Modify information';
$lang['true_size'] = 'Real size'; $lang['true_size'] = 'Real size';
@@ -293,6 +291,5 @@ $lang['rates'] = 'rates';
$lang['standard_deviation'] = 'STD'; $lang['standard_deviation'] = 'STD';
$lang['random_cat'] = 'random pictures'; $lang['random_cat'] = 'random pictures';
$lang['random_cat_hint'] = 'Displays a set of random pictures'; $lang['random_cat_hint'] = 'Displays a set of random pictures';
$lang['picture_high'] = 'See high quality picture'; $lang['picture_high'] = 'Click on the picture to see it in high definition';
$lang['picture_high_alt'] = 'high';
?> ?>
+2 -2
View File
@@ -33,7 +33,7 @@ $lang_info['direction'] = 'ltr';
$lang_info['code'] = 'fr'; $lang_info['code'] = 'fr';
// Main words // Main words
$lang['gallery_index'] = 'Racine de la galerie'; $lang['gallery_index'] = 'Accueil';
$lang['category'] = 'Catégorie'; $lang['category'] = 'Catégorie';
$lang['categories'] = 'Catégories'; $lang['categories'] = 'Catégories';
$lang['thumbnail'] = 'Miniature'; $lang['thumbnail'] = 'Miniature';
@@ -199,7 +199,6 @@ $lang['ident_guest_visit'] = 'Parcourir la galerie en tant que visiteur';
$lang['previous_image'] = 'Précédent'; $lang['previous_image'] = 'Précédent';
$lang['next_image'] = 'Suivant'; $lang['next_image'] = 'Suivant';
$lang['back'] = 'Cliquez sur l\'image pour revenir à la page des miniatures';
$lang['info_image_title'] = 'Informations'; $lang['info_image_title'] = 'Informations';
$lang['link_info_image'] = 'Modifier les informations de cette image'; $lang['link_info_image'] = 'Modifier les informations de cette image';
$lang['true_size'] = 'Taille réelle'; $lang['true_size'] = 'Taille réelle';
@@ -312,4 +311,5 @@ $lang['never_rated'] = 'Vous n\'avez jamais vot
$lang['no_rate'] = 'Aucun vote'; $lang['no_rate'] = 'Aucun vote';
$lang['rates'] = 'Votes'; $lang['rates'] = 'Votes';
$lang['standard_deviation'] = 'STD'; $lang['standard_deviation'] = 'STD';
$lang['picture_high'] = 'Cliquez sur l\'image pour la voir en haute résolution';
?> ?>
+11 -6
View File
@@ -450,12 +450,11 @@ $template->assign_vars(array(
'WIDTH_IMG' => $picture_size[0], 'WIDTH_IMG' => $picture_size[0],
'HEIGHT_IMG' => $picture_size[1], 'HEIGHT_IMG' => $picture_size[1],
'L_HOME' => $lang['gallery_index'],
'L_SLIDESHOW' => $lang['slideshow'], 'L_SLIDESHOW' => $lang['slideshow'],
'L_TIME' => $lang['period_seconds'],
'L_STOP_SLIDESHOW' => $lang['slideshow_stop'], 'L_STOP_SLIDESHOW' => $lang['slideshow_stop'],
'L_PREV_IMG' =>$lang['previous_image'].' : ', 'L_PREV_IMG' =>$lang['previous_image'].' : ',
'L_ADMIN' =>$lang['link_info_image'], 'L_ADMIN' =>$lang['link_info_image'],
'L_BACK' =>$lang['back'],
'L_COMMENT_TITLE' =>$lang['comments_title'], 'L_COMMENT_TITLE' =>$lang['comments_title'],
'L_ADD_COMMENT' =>$lang['comments_add'], 'L_ADD_COMMENT' =>$lang['comments_add'],
'L_DELETE_COMMENT' =>$lang['comments_del'], 'L_DELETE_COMMENT' =>$lang['comments_del'],
@@ -467,7 +466,6 @@ $template->assign_vars(array(
'L_DOWNLOAD_HINT' => $lang['download_hint'], 'L_DOWNLOAD_HINT' => $lang['download_hint'],
'L_PICTURE_METADATA' => $lang['picture_show_metadata'], 'L_PICTURE_METADATA' => $lang['picture_show_metadata'],
'L_PICTURE_HIGH' => $lang['picture_high'], 'L_PICTURE_HIGH' => $lang['picture_high'],
'L_PICTURE_HIGH_ALT' => $lang['picture_high_alt'],
'U_HOME' => add_session_id($url_home), 'U_HOME' => add_session_id($url_home),
'U_METADATA' => add_session_id($url_metadata), 'U_METADATA' => add_session_id($url_metadata),
@@ -493,9 +491,16 @@ else
// display a high quality link if present // display a high quality link if present
if (isset($picture['current']['high'])) if (isset($picture['current']['high']))
{ {
$template->assign_block_vars( $full_size = @getimagesize($picture['current']['high']);
'high', $full_width = $full_size[0];
array('U_HIGH' => $picture['current']['high'])); $full_height = $full_size[1];
$uuid = uniqid(rand());
$template->assign_block_vars('high', array(
'U_HIGH' => $picture['current']['high'],
'UUID'=>$uuid,
'WIDTH_IMG'=>($full_width + 16),
'HEIGHT_IMG'=>($full_height + 16)
));
} }
//------------------------------------------------------- favorite manipulation //------------------------------------------------------- favorite manipulation
if ( !$user['is_the_guest'] ) if ( !$user['is_the_guest'] )
+2 -2
View File
@@ -8,11 +8,11 @@
</form> </form>
<!-- END search --> <!-- END search -->
<!-- BEGIN permission --> <!-- BEGIN permission -->
<div class="admin">{L_AUTH_USER}</div> <div class="admin">{L_AUTH_USER} {USERNAME}</div>
<form action="{F_AUTH_ACTION}" method="POST"> <form action="{F_AUTH_ACTION}" method="POST">
<ul class="menu"> <ul class="menu">
<!-- BEGIN category --> <!-- BEGIN category -->
<li> <a href="{permission.category.CAT_URL}"><span style="color:{#color}">{permission.category.CAT_NAME}</span></a> <li> <a href="{permission.category.CAT_URL}">{permission.category.CAT_NAME}</a>
<!-- BEGIN parent_forbidden --> <!-- BEGIN parent_forbidden -->
{L_PARENT_FORBIDDEN}&nbsp;-&nbsp; {L_PARENT_FORBIDDEN}&nbsp;-&nbsp;
<!-- END parent_forbidden --> <!-- END parent_forbidden -->
+1 -4
View File
@@ -1,4 +1,4 @@
<div align="center" style="padding:10px;"><img src="template/default/images/logo.jpg" width="360" height="100"></div> <div style="padding:3px;"><img src="template/default/images/logo.jpg"></div>
<table style="width:100%;"> <table style="width:100%;">
<tr> <tr>
<td valign="top" style="padding:10px;width:1%;"> <td valign="top" style="padding:10px;width:1%;">
@@ -76,9 +76,6 @@
title="{thumbnails.line.thumbnail.IMAGE_TITLE}" title="{thumbnails.line.thumbnail.IMAGE_TITLE}"
class="thumbLink" /> class="thumbLink" />
<br /> <br />
<!-- BEGIN bullet -->
<img src="./template/default/theme/collapsed.gif" style="border:none;" alt="&gt;" />
<!-- END bullet -->
<span class="{thumbnails.line.thumbnail.IMAGE_STYLE}">{thumbnails.line.thumbnail.IMAGE_NAME}</span></a> <span class="{thumbnails.line.thumbnail.IMAGE_STYLE}">{thumbnails.line.thumbnail.IMAGE_NAME}</span></a>
{thumbnails.line.thumbnail.IMAGE_TS} {thumbnails.line.thumbnail.IMAGE_TS}
<!-- BEGIN nb_comments --> <!-- BEGIN nb_comments -->
+3 -2
View File
@@ -2,14 +2,14 @@
#gauche,#droite #gauche,#droite
{ {
float:left; float:left;
width:18%; width:30%;
text-align:left; text-align:left;
} }
#centre #centre
{ {
float:left; float:left;
width:64%; width:40%;
text-align:center; text-align:center;
} }
@@ -187,6 +187,7 @@ ul.menu {
{ {
border: 1px solid #000000; border: 1px solid #000000;
background-color:#555555; background-color:#555555;
display:block;
} }
.home .home
+7 -12
View File
@@ -2,7 +2,7 @@
<div class="information">{information.INFORMATION}</div> <div class="information">{information.INFORMATION}</div>
<!-- END information --> <!-- END information -->
<div class="titrePage"> <div class="titrePage">
<div id="gauche">{CATEGORY}</div> <div id="gauche"><a href="{U_HOME}">{L_HOME}</a> > {CATEGORY}</div>
<div id="centre" class="nameImage">{TITLE}</div> <div id="centre" class="nameImage">{TITLE}</div>
<div id="droite">{PHOTO}</div> <div id="droite">{PHOTO}</div>
</div> </div>
@@ -23,13 +23,6 @@
<img src="template/default/theme/metadata.gif" alt="{L_PICTURE_METADATA}" /> <img src="template/default/theme/metadata.gif" alt="{L_PICTURE_METADATA}" />
</a> </a>
</div> </div>
<!-- BEGIN high -->
<div class="imgMenu" id="left">
<a href="{high.U_HIGH}" title="{L_PICTURE_HIGH}">
<img src="template/default/theme/high.gif" alt="{L_PICTURE_HIGH_ALT}" />
</a>
</div>
<!-- END high -->
<!-- BEGIN favorite --> <!-- BEGIN favorite -->
<div class="imgMenu" id="right"> <div class="imgMenu" id="right">
<a href="{favorite.U_FAVORITE}" title="{favorite.FAVORITE_HINT}"> <a href="{favorite.U_FAVORITE}" title="{favorite.FAVORITE_HINT}">
@@ -59,10 +52,14 @@
</div> </div>
<!-- END admin --> <!-- END admin -->
</div> </div>
<!-- BEGIN high -->
<a href="{U_HOME}"> <a href="javascript:phpWGOpenWindow('{high.U_HIGH}','{high.UUID}','scrollbars=yes,toolbar=yes,status=yes,resizable=yes,width={high.WIDTH_IMG},height={high.HEIGHT_IMG}')">
<!-- END high -->
<img class="image" src="{SRC_IMG}" style="width:{WIDTH_IMG}px;height:{HEIGHT_IMG}px;" alt="{ALT_IMG}"/> <img class="image" src="{SRC_IMG}" style="width:{WIDTH_IMG}px;height:{HEIGHT_IMG}px;" alt="{ALT_IMG}"/>
<!-- BEGIN high -->
</a> </a>
<div style="text-align:center;font-weight:bold;">{L_PICTURE_HIGH}</div>
<!-- END high -->
<!-- BEGIN legend --> <!-- BEGIN legend -->
<div class="commentImage">{legend.COMMENT_IMG}</div> <div class="commentImage">{legend.COMMENT_IMG}</div>
<!-- END legend --> <!-- END legend -->
@@ -127,8 +124,6 @@
</div> </div>
<!-- END rate --> <!-- END rate -->
<div style="text-align:center;">{L_BACK}</div>
<table class="tablecompact"> <table class="tablecompact">
<!-- BEGIN comments --> <!-- BEGIN comments -->
<tr align="center" valign="middle"> <tr align="center" valign="middle">