Last modified: 2014-02-06 08:48:16 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T53190, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 51190 - [WikiForum] Added capability to recognize single line breaks
[WikiForum] Added capability to recognize single line breaks
Status: UNCONFIRMED
Product: MediaWiki extensions
Classification: Unclassified
WikiForum (Other open bugs)
unspecified
All All
: Unprioritized enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-11 18:46 UTC by huskerfantg
Modified: 2014-02-06 08:48 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description huskerfantg 2013-07-11 18:46:39 UTC
I have figured out a way to allow single line breaks made in the text editor to be interpreted as such.

With current functionality, you must include a <br> tag or make two line breaks to  have it appears as a single line break.

Changes made:

In WikiForumClass.php:

function parseIt( $text ) {
// included $wgWikiForumAllowSingleLine from LocalSettings.php
global $wgOut, $wgWikiForumAllowSingleLine;

// add smilies for reply text
$text = $this->prepareSmilies( $text ); 
//changes start here
if($wgWikiForumAllowSingleLine)
{
$text = nl2br($text); 
}
//changes stop here
$text = $wgOut->parse( $text );
$text = $this->parseLinks( $text );

Then from LocalSetttings.php if 

$wgWikiForumAllowSingleLine = true; // then single line breaks display as a single line
$wgWikiForumAllowSingleLine = false; // then single line breaks display as multiple lines.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links