aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2010-05-25 22:29:31 +0000
committerplegall <plg@piwigo.org>2010-05-25 22:29:31 +0000
commit5488e86ada315f6f646796a0efa043e6744098b0 (patch)
tree8f97335fbb2751f26bd7eb1464d4b5a9f1cad045
parent4dd9061a17d265c653087c50303915ca3c2ea9b5 (diff)
feature 1697: ability to deactivate the synchronization method to add photos.
git-svn-id: http://piwigo.org/svn/branches/2.1@6361 68402e56-0260-453c-a942-63ccdbb3a9ee
-rw-r--r--admin.php1
-rw-r--r--admin/cat_options.php5
-rw-r--r--admin/configuration.php5
-rw-r--r--admin/help.php48
-rw-r--r--admin/photos_add.php15
-rw-r--r--admin/themes/default/template/admin.tpl6
-rw-r--r--admin/themes/default/template/element_set_global.tpl2
-rw-r--r--admin/themes/default/template/footer.tpl10
-rw-r--r--admin/themes/default/template/intro.tpl3
-rw-r--r--include/config_default.inc.php3
-rw-r--r--language/cs_CZ/help/help_add_photos.html2
-rw-r--r--language/de_DE/help/help_add_photos.html2
-rw-r--r--language/en_UK/help/help_add_photos.html2
-rw-r--r--language/es_ES/help/help_add_photos.html2
-rw-r--r--language/fr_FR/help/help_add_photos.html2
-rw-r--r--language/hr_HR/help/help_add_photos.html2
-rw-r--r--language/hu_HU/help/help_add_photos.html2
-rw-r--r--language/it_IT/help/help_add_photos.html2
-rw-r--r--language/ja_JP/help/help_add_photos.html2
-rw-r--r--language/nl_NL/help/help_add_photos.html4
-rw-r--r--language/pl_PL/help/help_add_photos.html2
-rw-r--r--language/ru_RU/help/help_add_photos.html4
-rw-r--r--language/sr_RS/help/help_add_photos.html4
-rw-r--r--language/zh_CN/help/help_add_photos.html4
24 files changed, 100 insertions, 34 deletions
diff --git a/admin.php b/admin.php
index c80fa508c..25eca3f6e 100644
--- a/admin.php
+++ b/admin.php
@@ -102,6 +102,7 @@ $template->set_filenames(array('admin' => 'admin.tpl'));
$template->assign(
array(
'USERNAME' => $user['username'],
+ 'ENABLE_SYNCHRONIZATION' => $conf['enable_synchronization'],
'U_SITE_MANAGER'=> $link_start.'site_manager',
'U_HISTORY_STAT'=> $link_start.'stats',
'U_FAQ'=> $link_start.'help',
diff --git a/admin/cat_options.php b/admin/cat_options.php
index 2daa2a539..b36083c49 100644
--- a/admin/cat_options.php
+++ b/admin/cat_options.php
@@ -162,7 +162,10 @@ $tabsheet = new tabsheet();
$opt_link = $link_start.'cat_options&amp;section=';
$tabsheet->add('status', l10n('Public / Private'), $opt_link.'status');
$tabsheet->add('visible', l10n('Lock'), $opt_link.'visible');
-$tabsheet->add('upload', l10n('Upload'), $opt_link.'upload');
+if ($conf['enable_synchronization'])
+{
+ $tabsheet->add('upload', l10n('Upload'), $opt_link.'upload');
+}
$tabsheet->add('comments', l10n('Comments'), $opt_link.'comments');
if ($conf['allow_random_representative'])
{
diff --git a/admin/configuration.php b/admin/configuration.php
index 2b293a3ab..83a44004e 100644
--- a/admin/configuration.php
+++ b/admin/configuration.php
@@ -221,7 +221,10 @@ $tabsheet->add('main', l10n('Main'), $conf_link.'main');
$tabsheet->add('display', l10n('Display'), $conf_link.'display');
$tabsheet->add('history', l10n('History'), $conf_link.'history');
$tabsheet->add('comments', l10n('Comments'), $conf_link.'comments');
-$tabsheet->add('upload', l10n('Upload'), $conf_link.'upload');
+if ($conf['enable_synchronization'])
+{
+ $tabsheet->add('upload', l10n('Upload'), $conf_link.'upload');
+}
$tabsheet->add('default', l10n('Guest Settings'), $conf_link.'default');
// TabSheet selection
$tabsheet->select($page['section']);
diff --git a/admin/help.php b/admin/help.php
index 6547c998e..e2eafd1e8 100644
--- a/admin/help.php
+++ b/admin/help.php
@@ -33,31 +33,33 @@ $link = get_root_url().'admin.php?page=help&section=';
$selected = null;
$help_section_title = null;
-$tabs = array(
- array(
- 'code' => 'add_photos',
- 'label' => l10n('Add Photos'),
- ),
- array(
- 'code' => 'permissions',
- 'label' => l10n('Permissions'),
- ),
- array(
- 'code' => 'groups',
- 'label' => l10n('Groups'),
- ),
- array(
+$tabs = array();
+$tabs[] = array(
+ 'code' => 'add_photos',
+ 'label' => l10n('Add Photos'),
+ );
+$tabs[] = array(
+ 'code' => 'permissions',
+ 'label' => l10n('Permissions'),
+ );
+$tabs[] = array(
+ 'code' => 'groups',
+ 'label' => l10n('Groups'),
+ );
+if ($conf['enable_synchronization'])
+{
+ $tabs[] = array(
'code' => 'user_upload',
'label' => l10n('User Upload'),
- ),
- array(
- 'code' => 'virtual_links',
- 'label' => l10n('Virtual Links'),
- ),
- array(
- 'code' => 'misc',
- 'label' => l10n('Miscellaneous'),
- ),
+ );
+}
+$tabs[] = array(
+ 'code' => 'virtual_links',
+ 'label' => l10n('Virtual Links'),
+ );
+$tabs[] = array(
+ 'code' => 'misc',
+ 'label' => l10n('Miscellaneous'),
);
if (!isset($_GET['section']))
diff --git a/admin/photos_add.php b/admin/photos_add.php
index af3b84211..54db3113c 100644
--- a/admin/photos_add.php
+++ b/admin/photos_add.php
@@ -152,12 +152,19 @@ $tabs = array(
'code' => 'ploader',
'label' => l10n('Piwigo Uploader'),
),
- array(
- 'code' => 'ftp',
- 'label' => l10n('FTP + Synchronization'),
- ),
);
+if ($conf['enable_synchronization'])
+{
+ array_push(
+ $tabs,
+ array(
+ 'code' => 'ftp',
+ 'label' => l10n('FTP + Synchronization'),
+ )
+ );
+}
+
$tab_codes = array_map(
create_function('$a', 'return $a["code"];'),
$tabs
diff --git a/admin/themes/default/template/admin.tpl b/admin/themes/default/template/admin.tpl
index ac4480de1..f95173a02 100644
--- a/admin/themes/default/template/admin.tpl
+++ b/admin/themes/default/template/admin.tpl
@@ -19,7 +19,9 @@ jQuery().ready(function(){ldelim}
<dd>
<ul>
<li><a href="{$U_ADD_PHOTOS}">{'Add'|@translate}</a></li>
+{if $ENABLE_SYNCHRONIZATION}
<li><a href="{$U_WAITING}">{'Waiting'|@translate}</a></li>
+{/if}
<li><a href="{$U_RATING}">{'Rating'|@translate}</a></li>
<li><a href="{$U_TAGS}">{'Tags'|@translate}</a></li>
<li><a href="{$U_CADDIE}">{'Caddie'|@translate}</a></li>
@@ -68,10 +70,14 @@ jQuery().ready(function(){ldelim}
<dt class="rdion"><span>{'Tools'|@translate}&nbsp;</span></dt>
<dd>
<ul>
+{if $ENABLE_SYNCHRONIZATION}
<li><a href="{$U_CAT_UPDATE}">{'Synchronize'|@translate}</a></li>
<li><a href="{$U_SITE_MANAGER}">{'Site manager'|@translate}</a></li>
+{/if}
<li><a href="{$U_HISTORY_STAT}">{'History'|@translate}</a></li>
+{if $ENABLE_SYNCHRONIZATION}
<li><a href="{$U_THUMBNAILS}">{'Thumbnails'|@translate}</a></li>
+{/if}
<li><a href="{$U_MAINTENANCE}">{'Maintenance'|@translate}</a></li>
<li><a href="{$U_PENDING_COMMENTS}">{'Pending Comments'|@translate}</a></li>
</ul>
diff --git a/admin/themes/default/template/element_set_global.tpl b/admin/themes/default/template/element_set_global.tpl
index 3a5e738e0..288ceff9b 100644
--- a/admin/themes/default/template/element_set_global.tpl
+++ b/admin/themes/default/template/element_set_global.tpl
@@ -85,7 +85,9 @@
{if isset($show_delete_form) }
<fieldset>
<legend>{'Deletions'|@translate}</legend>
+{if $ENABLE_SYNCHRONIZATION}
<p style="font-style:italic">{'Note: photo deletion does not apply to photos added by synchronization. For photos added by synchronization, remove them from the filesystem and then perform another synchronization.'|@translate}</p>
+{/if}
<p>
{'target'|@translate}
<label><input type="radio" name="target_deletion" value="all"> {'all'|@translate}</label>
diff --git a/admin/themes/default/template/footer.tpl b/admin/themes/default/template/footer.tpl
index f287bab0e..16491a724 100644
--- a/admin/themes/default/template/footer.tpl
+++ b/admin/themes/default/template/footer.tpl
@@ -61,5 +61,15 @@
</script>
{/literal}
+{if not $ENABLE_SYNCHRONIZATION}
+{literal}
+<script type='text/javascript'>
+ $(document).ready(function() {
+ $("#helpSynchro").hide();
+ });
+</script>
+{/literal}
+{/if}
+
</body>
</html> \ No newline at end of file
diff --git a/admin/themes/default/template/intro.tpl b/admin/themes/default/template/intro.tpl
index efebaebdb..0762c011f 100644
--- a/admin/themes/default/template/intro.tpl
+++ b/admin/themes/default/template/intro.tpl
@@ -59,7 +59,7 @@ jQuery().ready(function(){ldelim}
</dd>
</dl>
-
+{if $ENABLE_SYNCHRONIZATION}
<form name="QuickSynchro" action="{$U_CAT_UPDATE}" method="post" id="QuickSynchro" style="display: block; text-align:right;">
<div>
<input type="hidden" name="sync" value="files" checked="checked">
@@ -75,3 +75,4 @@ jQuery().ready(function(){ldelim}
<input type="submit" value="" name="submit">
</div>
</form>
+{/if} \ No newline at end of file
diff --git a/include/config_default.inc.php b/include/config_default.inc.php
index b833f0bb5..360bac36a 100644
--- a/include/config_default.inc.php
+++ b/include/config_default.inc.php
@@ -780,4 +780,7 @@ $conf['ploader_download_mac'] = 'http://piwigo.org/ext/download.php?eid=353';
// pLoader direct download url for linux
$conf['ploader_download_linux'] = 'http://piwigo.org/ext/download.php?eid=269';
+
+// enable the synchronization method for adding photos
+$conf['enable_synchronization'] = true;
?>
diff --git a/language/cs_CZ/help/help_add_photos.html b/language/cs_CZ/help/help_add_photos.html
index 95baf4d6e..9f489d7f2 100644
--- a/language/cs_CZ/help/help_add_photos.html
+++ b/language/cs_CZ/help/help_add_photos.html
@@ -13,8 +13,10 @@
<p class="nextStepLink"><a href="admin.php?page=photos_add&section=ploader">Přejděte na pLoader</a></p>
+<div id="helpSynchro">
<ul>
<li><strong>FTP přenos</strong> je nejvíce doporučená cesta, jak nahrát velké množství fotografií s minimálním úsilím. Následujte návod, jak připravit Vaše fotografie. Tato metoda Vám dává možnost přesně řídit uspořádání Vašich fotografií na Vašem serveru.</li>
</ul>
<p class="nextStepLink"><a href="admin.php?page=photos_add&section=ftp">Přejděte na FTP přenos</a></p>
+</div> \ No newline at end of file
diff --git a/language/de_DE/help/help_add_photos.html b/language/de_DE/help/help_add_photos.html
index c3b655269..c35d7c0c5 100644
--- a/language/de_DE/help/help_add_photos.html
+++ b/language/de_DE/help/help_add_photos.html
@@ -15,6 +15,7 @@
<p class="nextStepLink"><a href="admin.php?page=photos_add&section=ploader">Zum Piwigo Uploader</a></p>
+<div id="helpSynchro">
<ul>
<li><strong>FTP Upload</strong> ist die empfohlene Methode, um große Mengen
von Fotos mit wenigen Mausklicks zu übertragen. Befolgen Sie die Anweisungen
@@ -24,3 +25,4 @@
</ul>
<p class="nextStepLink"><a href="admin.php?page=photos_add&section=ftp">Zum FTP Upload</a></p>
+</div> \ No newline at end of file
diff --git a/language/en_UK/help/help_add_photos.html b/language/en_UK/help/help_add_photos.html
index d36f63781..8a8841141 100644
--- a/language/en_UK/help/help_add_photos.html
+++ b/language/en_UK/help/help_add_photos.html
@@ -15,6 +15,7 @@
<p class="nextStepLink"><a href="admin.php?page=photos_add&section=ploader">Go to pLoader</a></p>
+<div id="helpSynchro">
<ul>
<li><strong>FTP transfer</strong> is the most recommended way to add a
very large collection of photos with a minimum number of clicks. Follow
@@ -23,3 +24,4 @@
</ul>
<p class="nextStepLink"><a href="admin.php?page=photos_add&section=ftp">Go to FTP</a></p>
+</div> \ No newline at end of file
diff --git a/language/es_ES/help/help_add_photos.html b/language/es_ES/help/help_add_photos.html
index 93defc405..95f6d827f 100644
--- a/language/es_ES/help/help_add_photos.html
+++ b/language/es_ES/help/help_add_photos.html
@@ -17,9 +17,11 @@
<p class="nextStepLink"><a href="admin.php?page=photos_add&section=ploader">Utilizar pLoader</a></p>
+<div id="helpSynchro">
<ul>
<li><strong>El FTP</strong> es el método ideal para añadir una colección importante en un mínimo de operaciones.
Siga al guía para preparar sus fotos. Este método le permite controlar con precision la organización física de su fotos sobre su servidor.</li>
</ul>
<p class="nextStepLink"><a href="admin.php?page=photos_add&section=ftp">Utilizar FTP</a></p>
+</div> \ No newline at end of file
diff --git a/language/fr_FR/help/help_add_photos.html b/language/fr_FR/help/help_add_photos.html
index dc2094561..99fcc34e2 100644
--- a/language/fr_FR/help/help_add_photos.html
+++ b/language/fr_FR/help/help_add_photos.html
@@ -20,6 +20,7 @@ galerie :</p>
<p class="nextStepLink"><a href="admin.php?page=photos_add&section=ploader">Utiliser pLoader</a></p>
+<div id="helpSynchro">
<ul>
<li><strong>Le transfert FTP</strong>
est la méthode idéale pour ajouter une collection importante en un minimum
@@ -29,3 +30,4 @@ galerie :</p>
</ul>
<p class="nextStepLink"><a href="admin.php?page=photos_add&section=ftp">Utiliser FTP</a></p>
+</div> \ No newline at end of file
diff --git a/language/hr_HR/help/help_add_photos.html b/language/hr_HR/help/help_add_photos.html
index f6c480e52..956cd3c2a 100644
--- a/language/hr_HR/help/help_add_photos.html
+++ b/language/hr_HR/help/help_add_photos.html
@@ -15,6 +15,7 @@ the other methods are just waiting for you!</li>
<p class="nextStepLink"><a href="admin.php?page=photos_add&section=ploader">Go to pLoader</a></p>
+<div id="helpSynchro">
<ul>
<li><strong>FTP transfer</strong> is the most recommended way to add a
very large collection of photos with a minimum number of clicks. Follow
@@ -23,3 +24,4 @@ the physical organization of your photos on your server.</li>
</ul>
<p class="nextStepLink"><a href="admin.php?page=photos_add&section=ftp">Go to FTP</a></p>
+</div> \ No newline at end of file
diff --git a/language/hu_HU/help/help_add_photos.html b/language/hu_HU/help/help_add_photos.html
index 1e1af8a3e..a60953dc9 100644
--- a/language/hu_HU/help/help_add_photos.html
+++ b/language/hu_HU/help/help_add_photos.html
@@ -12,8 +12,10 @@
<p class="nextStepLink"><a href="admin.php?page=photos_add&section=ploader">Tovább a pLoader beszerzéséhez</a></p>
+<div id="helpSynchro">
<ul>
<li>Nagy mennyiségű képek minimális munkával történő hozzáadásának legegyszerűbb módja a <strong>Feltöltés FTP-n keresztül</strong>. Feltöltés előtt el kell végezni a képek előkészítését. Az FTP módszer használata esetén a képek helyének előkészítését kézzel kell elvégezni a tárhelyen lévő könyvtárstruktúra kialakításával.</li>
</ul>
<p class="nextStepLink"><a href="admin.php?page=photos_add&section=ftp">Tovább az FTP feltöltést bemutató oldalra</a></p>
+</div> \ No newline at end of file
diff --git a/language/it_IT/help/help_add_photos.html b/language/it_IT/help/help_add_photos.html
index 7943659ce..3976d6ac8 100644
--- a/language/it_IT/help/help_add_photos.html
+++ b/language/it_IT/help/help_add_photos.html
@@ -20,6 +20,7 @@ galleria :</p>
<p class="nextStepLink"><a href="admin.php?page=photos_add&section=ploader">Utilizzare pLoader</a></p>
+<div id="helpSynchro">
<ul>
<li><strong>FTP</strong>
è il modo ideale per aggiungere una collezione importante d'immagini in un minimo
@@ -28,3 +29,4 @@ galleria :</p>
</ul>
<p class="nextStepLink"><a href="admin.php?page=photos_add&section=ftp">Utilizzare FTP</a></p>
+</div> \ No newline at end of file
diff --git a/language/ja_JP/help/help_add_photos.html b/language/ja_JP/help/help_add_photos.html
index 368835085..490a822cc 100644
--- a/language/ja_JP/help/help_add_photos.html
+++ b/language/ja_JP/help/help_add_photos.html
@@ -12,8 +12,10 @@
<p class="nextStepLink"><a href="admin.php?page=photos_add&section=ploader">pLoaderへ</a></p>
+<div id="helpSynchro">
<ul>
<li>多数の写真をアップロードする場合、<strong>FTP</strong> は推薦しています。写真をアップロードするために、ガイドをお読みください。FTPの方法はサーバー上に写真の場所を正確に指定することができます。</li>
</ul>
<p class="nextStepLink"><a href="admin.php?page=photos_add&section=ftp">FTPへ</a></p>
+</div> \ No newline at end of file
diff --git a/language/nl_NL/help/help_add_photos.html b/language/nl_NL/help/help_add_photos.html
index f2eddd359..e2c42debc 100644
--- a/language/nl_NL/help/help_add_photos.html
+++ b/language/nl_NL/help/help_add_photos.html
@@ -14,8 +14,10 @@
<p class="nextStepLink"><a href="admin.php?page=photos_add&section=ploader">Ga naar pLoader</a></p>
+<div id="helpSynchro">
<ul>
<li><strong>FTP overdracht</strong> is de meest geschikte nainier om een grote hoeveelheid fotos toe te voegen met zo min mogelijk handelingen. Volg de aanwijzingen om je fotos voor te bereiden. De FTP manier is laat je precies de indeling van je fotos op de server bepalen.</li>
</ul>
-<p class="nextStepLink"><a href="admin.php?page=photos_add&section=ftp">Ga naar FTP</a></p> \ No newline at end of file
+<p class="nextStepLink"><a href="admin.php?page=photos_add&section=ftp">Ga naar FTP</a></p>
+</div> \ No newline at end of file
diff --git a/language/pl_PL/help/help_add_photos.html b/language/pl_PL/help/help_add_photos.html
index 4c4e9ca9e..e64ce1bc7 100644
--- a/language/pl_PL/help/help_add_photos.html
+++ b/language/pl_PL/help/help_add_photos.html
@@ -12,8 +12,10 @@
<p class="nextStepLink"><a href="admin.php?page=photos_add&section=ploader">PrzejdŸ do pLoader</a></p>
+<div id="helpSynchro">
<ul>
<li><strong>Transfer FTP</strong> jest najbardziej rekomendowanym sposobem dodawania bardzo du¿ej iloœci zdjêæ przy pomocy niewielu klikniêæ. Skorzystaj z przewodnika aby przygotowaæ swoje zdjêcia. Metoda FTP umo¿liwia Ci bardzo dok³adn¹ kontrolê nad umiejscowieniem plików zdjêæ na serwerze.</li>
</ul>
<p class="nextStepLink"><a href="admin.php?page=photos_add&section=ftp">PrzejdŸ do FTP</a></p>
+</div> \ No newline at end of file
diff --git a/language/ru_RU/help/help_add_photos.html b/language/ru_RU/help/help_add_photos.html
index 62810be7c..9420c29a0 100644
--- a/language/ru_RU/help/help_add_photos.html
+++ b/language/ru_RU/help/help_add_photos.html
@@ -13,8 +13,10 @@
<p class="nextStepLink"><a href="admin.php?page=photos_add&section=ploader">Перейти к pLoader</a></p>
+<div id="helpSynchro">
<ul>
<li><strong>Загрузка по FTP</strong> – наиболее рекомендуемый способ загрузки очень большой коллекции фотографии при минимальном количестве кликов. Подготовьте фотографии, воспользовавшись инструкцией. Загрузка по FTP позволит вам организовать фотографии на сервере именно так, как нужно.</li>
</ul>
-<p class="nextStepLink"><a href="admin.php?page=photos_add&section=ftp">Загрузка по FTP</a></p> \ No newline at end of file
+<p class="nextStepLink"><a href="admin.php?page=photos_add&section=ftp">Загрузка по FTP</a></p>
+</div> \ No newline at end of file
diff --git a/language/sr_RS/help/help_add_photos.html b/language/sr_RS/help/help_add_photos.html
index d028f4a61..c8f43123a 100644
--- a/language/sr_RS/help/help_add_photos.html
+++ b/language/sr_RS/help/help_add_photos.html
@@ -14,10 +14,12 @@
<p class="nextStepLink"><a href="admin.php?page=photos_add&section=ploader">Idi na pLoader</a></p>
+<div id="helpSynchro">
<ul>
<li><strong>FTP prenos</strong>je najčešće preporučen način da dodate
jako veliku kolekciju fotografija sa najmanjim brojem klikova. Sledite uputstvo da biste pripremili Vaše fotografije. FTP metoda Vam omogućava kontrolu
organizacije Vaših fotografija na severu.</li>
</ul>
-<p class="nextStepLink"><a href="admin.php?page=photos_add&section=ftp">Idi na FTP</a></p> \ No newline at end of file
+<p class="nextStepLink"><a href="admin.php?page=photos_add&section=ftp">Idi na FTP</a></p>
+</div> \ No newline at end of file
diff --git a/language/zh_CN/help/help_add_photos.html b/language/zh_CN/help/help_add_photos.html
index 2f3436ede..2b9a97405 100644
--- a/language/zh_CN/help/help_add_photos.html
+++ b/language/zh_CN/help/help_add_photos.html
@@ -12,8 +12,10 @@
<p class="nextStepLink"><a href="admin.php?page=photos_add&section=ploader">使用 pLoader</a></p>
+<div id="helpSynchro">
<ul>
<li><strong>FTP 上传</strong> 是非常推荐的方法,其可以一次性上传大批量的相片。以下向导将教您如何准备您的相片。使用 FTP 方式,您可以很精确地控制您服务器上的相片目录的物理结构。</li>
</ul>
-<p class="nextStepLink"><a href="admin.php?page=photos_add&section=ftp">使用 FTP</a></p> \ No newline at end of file
+<p class="nextStepLink"><a href="admin.php?page=photos_add&section=ftp">使用 FTP</a></p>
+</div> \ No newline at end of file