Javascript fonctionnel mais avec un petit soucis.  Résolu . Un très grand MERCIi KIwi  Bouton_activeJavascript fonctionnel mais avec un petit soucis.  Résolu . Un très grand MERCIi KIwi  Bouton_hoverJavascript fonctionnel mais avec un petit soucis.  Résolu . Un très grand MERCIi KIwi  Fb-hoverJavascript fonctionnel mais avec un petit soucis.  Résolu . Un très grand MERCIi KIwi  Fb-active
CSSActif, le forum, n'est plus maintenu. Il est néanmoins disponible pour consultation. Pour des outils pratiques, rendez-vous sur:

Découvrez CSSActif, une collection d'outils et de tutoriels interactifs pour les développeurs Web — HTML, CSS, JavaScript et bien plus!

Derniers sujets
» Fiche de Présentation RPG
Javascript fonctionnel mais avec un petit soucis.  Résolu . Un très grand MERCIi KIwi  EmptySam 30 Mar 2024, 22:07 par Peyton972

» [RPG] Fiche personnage avec bannière
Javascript fonctionnel mais avec un petit soucis.  Résolu . Un très grand MERCIi KIwi  EmptySam 30 Mar 2024, 22:06 par Peyton972

» Structure de Qui Est En Ligne (1)
Javascript fonctionnel mais avec un petit soucis.  Résolu . Un très grand MERCIi KIwi  EmptyLun 04 Mar 2024, 23:20 par Peyton972

» Qui Est En Ligne - Utopia
Javascript fonctionnel mais avec un petit soucis.  Résolu . Un très grand MERCIi KIwi  EmptyDim 24 Déc 2023, 18:16 par romee

» Pack forum complet "Androïd Sylver" RPU (N°2)
Javascript fonctionnel mais avec un petit soucis.  Résolu . Un très grand MERCIi KIwi  EmptyJeu 02 Nov 2023, 06:42 par Hydrar

» Formulaire de connexion rapide amélioré
Javascript fonctionnel mais avec un petit soucis.  Résolu . Un très grand MERCIi KIwi  EmptySam 04 Mar 2023, 18:57 par Krager

» Avatar centré dans le profil
Javascript fonctionnel mais avec un petit soucis.  Résolu . Un très grand MERCIi KIwi  EmptySam 11 Fév 2023, 06:04 par Krager

» Vos partenaires dans le footer
Javascript fonctionnel mais avec un petit soucis.  Résolu . Un très grand MERCIi KIwi  EmptyMar 07 Fév 2023, 08:40 par Oxtran

Le deal à ne pas rater :
Cartes Pokémon EV6.5 : où trouver le Bundle Lot 6 Boosters Fable ...
Voir le deal

Partagez
 

Javascript fonctionnel mais avec un petit soucis. Résolu . Un très grand MERCIi KIwi

Voir le sujet précédent Voir le sujet suivant Aller en bas 
Invité
Invité




Javascript fonctionnel mais avec un petit soucis.  Résolu . Un très grand MERCIi KIwi  Empty
Bonjour à tous,
Voici un script permettant deux actions :
1/ récupérer le pseudo du membre directement dans la fenêtre de message en cliquant tout simplement sur son pseudo
2/ Améliorer le système de citation en permettant la citation partielle en faisant une sélection du texte puis en cliquant sur citer.
Le script est installé dans le template overall footer end juste avant la fermeture du body.

Ne vous emballez pas, ce petit joujou serait parfaitement au point s'il ne désactivait pas directement la fonction du bouton citer.

Ma question : auriez vous une idée pour que le bouton citer fonctionne normalement lorsque l'on clique dessus tout en conservant la fonction de citation partielle.


Code:
        <script>var inn = '['+'b]'; var outt = '['+'/b], '; var inn1 = '[quote="'; var inn2 = '"]'; var outt1 = '['+'/quote]'; var txt = '';sch = document.getElementsByTagName("img"); ix = 0;namesch = document.getElementsByTagName("span"); ixis = 0;while(sch[ix]){if (sch[ix].className == "i_icon_quote"){sch[ix].parentNode.href="#bottom";sch[ix].parentNode.onclick = function() {if (document.getSelection) {txt=document.getSelection();}else if (document.selection) {txt=document.selection.createRange().text;}rtx = this.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.getElementsByTagName("span"); ixi = 0;while(rtx[ixi]){if (rtx[ixi].className == "name"){conts = rtx[ixi].getElementsByTagName("a")[1].innerHTML.substring(0,1);if (conts != "<"){document.post.message.value += inn1 + rtx[ixi].getElementsByTagName("a")[1].innerHTML + inn2 + txt + outt1;}else {document.post.message.value += inn1 + rtx[ixi].getElementsByTagName("a")[1].getElementsByTagName("strong")[0].innerHTML + inn2 + txt + outt1;}}ixi++}}}ix++}while(namesch[ixis]){if (namesch[ixis].className == "name"){namesch[ixis].getElementsByTagName("a")[1].href = "#bottom";namesch[ixis].getElementsByTagName("a")[1].onclick = function() {conts = this.innerHTML.substring(0,1);if (conts != "<"){document.post.message.value += inn + this.innerHTML + outt;}else {document.post.message.value += inn + this.getElementsByTagName("strong")[0].innerHTML + outt;}}}ixis++}</script>

Merci par avance pour vos réponses.

Message à la modération : désolé si le topic est au mauvais endroit. Je sais que ccsactif ne traite que le css et le html mais sait on jamais ; un membre sera peu être à l'aise avec cette demande.


Dernière édition par fascicularia le Sam 31 Mar 2012, 20:23, édité 1 fois
MessageSujet: Javascript fonctionnel mais avec un petit soucis. Résolu . Un très grand MERCIi KIwi    Javascript fonctionnel mais avec un petit soucis.  Résolu . Un très grand MERCIi KIwi  EmptySam 31 Mar 2012, 16:20
Revenir en haut Aller en bas
Hiro
Hiro
Ninja Codeur
Ninja Codeur

Masculin Messages : 1179



Javascript fonctionnel mais avec un petit soucis.  Résolu . Un très grand MERCIi KIwi  Empty
Salut, pourrais-je avoir le lien du fofo ou il est installé ? (il ne fonctionne pas sur le mien)
Merci Smile
MessageSujet: Re: Javascript fonctionnel mais avec un petit soucis. Résolu . Un très grand MERCIi KIwi    Javascript fonctionnel mais avec un petit soucis.  Résolu . Un très grand MERCIi KIwi  EmptySam 31 Mar 2012, 16:49
Revenir en haut Aller en bas
Invité
Invité




Javascript fonctionnel mais avec un petit soucis.  Résolu . Un très grand MERCIi KIwi  Empty
Bonjour HIro, merci pour cette aide. Je vous avouerai que je bute complétement sur ce pb depuis un petit moment.

Le script n'est pas installé mais je vais le remettre en place.

Le forum est http://altitudetropicale.forums-actifs.com

Voici le template du overall footer end si cela peut vous aider
Code:

<!-- BEGIN html_validation -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<body>
<table>
   <tr>
      <td>
         <div>
            <div>
               <div>
<!-- END html_validation -->
               </div>
            </div>
            <!-- BEGIN switch_footer_links -->
            <div align="center">
               <div class="gen">
                  <!-- BEGIN footer_link -->
                     <!-- BEGIN switch_separator --> |&nbsp;<!-- END switch_separator -->
                     <a name="bottom" class="copyright" href="{switch_footer_links.footer_link.U_FOOTER_LINK_HREF}" rel="{switch_footer_links.footer_link.FOOTER_LINK_REL}" target="{switch_footer_links.footer_link.FOOTER_LINK_TARGET}" title="{switch_footer_links.footer_link.L_FOOTER_LINK_TITLE}">{switch_footer_links.footer_link.L_FOOTER_LINK_TEXT}</a>
                  <!-- END footer_link -->
               </div>
            </div>
            <!-- END switch_footer_links -->
         </div>
         {PROTECT_FOOTER}
      </td>
   </tr>
</table>

<!-- BEGIN switch_facebook_login -->
<div id="fb-root"></div>
<script type="text/javascript">
//<![CDATA[
FB.init({appId: '{switch_facebook_login.FACEBOOK_APP_ID}', status: true, cookie: true, xfbml: true, oauth: true});
//]]>
</script>
<!-- END switch_facebook_login -->

<!-- BEGIN switch_facebook_logout_TMP -->
<script type="text/javascript">
//<![CDATA[
FB.Event.subscribe('auth.logout', function(response) {
   if ($('a#logout'))
   {
      var lien_redir = $('a#logout').attr('href');

      if ($('a#logout').attr('href') && $('a#logout').attr('href') != '')
      {
         document.location.href = 'http://{switch_facebook_logout.SERVER_NAME}/' + lien_redir;
      }
   }
});

$(document).ready( function() {
   $('a#logout').click( function() {
      FB.logout();
   } );
});
//]]>
</script>
<!-- END switch_facebook_logout_TMP -->

<script type="text/javascript">
//<![CDATA[
   fa_endpage();
//]]>
</script>

    <script>var inn = '['+'b]'; var outt = '['+'/b], '; var inn1 = '[quote="'; var inn2 = '"]'; var outt1 = '['+'/quote]'; var txt = '';sch = document.getElementsByTagName("img"); ix = 0;namesch = document.getElementsByTagName("span"); ixis = 0;while(sch[ix]){if (sch[ix].className == "i_icon_quote"){sch[ix].parentNode.href="#bottom";sch[ix].parentNode.onclick = function() {if (document.getSelection) {txt=document.getSelection();}else if (document.selection) {txt=document.selection.createRange().text;}rtx = this.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.getElementsByTagName("span"); ixi = 0;while(rtx[ixi]){if (rtx[ixi].className == "name"){conts = rtx[ixi].getElementsByTagName("a")[1].innerHTML.substring(0,1);if (conts != "<"){document.post.message.value += inn1 + rtx[ixi].getElementsByTagName("a")[1].innerHTML + inn2 + txt + outt1;}else {document.post.message.value += inn1 + rtx[ixi].getElementsByTagName("a")[1].getElementsByTagName("strong")[0].innerHTML + inn2 + txt + outt1;}}ixi++}}}ix++}while(namesch[ixis]){if (namesch[ixis].className == "name"){namesch[ixis].getElementsByTagName("a")[1].href = "#bottom";namesch[ixis].getElementsByTagName("a")[1].onclick = function() {conts = this.innerHTML.substring(0,1);if (conts != "<"){document.post.message.value += inn + this.innerHTML + outt;}else {document.post.message.value += inn + this.getElementsByTagName("strong")[0].innerHTML + outt;}}}ixis++}</script>

</body>
</html>
MessageSujet: Re: Javascript fonctionnel mais avec un petit soucis. Résolu . Un très grand MERCIi KIwi    Javascript fonctionnel mais avec un petit soucis.  Résolu . Un très grand MERCIi KIwi  EmptySam 31 Mar 2012, 16:56
Revenir en haut Aller en bas
Hiro
Hiro
Ninja Codeur
Ninja Codeur

Masculin Messages : 1179



Javascript fonctionnel mais avec un petit soucis.  Résolu . Un très grand MERCIi KIwi  Empty
Bon, il ne veut toujours pas fonctionner et je ne peut pas tester sur ton forum ^^
Je vais voir ce que je peux faire.

Le code est de toi ?
MessageSujet: Re: Javascript fonctionnel mais avec un petit soucis. Résolu . Un très grand MERCIi KIwi    Javascript fonctionnel mais avec un petit soucis.  Résolu . Un très grand MERCIi KIwi  EmptySam 31 Mar 2012, 17:09
Revenir en haut Aller en bas
Kiwi
Kiwi
{ Membre }
{ Membre }

Féminin Messages : 142



Javascript fonctionnel mais avec un petit soucis.  Résolu . Un très grand MERCIi KIwi  Empty
Salut !

En fait, il faut activer la réponse rapide pour que le script puisse fonctionner =)

Plutôt que de se compliquer la vie en "jouant" avec les liens de citation, je te propose de, tout simplement, citer l'intégralité du message dans la réponse rapide si rien n'a été sélectionné. Du coup, j'ai ajouté une condition (si le texte est vide) et j'ai vidé la variable txt à la fin du onclick. Ce qui donne ceci :

Code:
<script>
var inn = '['+'b]';
var outt = '['+'/b], ';
var inn1 = '[quote="';
var inn2 = '"]';
var outt1 = '['+'/quote]';
var txt = '';
sch = document.getElementsByTagName("img");
ix = 0;
namesch = document.getElementsByTagName("span");
ixis = 0;
while(sch[ix]){
   if (sch[ix].className == "i_icon_quote"){
      sch[ix].parentNode.href="#bottom";
      sch[ix].parentNode.onclick = function() {
         if (document.getSelection) {
            txt=document.getSelection();
         }
         else if (document.selection) {
            txt=document.selection.createRange().text;
         }
         if (txt == '') {
            txt = this.parentNode.parentNode.parentNode.childNodes[2].firstChild.firstChild.firstChild.innerHTML;
         }
         rtx = this.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.getElementsByTagName("span");
         ixi = 0;
         while(rtx[ixi]){
            if (rtx[ixi].className == "name"){
               conts = rtx[ixi].getElementsByTagName("a")[1].innerHTML.substring(0,1);
               if (conts != "<"){
                  document.post.message.value += inn1 + rtx[ixi].getElementsByTagName("a")[1].innerHTML + inn2 + txt + outt1;
               }
               else {
                  document.post.message.value += inn1 + rtx[ixi].getElementsByTagName("a")[1].getElementsByTagName("strong")[0].innerHTML + inn2 + txt + outt1;
               }
            }
            ixi++
         }
         txt = '';
      }
   }
ix++
}
while(namesch[ixis]){
   if (namesch[ixis].className == "name"){
      namesch[ixis].getElementsByTagName("a")[1].href = "#bottom";
      namesch[ixis].getElementsByTagName("a")[1].onclick = function() {
         conts = this.innerHTML.substring(0,1);
         if (conts != "<"){
            document.post.message.value += inn + this.innerHTML + outt;
         }
         else {
            document.post.message.value += inn + this.getElementsByTagName("strong")[0].innerHTML + outt;
         }
      }
   }
   ixis++
}
</script>

Voilà, j'espère que ça fonctionnera chez toi comme chez moi =)
C'est un script plutôt sympa je trouve, en tout cas ^^

Kiwi
MessageSujet: Re: Javascript fonctionnel mais avec un petit soucis. Résolu . Un très grand MERCIi KIwi    Javascript fonctionnel mais avec un petit soucis.  Résolu . Un très grand MERCIi KIwi  EmptySam 31 Mar 2012, 18:03
Revenir en haut Aller en bas
Invité
Invité




Javascript fonctionnel mais avec un petit soucis.  Résolu . Un très grand MERCIi KIwi  Empty
Bonsoir Kiwi, merci pour cette correction. La réponse rapide est activée mais malheureusement, le nouveau script agit à l'identique.
La sélection partielle fonctionne mais le bouton citer n'agit plus. Sur le premier script, il m'affichait les balises quote mais sans le texte. Le mode WYSIWYG par contre est désactivé.; je ne sais si cela peut avoir une influence.
MessageSujet: Re: Javascript fonctionnel mais avec un petit soucis. Résolu . Un très grand MERCIi KIwi    Javascript fonctionnel mais avec un petit soucis.  Résolu . Un très grand MERCIi KIwi  EmptySam 31 Mar 2012, 18:29
Revenir en haut Aller en bas
Kiwi
Kiwi
{ Membre }
{ Membre }

Féminin Messages : 142



Javascript fonctionnel mais avec un petit soucis.  Résolu . Un très grand MERCIi KIwi  Empty
Curieux, sur mon forum test ça fonctionne.
Est-ce que tu aurais un lien pour que je puisse tester ça en Invité ?

Edit > Ah, ou alors tu as peut-être modifié la structure du template comportant les réponses ? Viewtopic_body je crois ?

Kiwi

Edit 2 > Essaye avec ça :

Code:
<script>
var inn = '['+'b]';
var outt = '['+'/b], ';
var inn1 = '[quote="';
var inn2 = '"]';
var outt1 = '['+'/quote]';
var txt = '';
sch = document.getElementsByTagName("img");
ix = 0;
namesch = document.getElementsByTagName("span");
ixis = 0;
while(sch[ix]){
  if (sch[ix].className == "i_icon_quote"){
      sch[ix].parentNode.href="#bottom";
      sch[ix].parentNode.onclick = function() {
        if (document.getSelection) {
            txt=document.getSelection();
        }
        else if (document.selection) {
            txt=document.selection.createRange().text;
        }
        if (txt == '') {
            txt = this.parentNode.parentNode.parentNode.childNodes[3].firstChild.firstChild.firstChild.innerHTML;
        }
        rtx = this.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.getElementsByTagName("span");
        ixi = 0;
        while(rtx[ixi]){
            if (rtx[ixi].className == "name"){
              conts = rtx[ixi].getElementsByTagName("a")[1].innerHTML.substring(0,1);
              if (conts != "<"){
                  document.post.message.value += inn1 + rtx[ixi].getElementsByTagName("a")[1].innerHTML + inn2 + txt + outt1;
              }
              else {
                  document.post.message.value += inn1 + rtx[ixi].getElementsByTagName("a")[1].getElementsByTagName("strong")[0].innerHTML + inn2 + txt + outt1;
              }
            }
            ixi++
        }
        txt = '';
      }
  }
ix++
}
while(namesch[ixis]){
  if (namesch[ixis].className == "name"){
      namesch[ixis].getElementsByTagName("a")[1].href = "#bottom";
      namesch[ixis].getElementsByTagName("a")[1].onclick = function() {
        conts = this.innerHTML.substring(0,1);
        if (conts != "<"){
            document.post.message.value += inn + this.innerHTML + outt;
        }
        else {
            document.post.message.value += inn + this.getElementsByTagName("strong")[0].innerHTML + outt;
        }
      }
  }
  ixis++
}
</script>

Cest un petit peu un changement à laveugle, mais ça pourrait bien fonctionner. Le fait que ça marche chez moi et pas chez toi vient d'une différence dans nos structures de page. Jai juste changé lindex du childNodes (désolé pour les apostrophes, petit bug ^^). Si ça ne fonctionne pas, j'aurai besoin de ton template ^^
MessageSujet: Re: Javascript fonctionnel mais avec un petit soucis. Résolu . Un très grand MERCIi KIwi    Javascript fonctionnel mais avec un petit soucis.  Résolu . Un très grand MERCIi KIwi  EmptySam 31 Mar 2012, 18:36
Revenir en haut Aller en bas
Invité
Invité




Javascript fonctionnel mais avec un petit soucis.  Résolu . Un très grand MERCIi KIwi  Empty
Même action que le premier script avec apparition des balises quote sans l'intégralité du message
Code:
[quote="alexandre"][/quote]

Désolé Kiwi de vous donner autant de boulot; surtout à une heure aussi tardive. Rien ne presse, rassurez vous,; il n'y a rien de vital.

Voici le template overall footer end avec la dernière modif.

Code:
<!-- BEGIN html_validation -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<body>
<table>
   <tr>
      <td>
         <div>
            <div>
               <div>
<!-- END html_validation -->
               </div>
            </div>
            <!-- BEGIN switch_footer_links -->
            <div align="center">
               <div class="gen">
                  <!-- BEGIN footer_link -->
                     <!-- BEGIN switch_separator --> |&nbsp;<!-- END switch_separator -->
                     <a name="bottom" class="copyright" href="{switch_footer_links.footer_link.U_FOOTER_LINK_HREF}" rel="{switch_footer_links.footer_link.FOOTER_LINK_REL}" target="{switch_footer_links.footer_link.FOOTER_LINK_TARGET}" title="{switch_footer_links.footer_link.L_FOOTER_LINK_TITLE}">{switch_footer_links.footer_link.L_FOOTER_LINK_TEXT}</a>
                  <!-- END footer_link -->
               </div>
            </div>
            <!-- END switch_footer_links -->
         </div>
         {PROTECT_FOOTER}
      </td>
   </tr>
</table>

<!-- BEGIN switch_facebook_login -->
<div id="fb-root"></div>
<script type="text/javascript">
//<![CDATA[
FB.init({appId: '{switch_facebook_login.FACEBOOK_APP_ID}', status: true, cookie: true, xfbml: true, oauth: true});
//]]>
</script>
<!-- END switch_facebook_login -->

<!-- BEGIN switch_facebook_logout_TMP -->
<script type="text/javascript">
//<![CDATA[
FB.Event.subscribe('auth.logout', function(response) {
   if ($('a#logout'))
   {
      var lien_redir = $('a#logout').attr('href');

      if ($('a#logout').attr('href') && $('a#logout').attr('href') != '')
      {
         document.location.href = 'http://{switch_facebook_logout.SERVER_NAME}/' + lien_redir;
      }
   }
});

$(document).ready( function() {
   $('a#logout').click( function() {
      FB.logout();
   } );
});
//]]>
</script>
<!-- END switch_facebook_logout_TMP -->

<script type="text/javascript">
//<![CDATA[
   fa_endpage();
//]]>
</script>
 
 
 
 
 
 <!-- Début script récupération du pseudo et citation partielle -->
 
  <script>
var inn = '['+'b]';
var outt = '['+'/b], ';
var inn1 = '[quote="';
var inn2 = '"]';
var outt1 = '['+'/quote]';
var txt = '';
sch = document.getElementsByTagName("img");
ix = 0;
namesch = document.getElementsByTagName("span");
ixis = 0;
while(sch[ix]){
  if (sch[ix].className == "i_icon_quote"){
      sch[ix].parentNode.href="#bottom";
      sch[ix].parentNode.onclick = function() {
        if (document.getSelection) {
            txt=document.getSelection();
        }
        else if (document.selection) {
            txt=document.selection.createRange().text;
        }
        if (txt == '') {
            txt = this.parentNode.parentNode.parentNode.childNodes[3].firstChild.firstChild.firstChild.innerHTML;
        }
        rtx = this.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.getElementsByTagName("span");
        ixi = 0;
        while(rtx[ixi]){
            if (rtx[ixi].className == "name"){
              conts = rtx[ixi].getElementsByTagName("a")[1].innerHTML.substring(0,1);
              if (conts != "<"){
                  document.post.message.value += inn1 + rtx[ixi].getElementsByTagName("a")[1].innerHTML + inn2 + txt + outt1;
              }
              else {
                  document.post.message.value += inn1 + rtx[ixi].getElementsByTagName("a")[1].getElementsByTagName("strong")[0].innerHTML + inn2 + txt + outt1;
              }
            }
            ixi++
        }
        txt = '';
      }
  }
ix++
}
while(namesch[ixis]){
  if (namesch[ixis].className == "name"){
      namesch[ixis].getElementsByTagName("a")[1].href = "#bottom";
      namesch[ixis].getElementsByTagName("a")[1].onclick = function() {
        conts = this.innerHTML.substring(0,1);
        if (conts != "<"){
            document.post.message.value += inn + this.innerHTML + outt;
        }
        else {
            document.post.message.value += inn + this.getElementsByTagName("strong")[0].innerHTML + outt;
        }
      }
  }
  ixis++
}
</script>
<!-- Fin script récupération du pseudo et citation partielle --> 

</body>
</html>
MessageSujet: Re: Javascript fonctionnel mais avec un petit soucis. Résolu . Un très grand MERCIi KIwi    Javascript fonctionnel mais avec un petit soucis.  Résolu . Un très grand MERCIi KIwi  EmptySam 31 Mar 2012, 18:57
Revenir en haut Aller en bas
Kiwi
Kiwi
{ Membre }
{ Membre }

Féminin Messages : 142



Javascript fonctionnel mais avec un petit soucis.  Résolu . Un très grand MERCIi KIwi  Empty
Pas de souci, ne t'en excuse pas, Fascicularia, je fais juste ça parce que ça me plaît x)
En fait, désolé de ne pas avoir précisé, mais c'est de viewtopic_body dont jaurai besoin s'il te plaît ^^'
Kiwi
MessageSujet: Re: Javascript fonctionnel mais avec un petit soucis. Résolu . Un très grand MERCIi KIwi    Javascript fonctionnel mais avec un petit soucis.  Résolu . Un très grand MERCIi KIwi  EmptySam 31 Mar 2012, 18:59
Revenir en haut Aller en bas
Invité
Invité




Javascript fonctionnel mais avec un petit soucis.  Résolu . Un très grand MERCIi KIwi  Empty
C'est sympa kiwi . Et une ola us pour kiwi Javascript fonctionnel mais avec un petit soucis.  Résolu . Un très grand MERCIi KIwi  1001172573 Javascript fonctionnel mais avec un petit soucis.  Résolu . Un très grand MERCIi KIwi  1001172573 Javascript fonctionnel mais avec un petit soucis.  Résolu . Un très grand MERCIi KIwi  1001172573

Voici le template

Code:
  <!-- BEGIN switch_user_logged_out -->



<!-- END switch_user_logged_out -->


<script type="text/javascript">
//<![CDATA[
var multiquote_img_off = '{JS_MULTIQUOTE_IMG_OFF}', multiquote_img_on = '{JS_MULTIQUOTE_IMG_ON}', _atr = '{JS_DIR}addthis/', _ati = '{PATH_IMG_FA}addthis/'{ADDTHIS_LANG}, addthis_localize = { share_caption: "{L_SHARE_CAPTION}", email: "{L_EMAIL}", email_caption: "{L_EMAIL_CAPTION}", favorites: "{L_SHARE_BOOKMARKS}", print: "{L_PRINT}", more: "{L_MORE}" };
$(function(){
_atc.cwait = 0;
$('.addthis_button').click(function(){
if ($('#at15s').css('display') == 'block') {
addthis_close();
addthis_close();
}
});
});
//]]>
</script>

<table width="100%" border="0" cellspacing="2" cellpadding="0">
<tr>
<td align="left" valign="middle" nowrap="nowrap">
<span class="nav">
<!-- BEGIN switch_user_authpost -->
<a href="{U_POST_NEW_TOPIC}" rel="nofollow"><img src="{POST_IMG}" id="{POST_IMG_ID}one" alt="{L_POST_NEW_TOPIC}" align="middle" border="0" /></a>
<!-- END switch_user_authpost -->
<!-- BEGIN switch_user_authreply -->
<a href="{U_POST_REPLY_TOPIC}"><img src="{REPLY_IMG}" id="i_reply" alt="{L_POST_REPLY_TOPIC}" align="middle" border="0" /></a>
<!-- END switch_user_authreply -->
</span>
</td>
<td class="nav" valign="middle" width="100%"><span class="nav"><a class="nav" href="{U_INDEX}">{L_INDEX}</a>{NAV_SEP}<a class="nav" href="{U_ALBUM}">{L_ALBUM}</a>{NAV_CAT_DESC_SECOND}</span></td>
<td align="right" valign="bottom" nowrap="nowrap" width="100%">
<span class="gensmall bold">
<a class="addthis_button" href="http://www.addthis.com/bookmark.php?v=250&pub=forumotion">{L_SHARE}</a>
|


<script type="text/javascript">
//<![CDATA[
insert_plus_menu('f{FORUM_ID}&t={TOPIC_ID}','{JS_SESSION_ID}', {JS_AUTH_FAVOURITES});
//]]>
</script>


</span>
</td>
</tr>
</table>

<!-- Barre modération haut -->


       
       

<!-- Barre modération -->
<!-- BEGIN viewtopic_bottom -->
<table class="noprint" width="100%" border="0" cellspacing="2" cellpadding="0" align="center">
<tr>
<td colspan="2" align="left" valign="top" nowrap="nowrap">
{S_TOPIC_ADMIN}

<form name="action" method="get" action="{S_FORM_MOD_ACTION}">
<input type="hidden" name="t" value="{TOPIC_ID}" />
<input type="hidden" name="sid" value="{S_SID}" />
<span class="gen">{L_MOD_TOOLS}
{S_SELECT_MOD} <input class="liteoption" type="submit" value="{L_GO}" /></span>
</form><br><br>


</td>
</tr>
</table>
<!-- END viewtopic_bottom -->
<!-- Fin Barre modération haut-->




<table class="forumline" width="100%" border="0" cellspacing="1" cellpadding="0">
<tr align="right">
<td class="catHead" colspan="2" height="28">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="9%" class="noprint"> </td>
<td align="center" nowrap="nowrap" class="t-title"><h1 class="cattitle"> {TOPIC_TITLE}</h1></td>
<td align="right" nowrap="nowrap" width="9%" class="browse-arrows"><a href="{U_VIEW_OLDER_TOPIC}">{L_VIEW_PREVIOUS_TOPIC}</a> <a href="{U_VIEW_NEWER_TOPIC}">{L_VIEW_NEXT_TOPIC}</a> <a href="#bottom">{L_GOTO_DOWN}</a> </td>
</tr>
</table>
</td>
</tr>

<!-- BEGIN topicpagination -->
<tr>
<td class="row1 pagination" colspan="2" align="right" valign="top"><span class="gensmall">{PAGINATION}</span></td>
</tr>
<!-- END topicpagination -->
{POLL_DISPLAY}
<tr>
<th class="thLeft" nowrap="nowrap" width="150px" height="26">{L_AUTHOR}</th>
<th class="thRight" nowrap="nowrap" colspan="2">{L_MESSAGE}</th>
</tr>
<!-- BEGIN postrow -->
<!-- BEGIN displayed -->
<tr class="post">
<td class="{postrow.displayed.ROW_CLASS}"{postrow.displayed.THANK_BGCOLOR} valign="top" width="150">
<div id="post_onlin">{postrow.displayed.ONLINE_IMG}</div>
<center>
<span class="name"> <div id="profil_head"></div>
<div id="name">
<a name="{postrow.displayed.U_POST_ID}"></a><strong>

<span class="ombre">

{postrow.displayed.POSTER_NAME}</strong>

<div id="profil_body"><span class="postdetails poster-profile">
{postrow.displayed.POSTER_RANK}<br />
{postrow.displayed.RANK_IMAGE}{postrow.displayed.POSTER_AVATAR}<br /><br />
<!-- BEGIN profile_field -->
{postrow.displayed.profile_field.LABEL} {postrow.displayed.profile_field.CONTENT}{postrow.displayed.profile_field.SEPARATOR}
<!-- END profile_field -->
<span class="rpgzone">
<span class="rpgbutton">Les échanges et recherches<br></span>
<div class="rpghidden"><div class="rpgcontent">{postrow.displayed.POSTER_RPG}</div>

 </div>



</span>
</span>
</div>
<div id="profil_foot"></div><br />
<img src="http://2img.net/i/fa/vide.gif" alt="" style="width:150px;height:1px" />
</td>
<td class="{postrow.displayed.ROW_CLASS}"{postrow.displayed.THANK_BGCOLOR} valign="top" width="100%" height="28" colspan="2"> <div class="fleche"> </div>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><span class="postdetails"><img border="0" title="Message" alt="Message" src="http://2img.net/i/fa/empty.gif"><img src="{postrow.displayed.MINI_POST_IMG}" alt="{postrow.displayed.L_MINI_POST_ALT}" title="{postrow.displayed.L_MINI_POST_ALT}" border="0" /><a href="#{postrow.displayed.U_POST_ID}">{L_POST_SUBJECT}: {postrow.displayed.POST_SUBJECT}</a>  <img src="{postrow.displayed.MINI_TIME_IMG}" alt="" border="0" />{postrow.displayed.POST_DATE}</span></td> </tr>
<tr><td valign="top" nowrap="nowrap" class="post-options"><img src="http://i23.servimg.com/u/f23/11/93/85/24/infobu15.gif">
{postrow.displayed.THANK_IMG} {postrow.displayed.MULTIQUOTE_IMG} {postrow.displayed.QUOTE_IMG} {postrow.displayed.EDIT_IMG} {postrow.displayed.DELETE_IMG} {postrow.displayed.IP_IMG} {postrow.displayed.REPORT_IMG}

</a>
</span>
</td>
</tr>

<tr>
<td colspan="2" class="hr">
<hr />
</td>
</tr>
<tr>
<td colspan="2">
<!-- BEGIN switch_vote_active -->
<div class="vote gensmall">
<!-- BEGIN switch_vote -->
<div class="vote-button"><a href="{postrow.displayed.switch_vote_active.switch_vote.U_VOTE_PLUS}">+</a></div>
<!-- END switch_vote -->

<!-- BEGIN switch_bar -->
<div class="vote-bar" title="{postrow.displayed.switch_vote_active.L_VOTE_TITLE}">
<!-- BEGIN switch_vote_plus -->
<div class="vote-bar-plus" style="height:{postrow.displayed.switch_vote_active.switch_bar.switch_vote_plus.HEIGHT_PLUS}px;"></div>
<!-- END switch_vote_plus -->

<!-- BEGIN switch_vote_minus -->
<div class="vote-bar-minus" style="height:{postrow.displayed.switch_vote_active.switch_bar.switch_vote_minus.HEIGHT_MINUS}px;"></div>
<!-- END switch_vote_minus -->
</div>
<!-- END switch_bar -->

<!-- BEGIN switch_no_bar -->
<div title="{postrow.displayed.switch_vote_active.L_VOTE_TITLE}" class="vote-no-bar">----</div>
<!-- END switch_no_bar -->

<!-- BEGIN switch_vote -->
<div class="vote-button"><a href="{postrow.displayed.switch_vote_active.switch_vote.U_VOTE_MINUS}">-</a></div>
<!-- END switch_vote -->
</div>
<!-- END switch_vote_active -->

<div class="postbody">
<br>
<div class="altitude_encadrement">{postrow.displayed.MESSAGE}</div><br><div class="decopost"> <img src="http://i43.servimg.com/u/f43/11/93/85/24/sans_t23.gif"> </div>


<!-- BEGIN switch_attachments -->
<dl class="attachbox">
<dt>{postrow.displayed.switch_attachments.L_ATTACHMENTS}</dt>
<dd>
<!-- BEGIN switch_post_attachments -->
<dl class="file">
<dt>
<img src="{postrow.displayed.switch_attachments.switch_post_attachments.U_IMG}" />

<!-- BEGIN switch_dl_att -->
<a class="postlink" href="{postrow.displayed.switch_attachments.switch_post_attachments.switch_dl_att.U_ATTACHMENT}">{postrow.displayed.switch_attachments.switch_post_attachments.switch_dl_att.ATTACHMENT}</a> {postrow.displayed.switch_attachments.switch_post_attachments.switch_dl_att.ATTACHMENT_DEL}
<!-- END switch_dl_att -->

<!-- BEGIN switch_no_dl_att -->
{postrow.displayed.switch_attachments.switch_post_attachments.switch_no_dl_att.ATTACHMENT}
<!-- END switch_no_dl_att -->
</dt>

<!-- BEGIN switch_no_comment -->
<dd>
<em>{postrow.displayed.switch_attachments.switch_post_attachments.switch_no_comment.ATTACHMENT_COMMENT}</em>
</dd>
<!-- END switch_no_comment -->

<!-- BEGIN switch_no_dl_att -->
<dd>
<em>{postrow.displayed.switch_attachments.switch_post_attachments.switch_no_dl_att.TEXT_NO_DL}</em>
</dd>
<!-- END switch_no_dl_att -->

<dd>({postrow.displayed.switch_attachments.switch_post_attachments.FILE_SIZE}) {postrow.displayed.switch_attachments.switch_post_attachments.NB_DL}</dd>
</dl>
<!-- END switch_post_attachments -->
</dd>
</dl>
<!-- END switch_attachments -->




<div class="signa"> <legend><img src="http://i63.servimg.com/u/f63/11/93/85/24/signat12.png"></legend>{postrow.displayed.SIGNATURE}</div>


</div>
</div>

</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="{postrow.displayed.ROW_CLASS} browse-arrows"{postrow.displayed.THANK_BGCOLOR} align="center" valign="middle" width="150">
<a href="#top">{L_BACK_TO_TOP}</a> <a href="#bottom">{L_GOTO_DOWN}</a>
</td>
<td class="{postrow.displayed.ROW_CLASS} messaging gensmall"{postrow.displayed.THANK_BGCOLOR} width="100%" height="28">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="middle">
{postrow.displayed.PROFILE_IMG} {postrow.displayed.PM_IMG} {postrow.displayed.EMAIL_IMG}<!-- BEGIN contact_field --> {postrow.displayed.contact_field.CONTENT}<!-- END contact_field -->


</td>
</tr>
</table>
</td>
</tr>
<!--debut decalage -->
<td class="transtable" align="center" valign="middle" width="150" height="20"></td>
<td class="transtable" valign="bottom" width="100%" height="5" nowrap="nowrap">
</td>

<!--fin decalage -->

<!-- BEGIN first_post_br -->
</table>
<br />
<table class="forumline" width="100%" border="0" cellspacing="1" cellpadding="0">
<tr>
<th class="thLeft" nowrap="nowrap" width="150px" height="26">{L_AUTHOR}</th>
<th class="thRight" nowrap="nowrap" colspan="2">{L_MESSAGE}</th>
</tr>
<!-- END first_post_br -->
<!-- END displayed -->
<!-- BEGIN hidden -->
<tr>
<td class="postdetails {postrow.hidden.ROW_CLASS}" colspan="2" align="center">{postrow.hidden.MESSAGE}</td>
</tr>
<!-- END hidden -->
<!-- END postrow -->
<!-- BEGIN no_post -->
<tr align="center">
<td class="row1" colspan="2" height="28">
<span class="genmed">{no_post.L_NO_POST}</span>
</td>
</tr>
<!-- END no_post -->
<tr align="right">
<td class="catBottom" colspan="2" height="28">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="9%" class="noprint"> </td>
<td align="center" nowrap="nowrap" class="t-title"><a name="bottomtitle"></a><h1 class="cattitle">{TOPIC_TITLE}</h1></td>
<td align="right" nowrap="nowrap" width="9%" class="browse-arrows"><a href="{U_VIEW_OLDER_TOPIC}">{L_VIEW_PREVIOUS_TOPIC}</a> <a href="{U_VIEW_NEWER_TOPIC}">{L_VIEW_NEXT_TOPIC}</a> <a href="#top">{L_BACK_TO_TOP}</a> </td>
</tr>
</table>
</td>
</tr>
</table>

        <!-- BEGIN promot_trafic -->
        <table class="forumline" width="100%" border="0" cellpadding="1" cellspacing="0" id="ptrafic_close" style="display:'';margin: 1px 0px 1px 0px">
          <tr>
              <td class="catBottom" height="28">
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td valign="top"><h1 class="cattitle"> {PROMOT_TRAFIC_TITLE}</h1></td>
                      <td align="right" valign="middle"><span class="gensmall"><a href="javascript:ShowHideLayer('ptrafic_open','ptrafic_close');"><img src="{TABS_MORE_IMG}" alt="+" align="middle" border="0" /></a></span></td>
                    </tr>
                </table>
              </td>
          </tr>
        </table>

        <table class="forumline" width="100%" border="0" cellpadding="1" cellspacing="0" id="ptrafic_open" style="display:none;margin: 1px 0px 1px 0px">
          <tr>
              <td class="catBottom" height="28">
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td valign="top"><h1 class="cattitle"> {PROMOT_TRAFIC_TITLE}</h1></td>
                      <td align="right" valign="middle"><span class="gensmall"><a href="javascript:ShowHideLayer('ptrafic_open','ptrafic_close');"><img src="{TABS_LESS_IMG}" alt="-" align="middle" border="0" /></a></span></td>
                    </tr>
                </table>
              </td>
          </tr>
          <tr>
              <td class="row2" valign="top">
              <ul>
                <!-- BEGIN link -->
                <li><a href="{promot_trafic.link.U_HREF}" target="_blank" class="gensmall">{promot_trafic.link.TITLE}</a>
                <!-- END link -->
              </ul>
              </td>
          </tr>
        </table>
        <!-- END promot_trafic -->       
        <!-- BEGIN switch_forum_rules -->
        <table id="forum_rules" class="forumline" width="100%" border="0" cellspacing="0" cellpadding="0" style="margin: 1px 0px 1px 0px">
          <tbody>
              <tr>
                <td class="catBottom">
                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                      <tbody>
                          <tr>
                            <td valign="top">
                                <h1 class="cattitle"> {L_FORUM_RULES}</h1>
                            </td>
                          </tr>
                      </tbody>
                    </table>
                </td>
              </tr>
              <tr>
                <td class="row1 clearfix">
                    <table>
                      <tr>
                          <!-- BEGIN switch_forum_rule_image -->
                          <td class="logo">
                            <img src="{RULE_IMG_URL}" />
                          </td>
                          <!-- END switch_forum_rule_image -->
                          <td class="rules postbody">
                            {RULE_MSG}
                          </td>
                      </tr>
                    </table>
                </td>
              </tr>
          </tbody>
        </table>
        <!-- END switch_forum_rules -->
<table class="forumline noprint" width="100%" border="0" cellspacing="1" cellpadding="0">
<tr>
<td class="row2" valign="top" {COLSPAN_PAGINATION} width="150"><span class="gensmall">{PAGE_NUMBER}</span></td>
<!-- BEGIN topicpagination -->
<td class="row1" align="right" valign="top" ><span class="gensmall">{PAGINATION}</span></td>
<!-- END topicpagination -->
</tr>
<!-- BEGIN switch_user_logged_in -->
<!-- BEGIN watchtopic -->
<tr>
<td class="row2" colspan="2" align="right" valign="top"><span class="gensmall">{S_WATCH_TOPIC}</span></td>
</tr>
<!-- END watchtopic -->
    <!-- END switch_user_logged_in -->
    <tr>
    <td class="row2" colspan="2" align="center" style="padding:0px">
    <!-- BEGIN switch_user_logged_in -->
    <a name="quickreply"></a>
        <!--DEBUT RAJOUT BOITE SMILEY MESSAGE RAPIDE -->

    <table width="100%" cellspacing="5" cellpadding="0" align="center">
    <tr>
    <td class="" valign="top" align="center" width="10%">
    <iframe src="/smilies.forum?mode=smilies_frame" width="200" height="250"></iframe>

    <td class="" valign="top" align="left" width="800">
    {QUICK_REPLY_FORM}
    </td>
    </tr>
    </table>

    <!--FIN RAJOUT BOITE SMILEY MESSAGE RAPIDE -->
<br />
<!-- END switch_user_logged_in -->
</td>
</tr>
<tr>
<td style="margin:0; padding: 0;" colspan="2">
<table border="0" cellpadding="0" width="100%" cellspacing="0" id="info_open" style="display:''">
<tbody>
<!-- BEGIN show_permissions -->
<tr>
<td class="row2" valign="top" width="25%"><span class="gensmall">{L_TABS_PERMISSIONS}</span></td>
<td class="row1" valign="top" width="75%"><span class="gensmall">{S_AUTH_LIST}</span></td>
</tr>
<!-- END show_permissions -->
<tr>
<td class="catBottom" colspan="2" height="28">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="middle" width="100%"><span class="nav"><a class="nav" href="{U_INDEX}">{L_INDEX}</a>{NAV_SEP}<a class="nav" href="{U_ALBUM}">{L_ALBUM}</a>{NAV_CAT_DESC_SECOND}</span></td>
<!-- BEGIN show_permissions -->
<td align="right" valign="middle"><span class="gensmall"><a href="javascript:ShowHideLayer('info_open','info_close');"><img src="{TABS_LESS_IMG}" alt="-" align="middle" border="0" /></a></span></td>
<!-- END show_permissions -->
</tr>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td style="margin:0; padding: 0;" colspan="2">
<table border="0" cellpadding="0" cellspacing="0" width="100%" id="info_close" style="display:none;">
<tbody>
<tr>
<td class="catBottom" colspan="2" height="28">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="middle" width="100%"><span class="nav"><a class="nav" href="{U_INDEX}">{L_INDEX}</a>{NAV_SEP}<a class="nav" href="{U_ALBUM}">{L_ALBUM}</a>{NAV_CAT_DESC_SECOND}</span></td>
<td align="right" valign="middle"><span class="gensmall"><a href="javascript:ShowHideLayer('info_open','info_close');"><img src="{TABS_MORE_IMG}" alt="+" align="middle" border="0" /></a>
</span></td>
</tr>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</table>

<form action="{S_JUMPBOX_ACTION}" method="get" name="jumpbox" onsubmit="if(document.jumpbox.f.value == -1){return false;}">
<table class="noprint" width="100%" border="0" cellspacing="2" cellpadding="0" align="center">
<tr>
<td align="left" valign="middle" nowrap="nowrap" {WIDTH_GALLERY}>
<span class="nav">
<!-- BEGIN switch_user_authpost -->
<a href="{U_POST_NEW_TOPIC}" rel="nofollow"><img src="{POST_IMG}" id="{POST_IMG_ID}Newtopic" alt="{L_POST_NEW_TOPIC}" align="middle" border="0" /></a>
<!-- END switch_user_authpost -->
<!-- BEGIN switch_user_authreply -->
<a href="{U_POST_REPLY_TOPIC}"><img src="{REPLY_IMG}" alt="{L_POST_REPLY_TOPIC}" align="middle" border="0" /></a>
<!-- END switch_user_authreply -->
</span>
</td>
<!-- BEGIN viewtopic_bottom -->
<td align="right" nowrap="nowrap"><span class="gensmall">{L_JUMP_TO}: {S_JUMPBOX_SELECT} <input class="liteoption" type="submit" value="{L_GO}" /></span></td>
<!-- END viewtopic_bottom -->
<!-- BEGIN moderation_panel -->
<td align="center">
<span class="gensmall">{moderation_panel.U_YOUR_PERSONAL_MODERATE}</span>
</td>
<td align="center" width="250">
<span class="gensmall"> </span>
</td>
<!-- END moderation_panel -->
</tr>
</table>
</form>

<!-- BEGIN viewtopic_bottom -->
<table class="noprint" width="100%" border="0" cellspacing="2" cellpadding="0" align="center">
<tr>
<td colspan="2" align="left" valign="top" nowrap="nowrap"><br />{S_TOPIC_ADMIN}<br />
<form name="action" method="get" action="{S_FORM_MOD_ACTION}">
<input type="hidden" name="t" value="{TOPIC_ID}" />
<input type="hidden" name="sid" value="{S_SID}" />
<span class="gen">{L_MOD_TOOLS}<br />{S_SELECT_MOD} <input class="liteoption" type="submit" value="{L_GO}" /></span>
</form>
</td>
<td colspan="2" align="center" valign="top" nowrap="nowrap">

<script>
        function generatee() {
        if(document.getElementById('fina').value == '') {
        document.getElementById('fina').value = document.getElementById('mensage').value;
        } else {
        document.getElementById('fina').value = document.getElementById('fina').value +'\n'+ document.getElementById('mensage').value;
        }
        }
       
        </script>
       
       
        <select id="mensage">
       
        <option value="[table class='presentation' align='center' border='0' cellspacing='0' cellpadding='0'][tr][td]
        Bonjour, Pour le bon déroulement du forum et pour améliorer l'esprit de convivialité, veuillez vous présenter afin que la communauté puisse vous connaitre.<br> Merci de votre compréhension.[/td][/tr][/table]">Demande de présentation</option>
 
            <option value="[table class='charte' align='center' border='0' cellspacing='0' cellpadding='0'][tr][td]
      Ce topic étant contraire à la charte régissant ce forum, nous nous voyons dans l'obligation de le fermer. <br>Merci de votre compréhension.[/td][/tr][/table]">Message hors charte</option>
 
        <option value="[table class='titre' align='center' border='0' cellspacing='0' cellpadding='0'][tr][td]
      Afin de favoriser les recherches ultérieures sur le forum, merci :<br>- De mettre un titre explicite (qui explique plus simplement le problème)<br>- De retirer les Majuscules si nécessaire.<br>Pour cela, cliquez sur le bouton "éditer" de votre 1er message
N'oubliez pas que d'autres personnes peuvent profiter de vos questions. Il est donc impératif afin de faciliter l'utilisation de l'outil recherche d'avoir des titres de sujet explicatifs.Merci de votre compréhension[/td][/tr][/table]">Modification du titre du sujet</option>

        <option value="[table class='verou' align='center' border='0' cellspacing='0' cellpadding='0'][tr][td]
      Le sujet a été verrouillé par l'équipe du forum.Raison :  [/td][/tr][/table]">Verouillage de sujet</option>
       
        </select>
       
        <div class="center"><input class="liteoption" type="button" name="submit" value="Générer le code" onclick="generatee();"> <input class="liteoption" type="button" name="submit" value="Effacer" onclick="document.getElementById('fina').value = '';"></div>       
       
        <div class="post row2" style="padding: 6px; margin-top: 6px;"><dl class="codebox"><dt><span class="gen">Code du message de modération :</span> (<a href="javascript: document.getElementById('fina').select();"><span class="gen">Tout sélectionner</span></a>)</dt><dd><textarea class="inputbox" style="border: none; background-color: white; padding: 4px; width: 100%; margin: 0 auto;" id="fina"></textarea></dd></dl></div> 
</td>
</tr>
</table>
<!-- END viewtopic_bottom -->

<!-- BEGIN switch_image_resize -->
<script type="text/javascript">
//<![CDATA[
$(resize_images({ 'selector' : '.postbody', 'max_width' : {switch_image_resize.IMG_RESIZE_WIDTH}, 'max_height' : {switch_image_resize.IMG_RESIZE_HEIGHT} }));
//]]>
</script>
<!-- END switch_image_resize -->
<script type="text/javascript" src="{JS_DIR}addthis/addthis_widget.js?pub=forumotion"></script>

<script type="text/javascript">
jQuery(document).ready(function(){
    if(jQuery('div#other.select').length==1)
    {
        if(jQuery('div#other.select :last').attr('tagName')=='BUTTON') jQuery('div#other.select').append('<br>');
        var g= '"'; var gg= '\'+unescape(\'%22\')+\'';
        jQuery('div#other.select').append('<button onclick='+g+'bbfontstyle(\'<p class='+gg+'xata'+gg+'>\',\'</p>\');selectWysiwyg(this,\'other\');return false'+g+'>xata</button>');
    }
});
</script>


<script type="text/javascript">
jQuery(document).ready(function(){
    if(jQuery('div#other.select').length==1)
    {
        if(jQuery('div#other.select :last').attr('tagName')=='BUTTON') jQuery('div#other.select').append('<br>');
        var g= '"'; var gg= '\'+unescape(\'%22\')+\'';
        jQuery('div#other.select').append('<button onclick='+g+'bbfontstyle(\'<p class='+gg+'hydra'+gg+'>\',\'</p>\');selectWysiwyg(this,\'other\');return false'+g+'>hydra</button>');
    }
});
</script>


<script type="text/javascript">
jQuery(document).ready(function(){
    if(jQuery('div#other.select').length==1)
    {
        if(jQuery('div#other.select :last').attr('tagName')=='BUTTON') jQuery('div#other.select').append('<br>');
        var g= '"'; var gg= '\'+unescape(\'%22\')+\'';
        jQuery('div#other.select').append('<button onclick='+g+'bbfontstyle(\'<p class='+gg+'moderation'+gg+'>\',\'</p>\');selectWysiwyg(this,\'other\');return false'+g+'>moderation</button>');
    }
});
</script>
MessageSujet: Re: Javascript fonctionnel mais avec un petit soucis. Résolu . Un très grand MERCIi KIwi    Javascript fonctionnel mais avec un petit soucis.  Résolu . Un très grand MERCIi KIwi  EmptySam 31 Mar 2012, 19:24
Revenir en haut Aller en bas
Kiwi
Kiwi
{ Membre }
{ Membre }

Féminin Messages : 142



Javascript fonctionnel mais avec un petit soucis.  Résolu . Un très grand MERCIi KIwi  Empty
C'est la folie dis donc o/ Ca met la pression, faut que je sois à la hauteur Cool

Vas-y, essaye donc avec ceci Very Happy Comme la fois précédente, j'ai changé le chemin dans la structure du document pour accéder au contenu du message.

Code:
<script>
var inn = '['+'b]';
var outt = '['+'/b], ';
var inn1 = '[quote="';
var inn2 = '"]';
var outt1 = '['+'/quote]';
var txt = '';
sch = document.getElementsByTagName("img");
ix = 0;
namesch = document.getElementsByTagName("span");
ixis = 0;
while(sch[ix]){
  if (sch[ix].className == "i_icon_quote"){
      sch[ix].parentNode.href="#bottom";
      sch[ix].parentNode.onclick = function() {
        if (document.getSelection) {
            txt=document.getSelection();
        }
        else if (document.selection) {
            txt=document.selection.createRange().text;
        }
        if (txt == '') {
            txt = this.parentNode.parentNode.parentNode.childNodes[3].firstChild.firstChild.childNodes[1].innerHTML;
        }
        rtx = this.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.getElementsByTagName("span");
        ixi = 0;
        while(rtx[ixi]){
            if (rtx[ixi].className == "name"){
              conts = rtx[ixi].getElementsByTagName("a")[1].innerHTML.substring(0,1);
              if (conts != "<"){
                  document.post.message.value += inn1 + rtx[ixi].getElementsByTagName("a")[1].innerHTML + inn2 + txt + outt1;
              }
              else {
                  document.post.message.value += inn1 + rtx[ixi].getElementsByTagName("a")[1].getElementsByTagName("strong")[0].innerHTML + inn2 + txt + outt1;
              }
            }
            ixi++
        }
        txt = '';
      }
  }
ix++
}
while(namesch[ixis]){
  if (namesch[ixis].className == "name"){
      namesch[ixis].getElementsByTagName("a")[1].href = "#bottom";
      namesch[ixis].getElementsByTagName("a")[1].onclick = function() {
        conts = this.innerHTML.substring(0,1);
        if (conts != "<"){
            document.post.message.value += inn + this.innerHTML + outt;
        }
        else {
            document.post.message.value += inn + this.getElementsByTagName("strong")[0].innerHTML + outt;
        }
      }
  }
  ixis++
}
</script>

Par contre, si tu modifies viewtopic_body, le code risque de ne pas fonctionner tout à fait, je peux te faire quelque chose de plus générique ensuite si tu veux ^^ Mais ça attendra demain, je file me coucher. En tout cas, dans l'immédiat, ça devrait fonctionner Very Happy

Kiwi
MessageSujet: Re: Javascript fonctionnel mais avec un petit soucis. Résolu . Un très grand MERCIi KIwi    Javascript fonctionnel mais avec un petit soucis.  Résolu . Un très grand MERCIi KIwi  EmptySam 31 Mar 2012, 19:38
Revenir en haut Aller en bas
Invité
Invité




Javascript fonctionnel mais avec un petit soucis.  Résolu . Un très grand MERCIi KIwi  Empty
Kiwi , que dire si ce n'est Génial, ça fonctionne du tonnerre Paix Javascript fonctionnel mais avec un petit soucis.  Résolu . Un très grand MERCIi KIwi  3933776953 Javascript fonctionnel mais avec un petit soucis.  Résolu . Un très grand MERCIi KIwi  3933776953 Javascript fonctionnel mais avec un petit soucis.  Résolu . Un très grand MERCIi KIwi  3933776953
Monsieur Javascript fonctionnel mais avec un petit soucis.  Résolu . Un très grand MERCIi KIwi  2931871781 Javascript fonctionnel mais avec un petit soucis.  Résolu . Un très grand MERCIi KIwi  2931871781 Javascript fonctionnel mais avec un petit soucis.  Résolu . Un très grand MERCIi KIwi  2931871781 Je suis votre obligé

Un grand, très grand merci Kiwi car, je vous avouerai que ce script ma fait vraiment tourner en bourrique durant de nombreuses heures Embarassed
MessageSujet: Re: Javascript fonctionnel mais avec un petit soucis. Résolu . Un très grand MERCIi KIwi    Javascript fonctionnel mais avec un petit soucis.  Résolu . Un très grand MERCIi KIwi  EmptySam 31 Mar 2012, 20:20
Revenir en haut Aller en bas
Psycho
Psycho
Psychopathe
Psychopathe

Féminin Messages : 3407



Javascript fonctionnel mais avec un petit soucis.  Résolu . Un très grand MERCIi KIwi  Empty
    Hello (:
    Je vois que le problème est résolu, par conséquent je classe (:
    Si tu as d'autres questions fascicularia, n'hésite pas !
MessageSujet: Re: Javascript fonctionnel mais avec un petit soucis. Résolu . Un très grand MERCIi KIwi    Javascript fonctionnel mais avec un petit soucis.  Résolu . Un très grand MERCIi KIwi  EmptyDim 01 Avr 2012, 08:33
Revenir en haut Aller en bas
Contenu sponsorisé




Javascript fonctionnel mais avec un petit soucis.  Résolu . Un très grand MERCIi KIwi  Empty
MessageSujet: Re: Javascript fonctionnel mais avec un petit soucis. Résolu . Un très grand MERCIi KIwi    Javascript fonctionnel mais avec un petit soucis.  Résolu . Un très grand MERCIi KIwi  Empty
Revenir en haut Aller en bas
 

Javascript fonctionnel mais avec un petit soucis. Résolu . Un très grand MERCIi KIwi

Voir le sujet précédent Voir le sujet suivant Revenir en haut 
Page 1 sur 1

 Sujets similaires

-
» Petit soucis de de bouton... [résolu]
» Petit soucis avec les liens
» Petit soucis avec le qui es en ligne.
» Un petit soucis avec mes colonnes ^^"
» Un petit soucis de couleur avec mon qeel

Permission de ce forum:Vous ne pouvez pas répondre aux sujets dans ce forum
CSSActif :: De la théorie à la pratique :: Aide CSS & xHTML :: Problèmes résolus-

Partenaires Or


← Page précédente   ↑ Aller en haut Copyright © CSSActif 2009 - 2013 Tous droits réservés
Créer un forum | ©phpBB | Forum gratuit d'entraide | Signaler un abus | Forum gratuit