Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Aiheen aloitti: MFox - joulukuu 25, 2005, 10:58:06 AP

Otsikko: Custom field textarea, replacing \r\n before storing info into the database
Kirjoitti: MFox - joulukuu 25, 2005, 10:58:06 AP
I added a custom field which handles multiple lines and I have a problem with how the cr+lf information is stored into the database. I'd like to have the \t\n replaced by <br />

I followed the paths of the 'signature'-handling and I kind of figured out, that load.php and profile.php seem to be involved, but everything I tried with the str_replace() function in both files didn't work out at all. 


Can anyone tell me where and what I have to modify, to get it to work? Like I said I tried to modify things in load.php/profile.php, but there was not effect.


That's what I added for that custom-field in profile.template.php:

<textarea class="editor" name="default_options[profile_custom_systemsetup]" rows="5" cols="50" );">', @$context['member']['options']['profile_custom_systemsetup'], '</textarea>
Otsikko: Re: Custom field textarea, replacing \r\n before storing info into the database
Kirjoitti: MFox - joulukuu 26, 2005, 03:20:36 IP
nevermind, I figured it out myself :)