Faks Posted September 7, 2011 Report Share Posted September 7, 2011 Labdien Damas un Kungi tatad atkal problema un nestrada kuram gaisaka galva varbut palidzt atrisinat problemu pieviena sis kods ari noderes komunai :) ! $in = array( '\[spoiler\](.*?)\[/spoiler\]' ); // nestrada jo php nenem preti :( $out = array( '<div align="center"> <div style="margin: 5px 20px 20px; width: 60%;"> <div style="text-align: right; padding: 4px; background: #72B73A; repeat-x scroll 0% 0% transparent; border: 1px solid #2C6302; -moz-border-radius:5px; color:#ffffff; text-shadow:0 -1px #4B7926; font-weight:bold; ">Spoiler: <input type="button" onclick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = ''; this.innerText = ''; this.value = 'Hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Show'; }" style="width: 45px; font-size: 10px; margin: 0px; padding: 0px;" value="Show"></div><div class="quotecontent"><div style="border-right: 1px solid #000000; border-width: 0px 1px 1px; border-style: none solid solid; border-color: #000000; padding: 4px; -moz-border-radius:5px; display: none;">$1</div></div></div></div>' P.s Paldies par uzmanibu un atsaucibus (nesudzaties ka nau garum zimes eh 64bit os ...) . Link to comment Share on other sites More sharing options...
vostro Posted September 7, 2011 Report Share Posted September 7, 2011 Kāds sakars ir ar 64bit OS ??? Kāpēc nav garumzīmes? Link to comment Share on other sites More sharing options...
yancho Posted September 7, 2011 Report Share Posted September 7, 2011 (edited) Uzraksti šādi: $in = array('\[spoiler\](.*?)\[/spoiler\]'); $out = array(''); ja strādā, tad kopē vai raksti pie $out pa pārdesmit simboliem iekšā no tā koda kas tev tur ir, līdz saproti kas par vainu. Edited September 7, 2011 by yancho Link to comment Share on other sites More sharing options...
daGrevis Posted September 7, 2011 Report Share Posted September 7, 2011 Ko Tu vispār gribi izdarīt? Link to comment Share on other sites More sharing options...
Faks Posted September 7, 2011 Author Report Share Posted September 7, 2011 (edited) Uzraksti šādi: $in = array('\[spoiler\](.*?)\[/spoiler\]'); $out = array(''); ja strādā, tad kopē vai raksti pie $out pa pārdesmit simboliem iekšā no tā koda kas tev tur ir, līdz saproti kas par vainu. problema ir site php nenem preti html kodu <input type="button" onclick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = ''; this.innerText = ''; this.value = 'Hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Show'; }" style="width: 45px; font-size: 10px; margin: 0px; padding: 0px;" value="Show"></div> pat ar echo to pasu var piedzivot vot nevaru izdomat ka eskeipot tagus tada aizdoma ka bez php strom cauri netiksu ja ne vien kads cits nepateiks labaku varijantu ! Edited September 7, 2011 by Faks Link to comment Share on other sites More sharing options...
daGrevis Posted September 7, 2011 Report Share Posted September 7, 2011 Kas ir 'site php' un 'php strom'? Atdali PHP no HTML. HTML no CSS un JS. Link to comment Share on other sites More sharing options...
Faks Posted September 7, 2011 Author Report Share Posted September 7, 2011 (edited) Kas ir 'site php' un 'php strom'? Atdali PHP no HTML. HTML no CSS un JS. problema ka nemaz ta te nevar darit jo tas ir ieksa out .... un iet cauri preg_replace ... ja spamos topiks iet ciet ! Edited September 7, 2011 by Faks Link to comment Share on other sites More sharing options...
daGrevis Posted September 7, 2011 Report Share Posted September 7, 2011 Kas ir 'ieksa out'? 0_o Man jau drīz būs jācitē Tevi... Kas Ko ? 4o ? What ? Link to comment Share on other sites More sharing options...
Faks Posted September 7, 2011 Author Report Share Posted September 7, 2011 (edited) Kas ir 'ieksa out'? 0_o Man jau drīz būs jācitē Tevi... Kas Ko ? 4o ? What ? $in = array ( '\[spoiler\](.*?)\[/spoiler\]' ); // nestrada jo php nenem preti : ( $out = array( '<div align="center"> <div style="margin: 5px 20px 20px; width: 60%;"> <div style="text-align: right; padding: 4px; background: #72B73A; repeat-x scroll 0% 0% transparent; border: 1px solid #2C6302; -moz-border-radius:5px; color:#ffffff; text-shadow:0 -1px #4B7926; font-weight:bold; ">Spoiler: <input type="button" onclick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = ''; this.innerText = ''; this.value = 'Hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Show'; }" style="width: 45px; font-size: 10px; margin: 0px; padding: 0px;" value="Show"></div><div class="quotecontent"><div style="border-right: 1px solid #000000; border-width: 0px 1px 1px; border-style: none solid solid; border-color: #000000; padding: 4px; -moz-border-radius:5px; display: none;">$1</div></div></div></div>' ); preg_replace($in, $out, $text); Edited September 7, 2011 by Faks Link to comment Share on other sites More sharing options...
daGrevis Posted September 7, 2011 Report Share Posted September 7, 2011 Kāpēc $in ir masīvs nevis parasts strings?? Tas pats ar $out. Link to comment Share on other sites More sharing options...
xPtv45z Posted September 8, 2011 Report Share Posted September 8, 2011 Varbūt eskeipo vajadzīgās pēdiņas? Jau te ieliktajam kodam, code tagi vizuāli parāda, kur būs problēmas, protams, ja tu neesi daltoniķis. Link to comment Share on other sites More sharing options...
Recommended Posts