News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Custom field textarea, replacing \r\n before storing info into the database

Started by MFox, December 25, 2005, 10:58:06 AM

Previous topic - Next topic

MFox

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>
B&W Speakers Forum: hxxp:www.bwspeakers-forum.com [nonactive]

MFox

B&W Speakers Forum: hxxp:www.bwspeakers-forum.com [nonactive]

Advertisement: