Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

JoomlaTune Support Forum    JComments component    Suggestions, Wishlists & Feature Requests    Topic: Comment paragraphs to use <p> tags instead of <br/><br/>
Pages: [1]   Go Down
  Print  
Author Topic: Comment paragraphs to use <p> tags instead of <br/><br/>  (Read 2497 times)
0 Members and 2 Guests are viewing this topic.
harikaram
Newbie
*

Karma: 3
Offline Offline

Posts: 19


« on: March 07, 2011, 18:31:14 »

Having <p> tags for the paragraphs in a multiparagraph comment would allow for more consistent styling via CSS than double <br/>'s.

Or maybe include in the tpl_comment template, the function which converts newlines to <br/>'s with an option there...

Code:
<p><?php echo $comment->comment ?></p>

...would become...

Code:
<?php echo JComments::nl2Para($comment->commentNL2PARA_BR).?>

...where NL2PARA_BR is a const with other options available like NL2PARA_P, NL2PARA_DIV.  This way you keep the simple BR functionality and allow template overriders to use P tags without an unnecessary additional str_replace.

Logged
smart
Administrator
Hero Member
*****

Karma: 160
Offline Offline

Gender: Male
Posts: 2559



WWW
« Reply #1 on: April 19, 2011, 04:45:14 »

We can implement such replacement by simple custom JComments plugin and move all these replacents to it. I'm not sure that this is good idea to put all stuff in one extension - it could useful for some users but would be unuseful for all others. With any new option we make extension more heavy, we need more language constants, more code and after some time it would be like a monster...
Logged

If you use JComments, please post a rating and a review at the Joomla! Extensions Directory
Pages: [1]   Go Up
  Print  
JoomlaTune Support Forum    JComments component    Suggestions, Wishlists & Feature Requests    Topic: Comment paragraphs to use <p> tags instead of <br/><br/>
 
Jump to: