Advertisement:

Author Topic: can't post from microsoft word  (Read 1290 times)

Offline Golden Boy

  • Newbie
  • *
  • Posts: 7
can't post from microsoft word
« 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 :
Code: [Select]
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

Offline karlbenson

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 15,630
  • Gender: Male
    • Lifeproof
Re: can't post from microsoft word
« Reply #1 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
Code: [Select]
'~<br\s*/*>~i' => "\n",
'~(.+?)(<hr[^<>]*>)~si' => "$1\n\$2",
'~<hr[^<>]*>~i' => "[hr]\n",

REPLACE
Code: [Select]
'~<br(?:\s[^<>]*?)?>~i' => "\n",
'~<hr[^<>]*>(\n)?~i' => "[hr]\n$1",
'~(\n)?\\[hr\\]~i' => "\n[hr]",
'~^\n\\[hr\\]~i' => "[hr]",

Offline Golden Boy

  • Newbie
  • *
  • Posts: 7
Re: can't post from microsoft word
« Reply #2 on: June 23, 2009, 08:02:38 PM »
thx 4 the solution sir!  :P

Offline Aleksi "Lex" Kilpinen

  • A Peculiar Finn
  • Project Manager
  • SMF Super Hero
  • *
  • Posts: 19,854
  • Gender: Male
  • Don't worry, I'm n00b friendly
    • Aleksi.Kilpinen on Facebook
    • LexArma on GitHub
    • aleksi-kilpinen on LinkedIn
    • My Daily Dose Of Blasphemy
Re: can't post from microsoft word
« Reply #3 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? :)
A Finnish Project Manager (Support Specialist)
Happily running multiple SMF 2.x installations.
 Fooling around with an i7-10700 @ 2,90GHz-4.80GHz / 16Gb / RTX-2070 Super / 3840x2160 / Win 10 x64


How you can help SMF

"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum.
Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas