Index: /trunk/include/common.inc.php
===================================================================
--- /trunk/include/common.inc.php	(revision 5137)
+++ /trunk/include/common.inc.php	(revision 5138)
@@ -166,4 +166,39 @@
 }
 
+// The "No Photo Yet" feature: if you have no photo yet in your gallery, the
+// gallery displays only a big box to show you the way for adding your first
+// photos
+if (
+  !isset($conf['no_photo_yet'])             // the message disappears at first photo
+  and !(defined('IN_ADMIN') and IN_ADMIN)   // no message inside administration
+  and script_basename() != 'identification' // keep the ability to login
+  )
+{
+  $query = '
+SELECT
+    COUNT(*)
+  FROM '.IMAGES_TABLE.'
+;';
+  list($nb_photos) = pwg_db_fetch_row(pwg_query($query));
+  if (0 == $nb_photos)
+  {
+    $template->set_filenames(array('no_photo_yet'=>'no_photo_yet.tpl'));
+
+    $url = $conf['no_photo_yet_url'];
+    if (substr($url, 0, 4) != 'http')
+    {
+      $url = get_root_url().$url;
+    }
+    
+    $template->assign(array('next_step_url' => $url));
+    $template->pparse('no_photo_yet');
+    exit();
+  }
+  else
+  {
+    conf_update_param('no_photo_yet', 'false');
+  }
+}
+
 if (isset($user['internal_status']['guest_must_be_guest'])
     and
Index: /trunk/include/config_default.inc.php
===================================================================
--- /trunk/include/config_default.inc.php	(revision 5137)
+++ /trunk/include/config_default.inc.php	(revision 5138)
@@ -766,3 +766,6 @@
 // where should the API add photos?
 $conf['upload_dir'] = PHPWG_ROOT_PATH.'upload';
+
+// where should the user be guided when there is no photo in his gallery yet?
+$conf['no_photo_yet_url'] = 'admin.php?page=photos_add';
 ?>
Index: /trunk/include/functions.inc.php
===================================================================
--- /trunk/include/functions.inc.php	(revision 5137)
+++ /trunk/include/functions.inc.php	(revision 5138)
@@ -1061,4 +1061,22 @@
 }
 
+function conf_update_param($param, $value)
+{
+  $query = '
+DELETE
+  FROM '.CONFIG_TABLE.'
+  WHERE param = "'.$param.'"
+;';
+  pwg_query($query);
+
+  $query = '
+INSERT
+  INTO '.CONFIG_TABLE.'
+  SET param = "'.$param.'"
+    , value = "'.$value.'"
+;';
+  pwg_query($query);
+}
+
 /**
  * Prepends and appends a string at each value of the given array.
Index: /trunk/themes/default/template/no_photo_yet.tpl
===================================================================
--- /trunk/themes/default/template/no_photo_yet.tpl	(revision 5138)
+++ /trunk/themes/default/template/no_photo_yet.tpl	(revision 5138)
@@ -0,0 +1,64 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>Piwigo, {'Welcome'|@translate}</title>
+{literal}
+<style type="text/css">
+body {
+margin: 0;
+padding: 0;
+background-color:#111;
+}
+
+#global {
+position:absolute;
+left: 50%;
+top: 50%;
+width: 700px;
+height: 400px;
+margin-top: -200px; /* height half */
+margin-left: -350px; /* width half */
+
+background-color: #eee;
+background: #222222;
+border:2px solid #FF3363;
+}
+
+#noPhotoWelcome {font-size:25px; color:#888;text-align:center; letter-spacing:1px; margin-top:30px;}
+.bigButton {}
+
+.bigButton {text-align:center; margin-top:130px;}
+
+.bigButton a {
+    background-color:#333;
+    padding:10px;
+    text-decoration:none;
+    margin:0px 5px 0px 5px;
+    -moz-border-radius:6px;
+    -webkit-border-radius:6px;
+    color:#ff7700;
+    font-size:25px;
+    letter-spacing:2px;
+    padding:20px;
+}
+
+.bigButton a:hover {
+    background-color:#444;
+    outline:none;
+    color:#ff3333;
+}
+</style>
+{/literal}
+
+</head>
+
+<body>
+<div id="global">
+<p id="noPhotoWelcome">{'Welcome to your Piwigo photo gallery!'|@translate}</p>
+<div class="bigButton"><a href="{$next_step_url}">{'Add Photos'|@translate}</a></div>
+</div>
+</body>
+
+</html>
+
