Index: /extensions/physical2virtual/admin.php
===================================================================
--- /extensions/physical2virtual/admin.php	(revision 27228)
+++ /extensions/physical2virtual/admin.php	(revision 27229)
@@ -11,4 +11,6 @@
     'private_physical' => isset($_POST['private_physical']), 
     'store_structure' => isset($_POST['store_structure']), 
+    'unlock_virtual' => isset($_POST['unlock_virtual']), 
+    'inherit' => isset($_POST['inherit']), 
     );
   if (isset($_POST['parent_cat']) and $_POST['parent_cat'] > 0)
Index: /extensions/physical2virtual/language/en_UK/plugin.lang.php
===================================================================
--- /extensions/physical2virtual/language/en_UK/plugin.lang.php	(revision 27228)
+++ /extensions/physical2virtual/language/en_UK/plugin.lang.php	(revision 27229)
@@ -7,4 +7,6 @@
 $lang['Convertion done'] = 'Convertion done';
 $lang['Store folder structure'] = 'Store folder structure';
+$lang['Unlock new virtual albums when possible'] = 'Unlock new virtual albums when possible';
+$lang['New virtual albums inherit the group/user permissions from its parent'] = 'New virtual albums inherit the group/user permissions from its parent';
 
 ?>
Index: /extensions/physical2virtual/language/ru_RU/plugin.lang.php
===================================================================
--- /extensions/physical2virtual/language/ru_RU/plugin.lang.php	(revision 27228)
+++ /extensions/physical2virtual/language/ru_RU/plugin.lang.php	(revision 27229)
@@ -6,4 +6,6 @@
 $lang['Convert now'] = 'Конвертировать сейчас';
 $lang['Store folder structure'] = 'Сохранять структуру папок';
+$lang['Unlock new virtual albums when possible'] = 'Разблокировать новые виртуальные альбомы когда возможно';
+$lang['New virtual albums inherit the group/user permissions from its parent'] = 'Новые виртуальные альбомы наследуют групповые/пользовательские права родителя';
 
 ?>
Index: /extensions/physical2virtual/main.inc.php
===================================================================
--- /extensions/physical2virtual/main.inc.php	(revision 27228)
+++ /extensions/physical2virtual/main.inc.php	(revision 27229)
@@ -2,5 +2,5 @@
 /*
 Plugin Name: physical2virtual
-Version: 2.6.c
+Version: 2.6.d
 Description: Autoconvert physical albums to virtual
 Plugin URI: http://piwigo.org/ext/extension_view.php?eid=730
@@ -56,4 +56,9 @@
 {
   global $conf;
+  
+  $options=array();
+  if (isset($conf['physical2virtual']['unlock_virtual']) and $conf['physical2virtual']['unlock_virtual'])
+    $options['visible'] = true;
+  $options['inherit'] = $conf['physical2virtual']['inherit'];
 
   $query = '
@@ -78,10 +83,10 @@
       foreach ($uppers as $upper)
       {
-        $parent = find_or_create_virtual_category($upper['name'], $parent)['id'];
+        $parent = find_or_create_virtual_category($upper['name'], $parent, $options)['id'];
       }
     }
 
-    $virt_cat = find_or_create_virtual_category($virt_name, $parent);
-//    $virt_cat = create_virtual_category($virt_name, $parent)['id']; // use this for duplicate folders name
+    $virt_cat = find_or_create_virtual_category($virt_name, $parent, $options);
+//    $virt_cat = create_virtual_category($virt_name, $parent, $options); // use this for duplicate folders name
 
     if (isset($conf['physical2virtual']['lock_physical']) and $conf['physical2virtual']['lock_physical'])
Index: /extensions/physical2virtual/maintain.inc.php
===================================================================
--- /extensions/physical2virtual/maintain.inc.php	(revision 27228)
+++ /extensions/physical2virtual/maintain.inc.php	(revision 27229)
@@ -15,4 +15,6 @@
     'lock_physical' => false,
     'private_physical' => false,
+    'unlock_virtual' => false,
+    'inherit' => false,
     'update_on_manual' => true,
     'update_on_upload' => false,
Index: /extensions/physical2virtual/template/admin.tpl
===================================================================
--- /extensions/physical2virtual/template/admin.tpl	(revision 27228)
+++ /extensions/physical2virtual/template/admin.tpl	(revision 27229)
@@ -30,4 +30,16 @@
   </li>
   <li>
+    <input type="checkbox" id="unlock_virtual" name="unlock_virtual"{if $physical2virtual.unlock_virtual} checked="checked"{/if}>
+    <label for="unlock_virtual">
+      <b>{'Unlock new virtual albums when possible'|@translate}</b>
+    </label>
+  </li>
+  <li>
+    <input type="checkbox" id="inherit" name="inherit"{if $physical2virtual.inherit} checked="checked"{/if}>
+    <label for="inherit">
+      <b>{'New virtual albums inherit the group/user permissions from its parent'|@translate}</b>
+    </label>
+  </li>
+  <li>
     <input type="checkbox" id="store_structure" name="store_structure"{if $physical2virtual.store_structure} checked="checked"{/if}>
     <label for="store_structure">
