Simple Machines Community Forum

SMF Support => Language Specific Support => Français (French) => Aiheen aloitti: Vant@ge - elokuu 08, 2009, 04:27:01 IP

Otsikko: Mettre 1 Lien retour vers WebRankInfo et DicoduNet dans l'index.template
Kirjoitti: Vant@ge - elokuu 08, 2009, 04:27:01 IP
Salut, je veux référencer mon forum sur webrankinfo.com et dicodunet.
lors de l'inscription de mon forum, Webrankinfo.com me donne le code suivant à intégrer à mon forum:

<p>Ce site est listé dans la catégorie <a href="http://www.webrankinfo.com/annuaire/cat-3-informatique.htm">
Informatique</a> :
<a href="http://www.webrankinfo.com/annuaire/cat-99-materiel-informatique.htm">
Matériel informatique</a> de l'annuaire <a href="http://www.webrankinfo.com/"><img src="http://www.webrankinfo.com/images/wri/webrankinfo-80-15.png" title="WebRankInfo" alt="Blog referencement" /></a> et <a href="http://www.dicodunet.com/actualites/"> <img src="http://www.webrankinfo.com/images/dicodunet-80-15.png" title="DicoDuNet" alt="Les actualités du Dicodunet" /></a>
</p>


je pense qu'il faut intégrer ceci dans index.template.php au niveau des lignes correspondantes au bas de page.

voila le code de bas de page de mon forum:


function template_main_below()
{
   global $context, $settings, $options, $scripturl, $txt;

   echo '
   </div>';

   // Show the "Powered by" and "Valid" logos, as well as the copyright. Remember, the copyright must be somewhere!
   echo '

   <div id="footerarea" style="text-align: center; padding-bottom: 1ex;', $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' width: 100%;' : '', '">
      <script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
         function smfFooterHighlight(element, value)
         {
            element.src = smf_images_url + "/" + (value ? "h_" : "") + element.id + ".gif";
         }
      // ]]></script>
      <table cellspacing="0" cellpadding="3" border="0" align="center" width="100%">
         <tr>
            <td width="28%" valign="middle" align="', !$context['right_to_left'] ? 'right' : 'left', '">
               <a href="http://www.mysql.com/" target="_blank"><img id="powered-mysql" src="', $settings['images_url'], '/powered-mysql.gif" alt="', $txt['powered_by_mysql'], '" width="54" height="20" style="margin: 5px 16px;" onmouseover="smfFooterHighlight(this, true);" onmouseout="smfFooterHighlight(this, false);" /></a>
               <a href="http://www.php.net/" target="_blank"><img id="powered-php" src="', $settings['images_url'], '/powered-php.gif" alt="', $txt['powered_by_php'], '" width="54" height="20" style="margin: 5px 16px;" onmouseover="smfFooterHighlight(this, true);" onmouseout="smfFooterHighlight(this, false);" /></a>
            </td>
            <td valign="middle" align="center" style="white-space: nowrap;">
               ', theme_copyright(), '
               <br/><br/>
               <span class="smalltext">'. $settings['custom_copyright'] . '</span>
            </td>
            <td width="28%" valign="middle" align="', !$context['right_to_left'] ? 'left' : 'right', '">
               <a href="http://validator.w3.org/check/referer" target="_blank"><img id="valid-xhtml10" src="', $settings['images_url'], '/valid-xhtml10.gif" alt="', $txt['valid_xhtml'], '" width="54" height="20" style="margin: 5px 16px;" onmouseover="smfFooterHighlight(this, true);" onmouseout="smfFooterHighlight(this, false);" /></a>
               <a href="http://jigsaw.w3.org/css-validator/check/referer" target="_blank"><img id="valid-css" src="', $settings['images_url'], '/valid-css.gif" alt="', $txt['valid_css'], '" width="54" height="20" style="margin: 5px 16px;" onmouseover="smfFooterHighlight(this, true);" onmouseout="smfFooterHighlight(this, false);" /></a>
               <span style="float:right; margin-right:10px; font-size:70%;"><b>Dilber MC</b> Theme by <b><a href="http://www.harzem.com/themes/themes.php?theme=dilbermc;color=', $settings['theme_main_color'], '" target="_blank">HarzeM</a></b></span>               
            </td>
         </tr>
      </table>';
                   
      // Show the load time?
   if ($context['show_load_time'])
      echo '
      <span class="smalltext">', $txt['smf301'], $context['load_time'], $txt['smf302'], $context['load_queries'], $txt['smf302b'], '</span>';

   // This is an interesting bug in Internet Explorer AND Safari. Rather annoying, it makes overflows just not tall enough.
   if (($context['browser']['is_ie'] && !$context['browser']['is_ie4']) || $context['browser']['is_mac_ie'] || $context['browser']['is_safari'] || $context['browser']['is_firefox'])
   {
      // The purpose of this code is to fix the height of overflow: auto div blocks, because IE can't figure it out for itself.
      echo '
      <script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[';

      // Unfortunately, Safari does not have a "getComputedStyle" implementation yet, so we have to just do it to code...
      if ($context['browser']['is_safari'])
         echo '
         window.addEventListener("load", smf_codeFix, false);

         function smf_codeFix()
         {
            var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");

            for (var i = 0; i < codeFix.length; i++)
            {
               if ((codeFix[i].className == "code" || codeFix[i].className == "post" || codeFix[i].className == "signature") && codeFix[i].offsetHeight < 20)
                  codeFix[i].style.height = (codeFix[i].offsetHeight + 20) + "px";
            }
         }';
      elseif ($context['browser']['is_firefox'])
         echo '
         window.addEventListener("load", smf_codeFix, false);
         function smf_codeFix()
         {
            var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");

            for (var i = 0; i < codeFix.length; i++)
            {
               if (codeFix[i].className == "code" && (codeFix[i].scrollWidth > codeFix[i].clientWidth || codeFix[i].clientWidth == 0))
                  codeFix[i].style.overflow = "scroll";
            }
         }';
      else
         echo '
         var window_oldOnload = window.onload;
         window.onload = smf_codeFix;

         function smf_codeFix()
         {
            var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");

            for (var i = codeFix.length - 1; i > 0; i--)
            {
               if (codeFix[i].currentStyle.overflow == "auto" && (codeFix[i].currentStyle.height == "" || codeFix[i].currentStyle.height == "auto") && (codeFix[i].scrollWidth > codeFix[i].clientWidth || codeFix[i].clientWidth == 0) && (codeFix[i].offsetHeight != 0 || codeFix[i].className == "code"))
                  codeFix[i].style.height = (codeFix[i].offsetHeight + 36) + "px";
            }

            if (window_oldOnload)
            {
               window_oldOnload();
               window_oldOnload = null;
            }
         }';

      echo '
      // ]]></script>';
   }

   echo '
   </div>
   ',($context['browser']['is_ie']) ? '</td></tr></table>' : '</div>' , '
   </div>';
   // The following will be used to let the user know that some AJAX process is running
   echo '
   <div id="ajax_in_progress" class="ajax_in_progress" style="display: none;', $context['browser']['is_ie'] && !$context['browser']['is_ie7'] ? 'position: absolute;' : '', '">', $txt['ajax_in_progress'], '</div>
</body></html>';
}


Pourriez vous m'aider à intégrer le code que me fourni webrankinfo ?
Merci d'avance
Otsikko: Re: Mettre 1 Lien retour vers WebRankInfo et DicoduNet dans l'index.template
Kirjoitti: maximus23 - elokuu 08, 2009, 04:55:41 IP
Bonsoir,

Tu inséres ton code avant :
     // Show the load time?

Puis tu mets Echo ' ton code et tu termines par ';
Otsikko: Re: Mettre 1 Lien retour vers WebRankInfo et DicoduNet dans l'index.template
Kirjoitti: Vant@ge - elokuu 08, 2009, 06:41:57 IP
Merci beaucoup, je vais tester immédiatement.
Je te tiens au courant.
Otsikko: Re: Mettre 1 Lien retour vers WebRankInfo et DicoduNet dans l'index.template
Kirjoitti: Vant@ge - elokuu 08, 2009, 06:45:46 IP
est ce bien ainsi qu'il faut le mettre:   ?

Echo '
              <p>Ce site est listé dans la catégorie <a href="http://www.webrankinfo.com/annuaire/cat-3-informatique.htm">
Informatique</a> :
<a href="http://www.webrankinfo.com/annuaire/cat-99-materiel-informatique.htm">
Matériel informatique</a> de l'annuaire <a href="http://www.webrankinfo.com/"><img src="http://www.webrankinfo.com/images/wri/webrankinfo-80-15.png" title="WebRankInfo" alt="Blog referencement" /></a> et <a href="http://www.dicodunet.com/actualites/"> <img src="http://www.webrankinfo.com/images/dicodunet-80-15.png" title="DicoDuNet" alt="Les actualités du Dicodunet" /></a>
</p>';     
      // Show the load time?


Lorsque je met ça ainsi, j'ai un message d'erreur en rouge m'indiquant ceci:

Le fichier que vous tentiez de sauvegarder a généré l'erreur suivante :
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in index.template.php on line 508
Otsikko: Re: Mettre 1 Lien retour vers WebRankInfo et DicoduNet dans l'index.template
Kirjoitti: maximus23 - elokuu 08, 2009, 11:24:54 IP
Bonjour,

Normal quand tu as une apostrophe tu dois lui adjoindre une séquence d'échappement :)

echo '
            <p>Ce site est listé dans la catégorie <a href="http://www.webrankinfo.com/annuaire/cat-3-informatique.htm">
Informatique</a> :
<a href="http://www.webrankinfo.com/annuaire/cat-99-materiel-informatique.htm">
Matériel informatique</a> de l\'annuaire <a href="http://www.webrankinfo.com/"><img src="http://www.webrankinfo.com/images/wri/webrankinfo-80-15.png" title="WebRankInfo" alt="Blog referencement" /></a> et <a href="http://www.dicodunet.com/actualites/"> <img src="http://www.webrankinfo.com/images/dicodunet-80-15.png" title="DicoDuNet" alt="Les actualités du Dicodunet" /></a>
</p>';
     
Otsikko: Re: Mettre 1 Lien retour vers WebRankInfo et DicoduNet dans l'index.template
Kirjoitti: Vant@ge - elokuu 09, 2009, 03:14:01 IP
Désolé, je suis vraiment un noob, mais c'est quoi une séquence d'échappement ?

Merci pour ton aide précieuse
Otsikko: Re: Mettre 1 Lien retour vers WebRankInfo et DicoduNet dans l'index.template
Kirjoitti: maximus23 - elokuu 09, 2009, 03:16:17 IP
Bonsoir,

c'est un anti-slasch :) Le code que je t'ai mis est corrigé tu le mets tel que et cela doit être bon :)

Otsikko: Re: Mettre 1 Lien retour vers WebRankInfo et DicoduNet dans l'index.template
Kirjoitti: Vant@ge - elokuu 09, 2009, 03:20:51 IP
Merci énormément, ça fonctionne à merveille maintenant :D

Il va vraiment falloir que j'en apprenne un maximum sur les codes.

Merci encore pour ton aide préciseuse.

A+ et bonne continuation
Otsikko: Re: Mettre 1 Lien retour vers WebRankInfo et DicoduNet dans l'index.template
Kirjoitti: maximus23 - elokuu 09, 2009, 03:43:09 IP
Bonsoir,

Pas de problèmes quand tu veux sur le forum :)