News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

preview screws linespacing up!

Started by Snickers, October 09, 2005, 02:17:09 PM

Previous topic - Next topic

Snickers

Well, when someone writes anything in the action=post there's the editor we all know about you can press ENTER or SPACE or whatever to make a new line (you don't need any special commands like you do with html(<br>))

BUT lets say you write:

Hello my name is xxx I come from denmark.

I like pie


and then if you press preview, the linespacing dissapears, so if you press preview and then post it will write:

Hello my name is xxx I come from denmark.
I like pie


which SUCKS! since if you for example make a big post with lots of pictures, no spacing can screw up everything and it takes years to add again in the editor!

dtm.exe

Try replacing /Themes/[theme]/Post.teamplate.php and /Sources/Post.php.

Snickers

I've compared it with the ones on my server and ones from a fresh copy of SMF 1.1 R1

and it seems this is the thing causing it:
(I've added this into the files on my current files on my server)
Quote from: FaSan on January 31, 2005, 12:04:38 PM
For quote from quick reply, change this (in Post.php) :



<search>
// Add a quote string on the fron and end.
</search>

<add before>
$row['body'] = preg_replace(array('~\n?\[hide.*?\].+?\[/hide\]\n?~is', '~^\n~', '~\[/hide\]~'), '', $row['body']);
</add before>





FaSan ;)

and this:

Quote from: FaSan on January 29, 2005, 01:05:00 PM
For not quotable code ... open Post.php:


<search>
// Add a quote string on the front and end.
</search>

<add before>
$form_message = preg_replace(array('~\n?\[hide.*?\].+?\[/hide\]\n?~is', '~^\n~', '~\[/hide\]~'), '', $form_message);
</add before>



;)


FaSan


Since it does not seem at all to be the post.template.php that is causing the error....
(I've only added more colors and fonts, so it would be wierd if that is the thing causing it)

Oh and this is how my current. post.php (In sources) looks like:

// Remove any nested quotes, if necessary.
if (!empty($modSettings['removeNestedQuotes']))
$form_message = preg_replace(array('~\n?\[quote.*?\].+?\[/quote\]\n?~is', '~^\n~', '~\[/quote\]~'), '', $form_message);

$form_message = preg_replace(array('~\n?\[hide.*?\].+?\[/hide\]\n?~is', '~^\n~', '~\[/hide\]~'), '', $form_message);
$row['body'] = preg_replace(array('~\n?\[hide.*?\].+?\[/hide\]\n?~is', '~^\n~', '~\[/hide\]~'), '', $row['body']);
// Add a quote string on the front and end.
$form_message = '[quote author=' . $mname . ' link=topic=' . $topic . '.msg' . (int) $_REQUEST['quote'] . '#msg' . (int) $_REQUEST['quote'] . ' date=' . $mdate . ']' . "\n" . $form_message . "\n" . '[/quote]';
}
// Posting a reply without a quote?
elseif (!empty($topic) && empty($_REQUEST['quote']))


Have I done anything wrong?

or is this not the thing causing the error?

dtm.exe

Snickers, mods will do that.  Since this is a mod-related issue, it would probably be best that you talk to the mod's author regarding this.

Snickers

but are you sure thats the code causing the error? cause I am not..

dtm.exe

Quote from: Snickers on October 10, 2005, 07:10:28 PM
but are you sure thats the code causing the error? cause I am not..

I'm 99% sure.

Advertisement: