viewtopic.php?t=10006
once i get the sign up working i'll be adding the db and trying to synch everything up (cause i'll know all future issues are entirely in the db), that's why there isn't a check on the username in the sign up yet (still have to figure out how to check it in the db...i figure i'll get that help when i ask for advice on tables after i get the rest of the sign up working)
ok. first part of the title now.. while waiting i've tried to get other things working.. like since i want to allow signed up users (well it's something i'm considering) to use html but not scripting languages in their profile i created a check to remove that for use in the update page.
now i've been playing with forum code.. please don't tell me just to download stuff, my original idea was to write a forums and make it publically available because i'm fresh outta college and i keep getting told i don't have enough php/db experience for even an netry level job (somehow i think that's <span style='color:blue' title='I'm naughty, are you naughty?'>smurf</span> up since they are advertising as entry level...but that's a rant for another time) my friend talked me into making a full rating site.. thus everything, including the forums on my site, are going to be from scratch.
in about 90 min yesterday i wrote the first draft of my forumcode. the only things not working are tables (which i'll look at later since it's the opening tag eating the first row tag....it might be fixed if i switch the order i look for the tags...) i had two other issues, i wanted to let people use html atttributes for the hr tag, so i took a few hours playing with the posix regular expressions.. then found that my first ideafor it in perl regular expressions works perfectly even though posix wouldn't work nomatter what. now the second thing not working was the only other thing not implemented in the initial writing...i want to llow sections to be untouched by the code (and future ad in of smilies...)
for this i've been looking for something to remove the section and place it in a variable. i finally decided i'll need to write this function (maybe send it to php.net later incase someone else wants it)
explode, split and preg_split are all destructive but do something i can use in bulding a function for this.
explode is only one charcter, so i don't wanna use that
split uses posix regular expressions, and looks like it should work, but....
preg_split can do captures.. i'm not quite sure how that works... when reading it, i started wondering if it might do what i want....only thing is i'd need to do it in a non-destructive way so that i can replace the pattern with something to restore it later.
if i were to use the pattern [/?nocode] would that capture everything between the tags in this line:
here's an example of how to use php to build a forum: [nocode]to replace blahd blah blah with <b>blah blah blah</b>
$input=eregi_replace('\([^]]*)\', '<b>\1</b>', $input);[/nocode]