Janhouse Posted October 23, 2005 Report Share Posted October 23, 2005 Taisu tālāk savu lapu (janhouse.miracle.lv) un esmu secinājis, ka baigi noderētu bb kods, lai lietotāji varētu smuki formatēt tekstu utt. ;) Vienīgā problēma nezinu kā to darīt. Kā panākt, ka nolasot tekstu no datubāzes visi [ b ] [ /b ], [ i ] [ /i ] un [ font ] [ /font ] nomainās uz html kodu <b></b><i></i><font></font>??? Lūdzu palīdziet Link to comment Share on other sites More sharing options...
Klez Posted October 23, 2005 Report Share Posted October 23, 2005 http://phpbb.com novelkam jaunaako phpbb foruma versiju atveram funkciju failu un samekleejam funkciju kas paarveido tos kodus ja nemaldos tad fails arii lidziigi saucas (bbcode.php) laikam. ja intresee tehniski tad preg_replace Link to comment Share on other sites More sharing options...
jam Posted October 23, 2005 Report Share Posted October 23, 2005 $bad = array("[b]", "[/b]", "[i]", "[/i]"); $good = array("<b>", "</b>", "<i>", "</i>"); $jaunais_txt = str_replace($bad, $good, $arr['txt']); // $arr['txt'] - shitais ir tas, ko tu no db dabuu. man liekas, ka taa. Link to comment Share on other sites More sharing options...
Janhouse Posted October 23, 2005 Author Report Share Posted October 23, 2005 paldies jam! Strada ideali, bet ka to izdarit ar un ??? Link to comment Share on other sites More sharing options...
jam Posted October 23, 2005 Report Share Posted October 23, 2005 (edited) līdzīgi kā šito pašu, tikai tad nevajag array. NAv laika domāt un rakstīt, sorry. pašam dedlains vienam projektiņam. Edited October 23, 2005 by jam Link to comment Share on other sites More sharing options...
Janhouse Posted October 23, 2005 Author Report Share Posted October 23, 2005 hmm... kads cits nevar uzrakstit? ka piemeram, ja tur taa adrese pa vidu? Es tak nesaprotu kaa. :) nu ja ir [ url ]www.lv[ /url ] vai [ url ]http://url.lv/[ /url ] vai [ url=http://url.lv/ ]Wazaaap!?[ /url ] ??? Kaa? :) ludzu kadu paraugu uzrakstiet kaa to jau jam darija. Link to comment Share on other sites More sharing options...
Klez Posted October 26, 2005 Report Share Posted October 26, 2005 neviens tew te nerakstiis. ja buutu maaceeejis mekleet vai uz phpbb.com aiziet, tad sen jau tew buutu skripts rokaa! Link to comment Share on other sites More sharing options...
php_Stopp Posted December 10, 2005 Report Share Posted December 10, 2005 Janhouse, neiesaku to jam variantu lietot.. kāds ierakstīs ziņā tikai vai , un visa tālākā lapa būs ar savu teksta dekorējumu.. :) Link to comment Share on other sites More sharing options...
Recommended Posts