Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: Golden Boy on June 23, 2009, 01:39:40 PM

Title: can't post from microsoft word
Post by: Golden Boy on June 23, 2009, 01:39:40 PM
when i copy the words from microsoft office document that contain format (like bold, italic etc) and paste it, i can't post it.

it just hang and give this message :
Fatal error: Maximum execution time of 30 seconds exceeded in /home/xxxcom/public_html/forum/Sources/Subs-Editor.php on line 560

what's wrong with it?

sorry for my poor english by the way
Title: Re: can't post from microsoft word
Post by: karlbenson on June 23, 2009, 03:17:21 PM
This is a bug that has been fixed in our 2.0 svn, and should be fixed in 2.0 rc2 (when it is released).
It should be a bit more efficient (although the editor still can't handle infinite/uber amounts of data)

In the meantime you can do this manually

Sources/Subs-Editor.php
FIND
'~<br\s*/*>~i' => "\n",
'~(.+?)(<hr[^<>]*>)~si' => "$1\n\$2",
'~<hr[^<>]*>~i' => "[hr]\n",


REPLACE
'~<br(?:\s[^<>]*?)?>~i' => "\n",
'~<hr[^<>]*>(\n)?~i' => "[hr]\n$1",
'~(\n)?\\[hr\\]~i' => "\n[hr]",
'~^\n\\[hr\\]~i' => "[hr]",
Title: Re: can't post from microsoft word
Post by: Golden Boy on June 23, 2009, 08:02:38 PM
thx 4 the solution sir!  :P
Title: Re: can't post from microsoft word
Post by: Aleksi "Lex" Kilpinen on June 24, 2009, 09:36:55 AM
Did the solution do the trick? :) Can we mark this solved, or is there something else you would like to have assistance on? :)