I've read some topics regarding line feeds in the cgfeedback module. In my case it's without succes till so far.
I would like linefeeds to be visible when comments are placed.
I have tried changing the action.summary.php file with nl2br but without succes.
Any ideas on this topic?
I use CMSMS 1.9.2 and CGFeedback 1.3.2
CGFeedback Line feed / Break
Re: CGFeedback Line feed / Break
Can you explain a little more about what you mean by linefeeds?...
Never heard of this before...
Never heard of this before...
Re: CGFeedback Line feed / Break
linefeeds is the same as newlines, '\n', etc. He wants to replace them with '<br />'
You shouldn't have to change the code. Edit your summary template in the admin panel for CGFeedback.
Change:
to:
I think that's the variable that deals with the actual comment. If it's not $one.data, you'll have to put test data in various points of the summary template to figure out where to place the modifier.
The reason that editing the php file didn't work is because you're trying to inject HTML into the output. As you see in the template above, it's filtering it out with '|htmlspecialchars'. We're then taking the newline and converting it to <br /> after filtering out other html. You'll have to remove your hack, or there will be no newlines to convert
You shouldn't have to change the code. Edit your summary template in the admin panel for CGFeedback.
Change:
Code: Select all
<div class="feedback_item_data">
{$one.data|htmlspecialchars}
</div>
Code: Select all
<div class="feedback_item_data">
{$one.data|htmlspecialchars|nlbr}
</div>
The reason that editing the php file didn't work is because you're trying to inject HTML into the output. As you see in the template above, it's filtering it out with '|htmlspecialchars'. We're then taking the newline and converting it to <br /> after filtering out other html. You'll have to remove your hack, or there will be no newlines to convert

Re: CGFeedback Line feed / Break
Hi Guys,
That's exactly what i mean. It works like a charm now!
Did you know that IE9 does not show the "Save" "Submit" and "Cancel" buttons on te top and bottom of a page in the back-office in 1.9.2 ?
Strange...
Greetz Geert
That's exactly what i mean. It works like a charm now!
Did you know that IE9 does not show the "Save" "Submit" and "Cancel" buttons on te top and bottom of a page in the back-office in 1.9.2 ?
Strange...
Greetz Geert
Re: CGFeedback Line feed / Break
I tried this solution in 1.10.3 but I have no linefeeds and after adding "|nlbr" I get a smarty-error stating this is not implemented.
string(149) "Smarty error: [in module_db_tpl:CGFeedback;summary_mysample01 line 33]: [plugin] modifier 'nlbr' is not implemented (core.load_plugins.php, line 198)" /is/htdocs/wp10625670_ZMV58VEOJD/www5/lib/smarty/Smarty.class.php:1819 - trigger_error
What to do?
Kind regards,
Jan
string(149) "Smarty error: [in module_db_tpl:CGFeedback;summary_mysample01 line 33]: [plugin] modifier 'nlbr' is not implemented (core.load_plugins.php, line 198)" /is/htdocs/wp10625670_ZMV58VEOJD/www5/lib/smarty/Smarty.class.php:1819 - trigger_error
What to do?
Kind regards,
Jan
Re: CGFeedback Line feed / Break
Hi,
Sorry I did not edit the post because I found that I forgot the "2".
I could not find this peticular post to edit it.
It is working now like I wanted it to work.
In CGFeedback, I do not allow html and no editor with nl2br it works like the old Comments module. Maybe the old module should be marked as "overdue" with a link to cgfeedback because in 1.10.3 Comments will not work.
Kind regards,
Jan
Sorry I did not edit the post because I found that I forgot the "2".
I could not find this peticular post to edit it.
It is working now like I wanted it to work.
In CGFeedback, I do not allow html and no editor with nl2br it works like the old Comments module. Maybe the old module should be marked as "overdue" with a link to cgfeedback because in 1.10.3 Comments will not work.
Kind regards,
Jan