Free2Code
 
Time: 2008-12-04, 08:05pm
Stripslashes not working in Smarty
Subject: Stripslashes not working in Smarty  ·  Posted: 2007-05-02, 10:47pm
Rank: ? (60)
Member #: 22843
Please i`m using HTMLArea for my WYSIWYG web editor, but if i fetch the data from the database and use {$data|stripslashes} inside the html template (filename.tpl) but the text are not displaying as formarted with the HTMLArea editor.

All the new line space in the HTML was lost, i will need to Hit Enter Key for a very big line spacing before i started seeing space at the output

What should i do?

» Post edited 2007-05-02, 11:48pm by joefazee.

 
  Reply to this ·  Post link ·  Top
Subject: Re: Stripslashes not working in Smarty  ·  Posted: 2007-05-03, 08:03am
Rank: ? (767)
Member #: 11085
I can't assist you with Smarty, try their documents or forums.

- relpats_eht
 
  Reply to this ·  Post link ·  Top
Subject: Re: Stripslashes not working in Smarty  ·  Posted: 2007-11-20, 06:44pm
Rank: ? (1)
Member #: 29681
let's map PHP's stripslashes function to a Smarty modifier.

so just assin this line in your phpcode
$smarty->register_modifier("sslash","stripslashes");
$smarty->assign("form_title",$this->form_title);
after that u can use in your smarty [.tpl files like following

now you can use {$form_|sslash} to strip slashes from variables.


» Post edited 2007-11-20, 06:44pm by msakthivelcse.

 
  Reply to this ·  Post link ·  Top
Subject: Re: Stripslashes not working in Smarty  ·  Posted: 2007-11-22, 04:22pm
Rank: ? (883)
Member #: 3
jofazee,
Build your own PHP files. Read other scripts to learn, then write your own. It seems everyone always has problems implementing scripts built by others.

» Post edited 2007-11-22, 04:22pm by bs0d.

--bs0d | allsyntax.com
 
  Reply to this ·  Post link ·  Top
Subject: Re: Stripslashes not working in Smarty  ·  Posted: 2007-11-24, 11:36am
Rank: ? (767)
Member #: 11085
Save your breath. Look at the dates.

- relpats_eht
 
  Reply to this ·  Post link ·  Top
Subject: Re: Stripslashes not working in Smarty  ·  Posted: 2007-11-26, 04:19am
Rank: ? (4821)
Member #: 3416
did they fix the “post edited by� showing up on posts that haven’t been edited yet?

edit: wow, looks like they did!

» Post edited 2007-11-26, 04:19am by misterhaan.

my mind is like a steel trap! it only hangs on to the big stuff. visit my forums at track7.org
 
  Reply to this ·  Post link ·  Top

Pages: 1

Please login or register to post a reply.

icons