Index: /extensions/adult_content/class.inc.php
===================================================================
--- /extensions/adult_content/class.inc.php	(revision 6920)
+++ /extensions/adult_content/class.inc.php	(revision 6921)
@@ -55,21 +55,27 @@
   {
     global $user, $template;
-
-    $dir = $this->plugin_path.'template/';
-    $theme_file = $dir.$user['template'].'/'.$user['theme'].'/'.$file;
-    $template_file = $dir.$user['template'].'/'.$file;
-
-    if (file_exists($theme_file))
-    {
-      return $theme_file;
-    }
-    elseif (file_exists($template_file))
-    {
-      return $template_file;
-    }
-    else
-    {
-      return $dir.'yoga/'.$file;
-    }
+	$r_theme_file=array();
+	$dir = $this->plugin_path.'template/';
+	$r_theme_file=($template->smarty->template_dir);
+		foreach( $r_theme_file as $style)
+		{
+			$theme_file = explode("/", $style);
+			$pos = count($theme_file) - 2 ;
+			$theme_file = $dir.$theme_file[$pos].'/'.$file;
+			if (file_exists($theme_file))
+			{
+				return $theme_file;
+			}
+			else
+			{
+				$theme_file=NULL;
+		}
+		
+		
+	}
+	if (empty($theme_file))
+	{
+      return $dir.'default/'.$file;
+	}
   }
 
Index: /extensions/adult_content/main.inc.php
===================================================================
--- /extensions/adult_content/main.inc.php	(revision 6920)
+++ /extensions/adult_content/main.inc.php	(revision 6921)
@@ -2,5 +2,5 @@
 /*
 Plugin Name: adult_content
-Version: 2.0.1
+Version: 2.1.0
 Description: manage adult content / Gerer du contenu adulte
 Plugin URI: http://phpwebgallery.net/ext/extension_view.php?eid=141
Index: /extensions/adult_content/template/flop_mauve/block.tpl
===================================================================
--- /extensions/adult_content/template/flop_mauve/block.tpl	(revision 6921)
+++ /extensions/adult_content/template/flop_mauve/block.tpl	(revision 6921)
@@ -0,0 +1,33 @@
+{html_head}<link rel="stylesheet" type="text/css" href="{$ROOT_URL}plugins/{$PLUGIN_NAME}/include/charte.css">{/html_head}
+<div class="content" id="ac_content">
+<div class="titrePage">
+  <h2>Adult content</h2>
+</div>
+<div id="autre_content">
+{'ac_text_charte'|@translate}
+
+
+<fieldset>
+<form method="post" action="{$ROOT_URL}identification.php" >
+    <input type="hidden" name="username" size="15" value="18"/>
+    <input type="hidden" name="password" size="15" value="adult_content"/>
+    <input class="submit" type="submit" name="login" value="{'ac_button_activ_18'|@translate}"/>
+    {'ac_text_activ_18'|@translate}
+
+</form>
+</fieldset>
+<fieldset>
+<form method="post" action="{$ROOT_URL}identification.php" id="quickconnect">
+    <input type="hidden" name="username" size="15" value="16"/>
+    <input type="hidden" name="password" size="15" value="adult_content"/>
+    <input class="submit" type="submit" name="login" value="{'ac_button_activ_16'|@translate}"/>
+         {'ac_text_activ_16'|@translate}         
+</form>
+</fieldset>
+<fieldset>
+        <div align="center">
+          <input type="button" name="Annuler" value="{'ac_retour'|@translate}" OnClick="history.back()"/>
+        </div>
+</fieldset>
+</div>
+</div>
Index: /extensions/adult_content/template/flop_mauve/choose.tpl
===================================================================
--- /extensions/adult_content/template/flop_mauve/choose.tpl	(revision 6921)
+++ /extensions/adult_content/template/flop_mauve/choose.tpl	(revision 6921)
@@ -0,0 +1,8 @@
+<dt><img class="button" alt="{$AC_MSG}" src="{$pwg_root}template/yoga/icon/lost_password.png" />{'ac_title_menu_statut'|@translate}</dt>
+<dd>
+  <ul>
+	<li>
+	  <a href="{$pwg_root}plugins/{$AC_NAME}/charte_user.php?etat={$AC_ETAT}">{$AC_MSG}</a>
+	</li>
+  </ul>
+</dd>
Index: /extensions/adult_content/template/flop_mauve/closed.tpl
===================================================================
--- /extensions/adult_content/template/flop_mauve/closed.tpl	(revision 6921)
+++ /extensions/adult_content/template/flop_mauve/closed.tpl	(revision 6921)
@@ -0,0 +1,2 @@
+
+ <dt><a href="{$LINK}"> {'ac_title_fermer'|@translate}</a></dt>
Index: /extensions/adult_content/template/flop_mauve/msg.tpl
===================================================================
--- /extensions/adult_content/template/flop_mauve/msg.tpl	(revision 6921)
+++ /extensions/adult_content/template/flop_mauve/msg.tpl	(revision 6921)
@@ -0,0 +1,10 @@
+<dt>
+	<img class="button" alt="{$AC_MSG}" src="{$ROOT_URL}{$themeconf.icon_dir}/lost_password.png" />{'ac_title_menu_statut'|@translate}
+</dt>
+<dd>
+  <ul>
+	{if isset($U_LOGOUT)}
+		{$AC_MSG} <li><a href="{$U_LOGOUT}">{'logout'|@translate}</a></li>
+	{/if}
+  </ul>
+</dd>
Index: /extensions/adult_content/template/flop_mauve/opened.tpl
===================================================================
--- /extensions/adult_content/template/flop_mauve/opened.tpl	(revision 6921)
+++ /extensions/adult_content/template/flop_mauve/opened.tpl	(revision 6921)
@@ -0,0 +1,17 @@
+<dt>{'ac_title_menu'|@translate}</dt>
+<dd>
+  <ul>
+	<li>
+	  {'ac_text'|@translate}
+	</li>
+	<li>
+	  <a href="{$pwg_root}plugins/{$AC_NAME}/charte.php">{'ac_lien'|@translate}</a>
+	</li>
+	<li>
+	  <a href="{$U_LOGIN}">{'ac_identif'|@translate}</a>
+	</li> 
+	<li>
+	  <a href="{$LINK}">{'ac_fermer'|@translate}</a>
+	</li> 
+  </ul>
+</dd>
