|
Publicité ' | |||||||||||||||||||||||
|
|
#1 |
|
Invité de passage
![]() Inscription : mars 2010 Messages : 11 ![]() |
Bonjour, mon problème est simple. Le xml de la génération d'une page donne à chaque fois ceci :
Code :
<a href="http://www.magic-recettes.com/cuisine/desserts-glaces-creme-glacee-au-caramel-et-beurre-sale/803/17427.asp?xtor=EPR-41" style="font-weight: bold; color: rgb(102, 102, 102); text-decoration: none;" title="Magic recettes"> Il y a plusieurs xtor dans la page donc je n'aimerai changer que celui-ci. La valeur du title est toujours la même : je pensais donc baser ma regex dessus, en faisant un truc du style : Code :
if(preg_match('#title="Magic recettes"#',$lc_contents)) { ... } Code :
$lc_contents=str_replace ('EPR-36','EPR-41', $lc_contents); Comment faire ? Merci beaucoup de votre aide ... |
|
|
00
|
|
|
#2 |
|
Membre éprouvé
![]() Étudiant Inscription : avril 2011 Messages : 317 ![]() |
Bonjour,
Peux-tu donner le code complet de la page s'il te plait ? |
|
|
00
|
|
|
#3 |
|
Membre Expert
![]() Baptiste ROUSSELÉtudiant Inscription : janvier 2011 Messages : 802 ![]() |
Parser du XML => SimpleXML (parmi tant d'autres)
Puis XPath pour trouver le bon node. Et modification du node comme on modifierai une variable.
__________________
|
|
|
00
|
|
|
#4 |
|
Invité de passage
![]() Inscription : mars 2010 Messages : 11 ![]() |
Le code source en soit est un peu long ...
Mais si tu veux : <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15"> <title>Soldes spécial Grossesse > Fermeture maternité > Prénoms de cinéma</title> </head> <body bgcolor="#ffffff"> <table width="600" align="center" border="0" cellpadding="0" cellspacing="0"> <tbody><tr> <td align="center"><span class="mirroir" style="font-family: arial; font-size: 10px; color: #000000; text-align: center;">Pour être certain de recevoir cette newsletter, ajoutez l'adresse<br> d'expédition <u><a href="mailto:info@e.magicmaman.com" target="_blank" class="lien" style="font-family: arial; color: #000000; font-size: 10px; text-decoration: none;">info@e.magicmaman.com</a></u> à votre carnet d'adresse.<br><%@ include view="mirrorPageMMGrossesse" %></span></td> </tr> </tbody></table> <table style="border: 2px solid rgb(221, 132, 178);" width="612" align="center" bordercolor="#DE86B5" cellpadding="0" cellspacing="0"> <tbody><tr> <td width="613"> <table width="612" align="center" border="0" cellpadding="0" cellspacing="0"> <tbody><tr> <td width="213"><img src="http://img.magicmaman.com/mailing/magicmaman/dk/infolettres/grossesse/HeaderMM.gif" alt="" width="213" height="81"></td> <td width="80"> </td> <td width="319"><span style="font-family:Arial, Helvetica, sans-serif; font-size:10px; color:#393442">Vos informations de connexion à Magicmaman. com : <br>Identifiant : <strong><span style="font-size:11px"><%= user.comp.DTM_PSEUDO %></span></strong><br> <br> Modifier mes informations personnelles : <strong><span style="font-size:11px"><a href="http://www.magicmaman.com/direct/membre/connect?emailAddress=<%= user.recipient.email %>&authenticationKey=<%= user.comp.autoconnectmd5 %>&redirectURL=http://www.magicmaman.com/membre/profil&xtor=EPR-41" target="_blank" style="color:#393442" title="Modifier mes informations personnelles">Cliquez ici</a></span></strong></span></td> </tr> <tr> <td colspan="3" alt="" height="43"><table width="612" border="0" cellpadding="0" cellspacing="0"> <tbody><tr> <td width="10"> </td> <td width="81"><a href="http://www.magicmaman.com/actualite.php?rubrique=2218&xtor=EPR-41" border="0" title="Actualités"><img style="display: inline;" src="http://img.magicmaman.com/mailing/magicmaman/dk/infolettres/grossesse/menu_01.jpg" alt="Actualités" title="Actualités" width="81" border="0" height="45"></a></td> <td width="86"><a href="http://www.magicmaman.com/grossesse-accouchement-naissance,34.asp2?xtor=EPR-41" border="0" title="Grossesse"><img style="display: inline;" src="http://img.magicmaman.com/mailing/magicmaman/dk/infolettres/grossesse/menu_02.jpg" alt="grossesse" title="Grossesse" width="86" border="0" height="45"></a></td> <td width="98"><a href="http://www.magicmaman.com/bebe-nourrisson-eveil-parents,38.asp2?xtor=EPR-41" border="0" title="Bébé"><img style="display: inline;" src="http://img.magicmaman.com/mailing/magicmaman/dk/infolettres/grossesse/menu_03.jpg" alt="Bébé 0-3 ans" title="Bébé 0-3 ans" width="98" border="0" height="45"></a></td> <td width="65"><a href="http://forum.magicmaman.com/?xtor=EPR-41" border="0" title="Forums"><img style="display: inline;" src="http://img.magicmaman.com/mailing/magicmaman/dk/infolettres/grossesse/menu_04.jpg" alt="forums" title="forums" width="65" border="0" height="45"></a></td> <td width="53"><a href="http://blog.magicmaman.com/" border="0" title="Blogs"><img style="display: inline;" src="http://img.magicmaman.com/mailing/magicmaman/dk/infolettres/grossesse/menu_05.jpg" alt="Blogs" title="Blogs" width="53" border="0" height="45"></a></td> <td width="65"><a href="http://photo.magicmaman.com/" border="0"><img style="display: inline;" src="http://img.magicmaman.com/mailing/magicmaman/dk/infolettres/grossesse/menu_06.jpg" alt="albums" title="albums" width="65" border="0" height="45"></a></td> <td style="font-family:Arial, Helvetica, sans-serif; font-size:10px; color:#393442" width="184"> </td> </tr> </tbody></table> <table class="box-content box-Edito action-new action-state action-edit" width="612" align="center" border="0" cellpadding="0" cellspacing="0"> <tbody><tr> <td class="resume-1" style="padding: 10px; font-family: Arial; font-size: 12px;">Magicmaman est heureuse de vous annoncer l'arrivée de sa nouvelle page d'accueil et ses rubriques Femme et Santé. Bon surf et bonne année!</td> </tr> </tbody></table></td> </tr> <tr> <td colspan="3"> <table class="box-content box-Edito action-new action-state action-edit" width="600" align="center" border="0" cellpadding="0" cellspacing="0"> <tbody><tr> <td class="resume-1" style="padding: 10px; font-family: Arial; font-size: 12px;"></td> </tr> </tbody></table> </td> </tr> </tbody></table> <table class="box-content action-edit box-OnEnParle action-state action-new action-database action-element-add action-element-remove" style="border: 1px solid rgb(221, 132, 178); background-color: rgb(221, 132, 178);" width="612" align="center" bgcolor="#dd84b2" border="0" cellpadding="0" cellspacing="0" height="197"> <tbody><tr> <td style="border: 10px solid rgb(221, 132, 178);" align="center" bgcolor="#dd84b2"> <a href="http://www.magicmaman.com/,bailler-dans-le-ventre-de-sa-mere-est-important,2220,1226381.asp?xtor=EPR-41" target="_blank" class="lien-1" style="font-size: 14px; font-weight: bold; color: rgb(58, 54, 68); text-decoration: none;" title=""><img src="http://www.magicmaman.com/mm_edito/upload/7d951993b2frgb600.jpg" alt="On en parle cette semaine" class="img-1" style="border: 1px solid rgb(255, 255, 255);" title="On en parle cette semaine" width="181" border="0" height="180"></a> </td> <td> <table style="border-style: solid; border-color: rgb(221, 132, 178); border-width: 10px 3px 10px 0px; background-color: rgb(255, 255, 255);" width="394" align="center" bgcolor="#dd84b2" border="0" cellpadding="0" cellspacing="0" height="180"> <tbody><tr height="180"> <td class="element-clone-zone element-clone-zone-1" style="border: 1px solid rgb(255, 255, 255); font-family: Arial; color: rgb(221, 132, 178);" height="180"> <span style="font-size: 18px; font-weight: bold; color: rgb(58, 54, 68);">ON EN PARLE CETTE SEMAINE</span><br><br> <span class="element-clone"> <a href="http://www.magicmaman.com/,bailler-dans-le-ventre-de-sa-mere-est-important,2220,1226381.asp?xtor=EPR-41" target="_blank" class="lien-1" style="font-size: 14px; font-weight: bold; color: rgb(58, 54, 68); text-decoration: none;" title="">%u2022 <span class="resume-1">Les bienfaits du bâillement de Bébé...dans votre ventre!</span></a> <br> </span> <span class="element-clone"> <a href="http://www.magicmaman.com/,nouvelle-fermeture-de-maternite,2224,1226398.asp?xtor=EPR-41" target="_blank" class="lien-2" style="font-size: 14px; font-weight: bold; color: rgb(58, 54, 68); text-decoration: none;" title="">%u2022 <span class="resume-2">Une énième fermeture de maternité. </span></a> <br> </span> <span class="element-clone"> <a href="http://www.magicmaman.com/,celine-dion-enceinte-de-jumeaux-ce-sont-deux-garcons,2226,1226373.asp?xtor=EPR-41" target="_blank" class="lien-3" style="font-size: 14px; font-weight: bold; color: rgb(58, 54, 68); text-decoration: none;" title="">%u2022 <span class="resume-3">Céline Dion attend...des garçons !</span></a> <br> </span> </td> </tr> </tbody></table> </td> </tr> </tbody></table> <table width="584" align="center" cellpadding="0" cellspacing="0" height="342"> <tbody><tr> <td style="padding-left: 10px; width: 288px;" width="298" bgcolor="#f9f8f6" height="252"> <table width="288" align="center" border="0" cellpadding="0" cellspacing="0" height="5"> <tbody><tr> <td style="font-size: 5px;"> </td> </tr> </tbody></table> <table width="288" align="center" border="0" cellpadding="0" cellspacing="0"> <tbody><tr> <td style="font-size: 18px; font-weight: bold; color: rgb(58, 54, 68); font-family: Arial;"> ZOOM SUR </td> </tr> </tbody></table> <table width="288" align="center" border="0" cellpadding="0" cellspacing="0" height="5"> <tbody><tr> <td style="font-size: 5px;"> </td> </tr> </tbody></table> <table class="box-content action-state box-Zoom action-move action-new action-database action-clone" style="border: 1px solid rgb(202, 202, 202); font-size: 18px; font-weight: bold; color: rgb(58, 54, 68); font-family: Arial;" width="288" bgcolor="white" border="0" cellpadding="0" cellspacing="0"> <tbody><tr> <td height="74"> <a href="http://www.magicmaman.com/,de-l-energie-au-coeur-de-l-hiver,81,5321.asp?xtor=EPR-41" target="_blank" class="lien-1" style="font-size: 14px; font-weight: bold; color: #13ACBE; text-decoration: none;" border="0" title=""><img class="img-1" style="border: 6px solid rgb(255, 255, 255);" src="http://www.magicmaman.com/mm_edito/250/7da61db015be_268.jpg" alt="" title="" width="60" border="0" height="60"></a> </td> <td style="font-size: 11px; font-weight: bold; color: rgb(58, 54, 68); font-family: Arial; padding-top: 5px; padding-left: 5px;" valign="middle" height="74"> <a href="http://www.magicmaman.com/,les-prenoms-cinematographiques,2094,1225629.asp?xtor=EPR-41" target="_blank" class="lien-1" style="font-size: 14px; font-weight: bold; color: rgb(221, 132, 178); text-decoration: none;" title=""><span class="titre-1">Comme au cinéma...</span></a><br> <span class="resume-1" style="padding-bottom: 5px;">Un prénom qui a marqué l'Histoire du cinéma pour votre tout petit ? C'est par ici !</span> </td> </tr> </tbody></table> <table width="288" border="0" cellpadding="0" cellspacing="0" height="5"> <tbody><tr> <td style="font-size: 5px;"> </td> </tr> </tbody></table> <table class="box-content action-state box-Zoom action-move action-new action-database action-clone" style="border: 1px solid rgb(202, 202, 202); font-size: 18px; font-weight: bold; color: rgb(58, 54, 68); font-family: Arial;" width="288" bgcolor="white" border="0" cellpadding="0" cellspacing="0"> <tbody><tr> <td height="74"><a href="http://www.magicmaman.com/,de-l-energie-au-coeur-de-l-hiver,81,5321.asp?xtor=EPR-41" target="_blank" class="lien-1" style="font-size: 14px; font-weight: bold; color: #13ACBE; text-decoration: none;" border="0" title=""><img class="img-1" style="border: 6px solid rgb(255, 255, 255);" src="http://www.magicmaman.com/mm_edito/250/7d961ab3310es_048.jpg" alt="" title="" width="60" border="0" height="60"></a></td> <td style="font-size: 11px; font-weight: bold; color: rgb(58, 54, 68); font-family: Arial; padding-top: 5px; padding-left: 5px;" valign="middle" height="74"> <a href="http://www.magicmaman.com/,emotion de la 1ere echographie,364,1135936.asp?xtor=EPR-41" target="_blank" class="lien-1" style="font-size: 14px; font-weight: bold; color: rgb(221, 132, 178); text-decoration: none;" title=""><span class="titre-1">Soldes spécial grossesse</span></a><br> <span class="resume-1" style="padding-bottom: 5px;">Le meilleur des prix soldés pour la garde-robe de la future maman.</span> </td> </tr> </tbody></table> <table width="288" border="0" cellpadding="0" cellspacing="0" height="5"> <tbody><tr> <td style="font-size: 5px;"> </td> </tr> </tbody></table> <table class="box-content action-state box-Zoom action-move action-new action-database action-clone" style="border: 1px solid rgb(202, 202, 202); font-size: 18px; font-weight: bold; color: rgb(58, 54, 68); font-family: Arial;" width="288" bgcolor="white" border="0" cellpadding="0" cellspacing="0"> <tbody><tr> <td height="74"><a href="http://www.magicmaman.com/,de-l-energie-au-coeur-de-l-hiver,81,5321.asp?xtor=EPR-41" target="_blank" class="lien-1" style="font-size: 14px; font-weight: bold; color: #13ACBE; text-decoration: none;" border="0" title=""><img class="img-1" style="border: 6px solid rgb(255, 255, 255);" src="http://www.magicmaman.com/mm_edito/250/7d9617e2330_7_121.jpg" alt="" title="" width="60" border="0" height="60"></a></td> <td style="font-size: 11px; font-weight: bold; color: rgb(58, 54, 68); font-family: Arial; padding-top: 5px; padding-left: 5px;" valign="middle" height="74"> <a href="http://www.magicmaman.com/,la-trousse-homeopathique-a-emporter-en-vacances,3118,1218426.asp?xtor=EPR-41" target="_blank" class="lien-1" style="font-size: 14px; font-weight: bold; color: rgb(221, 132, 178); text-decoration: none;" title=""><span class="titre-1">La trousse homéo des petits bobos</span></a><br> <span class="resume-1" style="padding-bottom: 5px;">Cet été, ayez toujours sur vous votre trousse homéopathique! </span> </td> </tr> </tbody></table> <table width="288" border="0" cellpadding="0" cellspacing="0" height="5"> <tbody><tr> <td style="font-size: 5px;"> </td> </tr> </tbody></table> </td> <td style="padding-top: 20px;" valign="middle" width="312" align="center" bgcolor="#f9f8f6"> <table class="box-content box-Pub action-new action-state" width="284" align="center" border="0" cellpadding="0" cellspacing="0" height="254"> <tbody><tr> <td align="center"> <a class="lien-1" href="http://www.smartadserver.com/call/cliccommand/2968620/5903/[timestamp]?" border="0"><img class="img-1" src="http://img.magicmaman.com/partenaire/lipikar/dk/mea/250x250.jpg" align="middle" border="0"></a> </td> </tr> </tbody></table> </td> </tr> <tr> <td colspan="2" style="padding-left: 10px;" bgcolor="#f9f8f6"> <table class="box-content action-state action-move action-new action-database action-clone" style="border: 1px solid rgb(202, 202, 202); font-size: 18px; font-weight: bold; color: rgb(58, 54, 68); font-family: Arial;" width="583" bgcolor="white" border="0" cellpadding="0" cellspacing="0"> <tbody><tr> <td height="59"> <a href="http://www.magicmaman.com/,de-l-energie-au-coeur-de-l-hiver,81,5321.asp?xtor=EPR-41" target="_blank" class="lien-1" style="font-size: 14px; font-weight: bold; color: #13ACBE; text-decoration: none;" border="0" title=""><img src="http://www.famili.fr/data/photos/F0/ventre-femme-enceinte.jpg" alt="" style="border: 6px solid rgb(255, 255, 255);" title="" width="60" border="0" height="60"></a> </td> <td style="font-size: 11px; font-weight: bold; color: rgb(58, 54, 68); font-family: Arial; padding-top: 5px; padding-left: 5px;" valign="middle" height="59"> <a href="http://www.magicmaman.com/concours-ventre-rond/default.asp?rubrique=3030&xtor=EPR-41" target="_blank" class="lien-1" style="font-size: 14px; font-weight: bold; color: rgb(58, 54, 68); text-decoration: none;" title=""><span class="titre-1">CONCOURS VENTRE ROND</span></a><br> <br> <span class="resume-1" style="padding-bottom: 5px;">Quel sera le plus joli bidon du mois de juillet ? Déposez votre photo et gagnez une poussette Graco. </span> </td> </tr> </tbody></table> <table style="padding-left: 5px;" width="600" align="center" border="0" cellpadding="0" cellspacing="0" height="266"> <tbody><tr> <td width="277" align="center" bgcolor="#f9f8f6" height="266"><table class="box-content box-Pub action-new action-state" style="border: 1px solid rgb(202, 202, 202);" width="254" align="center" border="0" cellpadding="0" cellspacing="0" height="254"> <tbody><tr> <td align="center"><a class="lien-1" href="http://www.magicmaman.com/partenaire/mutuelle-generale/df/e-lamutuellegenerale.asp?xtor=EPR-41" border="0"><img class="img-1" src="http://img.magicmaman.com/partenaire/mutuelle_generale/cl/mea/250x250_brk_b.gif" align="middle" border="0"></a> </td> </tr> </tbody></table></td> <td width="304"><table align="center" border="0" cellpadding="0" cellspacing="0"> <tbody><tr width="304"> <td colspan="4"><img style="display:block" src="http://img.magicmaman.com/mailing/magicmaman/dk/infolettres/grossesse/forums_04.gif" alt="Forums : Vous racontez" width="304" border="0" height="55"> </td> </tr> </tbody></table> <table class="box-content action-edit box-racontez action-state action-new action-database" align="center" bgcolor="#fa7cac" border="0" cellpadding="0" cellspacing="0"> <tbody><tr width="304" style="font-family: Arial;" height="90"> <td width="12" height="70"><img style="display: block;" src="http://img.magicmaman.com/mailing/magicmaman/dk/infolettres/grossesse/forums_06.gif" alt="Forums : Vous racontez" width="12" border="0" height="90"></td> <td width="24" bgcolor="#fa7cac" height="90"> </td> <td width="260" align="left" bgcolor="#fa7cac" height="90"><a href="http://forum.magicmaman.com/magicmaman/bien-etre-beaute-grossesse/Fatigue-sommeil/deprime-incomprehensible-sujet-3663047-1.htm?xtor=EPR-41" target="_blank" class="lien-1" style="font-size: 11px; font-weight: bold; color: rgb(58, 54, 68); text-decoration: none; padding-bottom: 5px;" title="">- <font width="260" class="resume-1">Déprime incompréhensible !</font></a><br> <a href="http://forum.magicmaman.com/magicmaman/suivi-grossesse/Constipation/grand-connaitre-sexe-sujet-3669924-1.htm?xtor=EPR-41" target="_blank" class="lien-2" style="font-size: 11px; font-weight: bold; color: rgb(58, 54, 68); text-decoration: none; padding-bottom: 5px;" title="">- <font width="260" class="resume-2">Le truc des grands-mères pour connaître le sexe. </font></a><br> <a href="http://forum.magicmaman.com/magicmaman/prenom-faire-part-naissance/pensez-prenom-caleen-sujet-3671321-1.htm?xtor=EPR-41" target="_blank" class="lien-3" style="font-size: 11px; font-weight: bold; color: rgb(58, 54, 68); text-decoration: none; padding-bottom: 5px;" title="">- <font width="260" class="resume-3">Que pensez-vous du prénom Caleen ?</font> </a> </td> <td width="8" height="90"><img style="display:block" src="http://img.magicmaman.com/mailing/magicmaman/dk/infolettres/grossesse/forums_08.gif" alt="Forums : Vous racontez" width="8" height="90"></td> </tr> </tbody></table> <table align="center" border="0" cellpadding="0" cellspacing="0"> <tbody><tr height="45"> <td height="45"><a href="http://forum.magicmaman.com/?xtor=EPR-41" border="0"><img style="display:block" src="http://img.magicmaman.com/mailing/magicmaman/dk/infolettres/grossesse/forums_09.gif" alt="Forums : Vous racontez" width="304" border="0" height="45"></a> </td> </tr> <tr class="box-content box-rubrique action-new action-state"> <td width="304" bgcolor="#f9f8f6" height="96"><a class="lien-1" href="http://www.magicmaman.com/partenaire/special-fetes-evenements/special-fetes-evenements.asp?xtor=EPR-41" border="0" title=""><img class="img-1" style="display: inline;" src="http://img.magicmaman.com/autopromotion/ef/mea/300x90-vacances-famille.gif" alt="" width="300" border="0" height="90"></a> </td> </tr> </tbody></table></td> </tr> </tbody></table> <table width="600" align="center" border="0" cellpadding="0" cellspacing="0" height="70"> <tbody><tr class="box-content box-rubrique action-new action-state"> <td width="579" align="center" bgcolor="#f9f8f6" height="71"><a class="lien-1" href="[EMV LINK]27[EMV /LINK]" border="0" title=""> <img class="img-1" src="http://img.magicmaman.com/partenaire/bledina/dk/mea/cereales_468x60_251109.gif" alt="" width="468" border="0" height="60"></a> </td> </tr> </tbody></table> <table width="600" align="center" border="0" cellpadding="0" cellspacing="0" height="83"> <tbody><tr> <td><table class="box-content box-Recettes action-new action-state" id="Tableau_" style="font-family: Arial; font-size: 11px;" width="185" border="0" cellpadding="0" cellspacing="0" height="83"> <tbody><tr> <td><img style="display:block" src="http://img.magicmaman.com/mailing/magicmaman/dk/infolettres/grossesse/RECETTE_01.jpg" alt="Magic recettes" width="57" height="23"> </td> <td><img style="display:block" src="http://img.magicmaman.com/mailing/magicmaman/dk/infolettres/grossesse/RECETTE_02.jpg" alt="Magic recettes" width="116" height="23"> </td> <td><img style="display:block" src="http://img.magicmaman.com/mailing/magicmaman/dk/infolettres/grossesse/RECETTE_03.jpg" alt="Magic recettes" width="12" height="23"> </td> </tr> <tr> <td><img style="display:block" src="http://img.magicmaman.com/mailing/magicmaman/dk/infolettres/grossesse/RECETTE_04.jpg" alt="Magic recettes" width="57" height="50"> </td> <td style="color: rgb(102, 102, 102);" width="116" bgcolor="#e4e482" height="50"><a class="lien-1" href="http://www.magic-recettes.com/cuisine/desserts-glaces-creme-glacee-au-caramel-et-beurre-sale/803/17427.asp?xtor=EPR-41" style="font-weight: bold; color: rgb(102, 102, 102); text-decoration: none;" title="Magic recettes"><span class="resume-1">Crème glacée au caramel. </span></a> </td> <td><img style="display:block" src="http://img.magicmaman.com/mailing/magicmaman/dk/infolettres/grossesse/RECETTE_06.jpg" alt="Magic recettes" width="12" height="50"> </td> </tr> <tr> <td><img style="display:block" src="http://img.magicmaman.com/mailing/magicmaman/dk/infolettres/grossesse/RECETTE_07.jpg" alt="Magic recettes" width="57" height="10"> </td> <td><img style="display:block" src="http://img.magicmaman.com/mailing/magicmaman/dk/infolettres/grossesse/RECETTE_08.jpg" alt="Magic recettes" width="116" height="10"> </td> <td><img style="display:block" src="http://img.magicmaman.com/mailing/magicmaman/dk/infolettres/grossesse/RECETTE_09.gif" alt="Magic recettes" width="12" height="10"> </td> </tr> </tbody></table></td> <td><table class="box-content box-Maison action-new action-state" id="Tableau_" style="font-family: Arial; font-size: 11px;" width="201" border="0" cellpadding="0" cellspacing="0" height="83"> <tbody><tr> <td><img style="display:block" src="http://img.magicmaman.com/mailing/magicmaman/dk/infolettres/grossesse/MAISON_01.jpg" alt="Magic maison" width="54" height="23"> </td> <td><img style="display:block" src="http://img.magicmaman.com/mailing/magicmaman/dk/infolettres/grossesse/MAISON_02.jpg" alt="Magic maison" width="137" height="23"> </td> <td><img style="display:block" src="http://img.magicmaman.com/mailing/magicmaman/dk/infolettres/grossesse/MAISON_03.jpg" alt="Magic maison" width="10" height="23"> </td> </tr> <tr> <td><img style="display:block" src="http://img.magicmaman.com/mailing/magicmaman/dk/infolettres/grossesse/MAISON_04.jpg" alt="Magic maison" width="54" height="49"> </td> <td style="color: rgb(204, 207, 28);" width="137" bgcolor="#e161ae" height="49"><a class="lien-1" href="http://www.magic-maison.com/maison/tous-les-modeles-couture-la-couverture-de-berceau-molletonee/1028/17823.asp?xtor=EPR-41" style="font-weight: bold; color: rgb(204, 207, 28); text-decoration: none;" title="Magic maison"><span class="resume-1">La couverture de berceau.</span></a> </td> <td><img style="display:block" src="http://img.magicmaman.com/mailing/magicmaman/dk/infolettres/grossesse/MAISON_06.jpg" alt="Magic maison" width="10" height="49"> </td> </tr> <tr> <td><img style="display:block" src="http://img.magicmaman.com/mailing/magicmaman/dk/infolettres/grossesse/MAISON_07.jpg" alt="Magic maison" width="54" height="11"> </td> <td><img style="display:block" src="http://img.magicmaman.com/mailing/magicmaman/dk/infolettres/grossesse/MAISON_08.jpg" alt="Magic maison" width="137" height="11"> </td> <td><img style="display:block" src="http://img.magicmaman.com/mailing/magicmaman/dk/infolettres/grossesse/MAISON_09.jpg" alt="Magic maison" width="10" height="11"> </td> </tr> </tbody></table></td> <td><table class="box-content box-Recre action-new action-state" id="Tableau_" style="font-family: Arial; font-size: 11px;" width="200" border="0" cellpadding="0" cellspacing="0" height="83"> <tbody><tr> <td><img style="display:block" src="http://img.magicmaman.com/mailing/magicmaman/dk/infolettres/grossesse/RECREE_01.jpg" alt="" width="59" height="22"> </td> <td><img style="display:block" src="http://img.magicmaman.com/mailing/magicmaman/dk/infolettres/grossesse/RECREE_02.jpg" alt="Magic récré" width="131" height="22"> </td> <td><img style="display:block" src="http://img.magicmaman.com/mailing/magicmaman/dk/infolettres/grossesse/RECREE_03.jpg" alt="Magic récré" width="10" height="22"> </td> </tr> <tr> <td><img style="display:block" src="http://img.magicmaman.com/mailing/magicmaman/dk/infolettres/grossesse/RECREE_04.jpg" alt="Magic récré" width="59" height="51"> </td> <td style="color: rgb(255, 255, 255);" width="131" bgcolor="#23819b" height="51"><a class="lien-1" href="http://www.magic-recre.com/enfant,coloriage-la-plage,swf1420,20814.asp?xtor=EPR-41" style="font-weight: bold; color: rgb(255, 255, 255); text-decoration: none;" title="Magic récré"><span class="resume-1">Coloriage : la plage.</span></a> </td> <td><img style="display:block" src="http://img.magicmaman.com/mailing/magicmaman/dk/infolettres/grossesse/RECREE_06.jpg" alt="Magic récré" width="10" height="51"> </td> </tr> <tr> <td><img style="display:block" src="http://img.magicmaman.com/mailing/magicmaman/dk/infolettres/grossesse/RECREE_07.jpg" alt="Magic récré" width="59" height="10"> </td> <td><img style="display:block" src="http://img.magicmaman.com/mailing/magicmaman/dk/infolettres/grossesse/RECREE_08.jpg" alt="Magic récré" width="131" height="10"> </td> <td><img style="display:block" src="http://img.magicmaman.com/mailing/magicmaman/dk/infolettres/grossesse/RECREE_09.jpg" alt="Magic récré" width="10" height="10"> </td> </tr> </tbody></table></td> </tr> </tbody></table></td> </tr> </tbody></table> </td> </tr> </tbody></table> <table width="600" align="center" border="0" cellpadding="0" cellspacing="0"> <tbody><tr> <td style="font-family: Arial; font-size: 10px;" align="center">Vous recevez cet e-mail en tant qu'inscrite à la newsletter grossesse de Magicmaman<br> <%@ include view="UnsubMMGrossesse" %></td> </tr> </tbody></table> </body></html><div class="scripts-newsletter"> <script>var app_path = 'http://tools.mc2m.fr/WebServices/newsletter';</script> <style>body{margin-top:39px;}</style> <link rel="shortcut icon" href="img/favicon.gif" type="image/x-icon" /> <script src="scripts/mootools.v1.2.js" type="text/javascript"></script> <script src="scripts/inlineEdit.js" type="text/javascript"></script> <script src="scripts/box.js" type="text/javascript"></script> <script src="scripts/core.js" type="text/javascript"></script> <script src="scripts/nicEdit.js" type="text/javascript"></script> <script type="text/javascript"> window.addEvent('domready',function(){ new informations({couleur_info:'#F2D000', couleur_edit:'#CF750C', couleur_form:'#FE24AC', site:'mm', name:'mmGrossesse', archive:'newsletter_00000000_mm_mmGrossesse-04', code_xtor:'EPR-41'}); //On rajoute le code xtor à la fin de chaque url de la NL. if('EPR-41' != '') { $$('a').each(function(el){ var url = el.href; if((url != "#") && (url != "") && !(url.contains ("&&&")) && !(url.contains("mailto:")) && !(url.contains("xtor=")) && ( (url.contains("www.marieclaire.fr")) || (url.contains("www.marieclairemaison.com")) || (url.contains("www.cosmopolitan.fr")) || (url.contains("www.famili.fr")) || (url.contains("www.larvf.com")) || (url.contains("www.cuisineetvinsdefrance.com")) || (url.contains("www.larvf.com")) || (url.contains("www.envy.fr")) || (url.contains("forum.magicmaman.com")) || (url.contains("www.magicmaman.com")) || (url.contains("www.magic-maison.com")) || (url.contains("www.magic-recettes.com")) || (url.contains("www.magic-recre.com")) || (url.contains("www.magicmaman.be")) || (url.contains("www.magicmama.be")) || (url.contains("www.magazine-avantages.fr")) ) ) { // $$('a.tipz').each(function(element,index) { // var truc = element.get('title') // alert(truc); if (url.contains('?')) { el.href = url + '&xtor=EPR-41'; } else { el.href = url + '?xtor=EPR-41'; } } }); } }); </script> </div> |
|
|
00
|
|
|
#5 |
|
Membre éprouvé
![]() Étudiant Inscription : avril 2011 Messages : 317 ![]() |
N'oublie pas,
.Je me suis mal exprimé, donnes le script complet, pas le code source. |
|
|
00
|
|
|
#6 | |||
|
Invité de passage
![]() Inscription : mars 2010 Messages : 11 ![]() |
Citation:
Voici le script complet : Code :
Les xtor sont générés avec un script js mootools. En fait chaque page générée à un xtor particulier qui est appelé dans toute la page, moi je veux juste créer un outil capable de modifier des xtor particuliers sur le code source d'une page. J'ai une nouvelle piste, si le lien du href est "www.magicmaison.com" je sais qu'il faut mettre xtor à 27. Donc Code :
href="http://www.magic-maison.com/maison/tous-les-modeles-couture-la-couverture-de-berceau-molletonee/1028/17823.asp?xtor=EPR-41"
Code :
href="http://www.magic-maison.com/maison/tous-les-modeles-couture-la-couverture-de-berceau-molletonee/1028/17823.asp?xtor=EPR-27"
|
|||
|
|
00
|
|
|
#7 | ||
|
Membre éprouvé
![]() Étudiant Inscription : avril 2011 Messages : 317 ![]() |
C'est normal que ça remplace dans tout le document.
Code :
En gros : si TOUT ton texte contient une fois "Magic recettes", tu remplace alors TOUS les EPR-36 pas 41 puisque tu fais le traitement sur $lc_contents. |
||
|
|
00
|
|
|
#8 | |||
|
Invité de passage
![]() Inscription : mars 2010 Messages : 11 ![]() |
Citation:
Donc est ce qu'il y a une solution avec des regex ? |
|||
|
|
00
|
|
|
#9 | ||
|
Membre éprouvé
![]() Étudiant Inscription : avril 2011 Messages : 317 ![]() |
Ceci devrait marcher :
Code :
|
||
|
|
00
|
|
|
#10 |
|
Membre Expert
![]() Baptiste ROUSSELÉtudiant Inscription : janvier 2011 Messages : 802 ![]() |
Et ça remplace aussi le lien suivant sans toucher au lien du milieu s'il n'a pas Magic recettes. ^^
Et pire que cela, le terme Magic Recette est utilisé en alt sur certaines images.
__________________
|
|
|
00
|
|
|
#11 | ||
|
Membre éprouvé
![]() Étudiant Inscription : avril 2011 Messages : 317 ![]() |
Je ne comprends pas ce que tu veux dire transgohan :
J'ai testé sur : Code :
|
||
|
|
00
|
|
|
#12 |
|
Invité de passage
![]() Inscription : mars 2010 Messages : 11 ![]() |
T'es sur que ça marche Nheo ?
J'ai testé ton expression régulière sur les 3 lignes qui t'ont servies de test mais la valeur des xtor n'a pas changée ... Merci de ton aide mais je désespère un peu |
|
|
00
|
|
|
#13 |
|
Invité de passage
![]() Inscription : mars 2010 Messages : 11 ![]() |
Ah si ça fonctionne, au temps pour moi ...
Merci beaucoup ! |
|
|
00
|
Copyright © 2000-2012 - www.developpez.com