Wiki2GoEditor 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (403) hide show
  1. data/bin/Wiki2Go_install_editor.rb +13 -0
  2. data/fckeditor/editor/_source/classes/fckcontextmenu.js +134 -0
  3. data/fckeditor/editor/_source/classes/fckdocumentfragment_gecko.js +46 -0
  4. data/fckeditor/editor/_source/classes/fckdocumentfragment_ie.js +58 -0
  5. data/fckeditor/editor/_source/classes/fckdomrange.js +452 -0
  6. data/fckeditor/editor/_source/classes/fckdomrange_gecko.js +71 -0
  7. data/fckeditor/editor/_source/classes/fckdomrange_ie.js +149 -0
  8. data/fckeditor/editor/_source/classes/fckeditingarea.js +253 -0
  9. data/fckeditor/editor/_source/classes/fckelementpath.js +66 -0
  10. data/fckeditor/editor/_source/classes/fckenterkey.js +556 -0
  11. data/fckeditor/editor/_source/classes/fckevents.js +53 -0
  12. data/fckeditor/editor/_source/classes/fckicon.js +98 -0
  13. data/fckeditor/editor/_source/classes/fckiecleanup.js +68 -0
  14. data/fckeditor/editor/_source/classes/fckimagepreloader.js +68 -0
  15. data/fckeditor/editor/_source/classes/fckkeystrokehandler.js +136 -0
  16. data/fckeditor/editor/_source/classes/fckmenublock.js +143 -0
  17. data/fckeditor/editor/_source/classes/fckmenublockpanel.js +54 -0
  18. data/fckeditor/editor/_source/classes/fckmenuitem.js +160 -0
  19. data/fckeditor/editor/_source/classes/fckpanel.js +303 -0
  20. data/fckeditor/editor/_source/classes/fckplugin.js +56 -0
  21. data/fckeditor/editor/_source/classes/fckspecialcombo.js +363 -0
  22. data/fckeditor/editor/_source/classes/fckstyledef.js +59 -0
  23. data/fckeditor/editor/_source/classes/fckstyledef_gecko.js +119 -0
  24. data/fckeditor/editor/_source/classes/fckstyledef_ie.js +142 -0
  25. data/fckeditor/editor/_source/classes/fckstylesloader.js +88 -0
  26. data/fckeditor/editor/_source/classes/fcktoolbar.js +120 -0
  27. data/fckeditor/editor/_source/classes/fcktoolbarbreak_gecko.js +36 -0
  28. data/fckeditor/editor/_source/classes/fcktoolbarbreak_ie.js +38 -0
  29. data/fckeditor/editor/_source/classes/fcktoolbarbutton.js +74 -0
  30. data/fckeditor/editor/_source/classes/fcktoolbarbuttonui.js +222 -0
  31. data/fckeditor/editor/_source/classes/fcktoolbarfontformatcombo.js +114 -0
  32. data/fckeditor/editor/_source/classes/fcktoolbarfontscombo.js +47 -0
  33. data/fckeditor/editor/_source/classes/fcktoolbarfontsizecombo.js +52 -0
  34. data/fckeditor/editor/_source/classes/fcktoolbarpanelbutton.js +91 -0
  35. data/fckeditor/editor/_source/classes/fcktoolbarspecialcombo.js +134 -0
  36. data/fckeditor/editor/_source/classes/fcktoolbarstylecombo.js +111 -0
  37. data/fckeditor/editor/_source/classes/fckw3crange.js +448 -0
  38. data/fckeditor/editor/_source/classes/fckxml_gecko.js +87 -0
  39. data/fckeditor/editor/_source/classes/fckxml_ie.js +90 -0
  40. data/fckeditor/editor/_source/commandclasses/fck_othercommands.js +380 -0
  41. data/fckeditor/editor/_source/commandclasses/fckfitwindow.js +169 -0
  42. data/fckeditor/editor/_source/commandclasses/fcknamedcommand.js +37 -0
  43. data/fckeditor/editor/_source/commandclasses/fckpasteplaintextcommand.js +38 -0
  44. data/fckeditor/editor/_source/commandclasses/fckpastewordcommand.js +40 -0
  45. data/fckeditor/editor/_source/commandclasses/fckspellcheckcommand_gecko.js +39 -0
  46. data/fckeditor/editor/_source/commandclasses/fckspellcheckcommand_ie.js +67 -0
  47. data/fckeditor/editor/_source/commandclasses/fckstylecommand.js +99 -0
  48. data/fckeditor/editor/_source/commandclasses/fcktablecommand.js +71 -0
  49. data/fckeditor/editor/_source/commandclasses/fcktextcolorcommand.js +175 -0
  50. data/fckeditor/editor/_source/fckconstants.js +52 -0
  51. data/fckeditor/editor/_source/fckeditorapi.js +161 -0
  52. data/fckeditor/editor/_source/fckjscoreextensions.js +152 -0
  53. data/fckeditor/editor/_source/fckscriptloader.js +108 -0
  54. data/fckeditor/editor/_source/internals/fck.js +859 -0
  55. data/fckeditor/editor/_source/internals/fck_contextmenu.js +307 -0
  56. data/fckeditor/editor/_source/internals/fck_gecko.js +254 -0
  57. data/fckeditor/editor/_source/internals/fck_ie.js +383 -0
  58. data/fckeditor/editor/_source/internals/fckbrowserinfo.js +48 -0
  59. data/fckeditor/editor/_source/internals/fckcodeformatter.js +100 -0
  60. data/fckeditor/editor/_source/internals/fckcommands.js +132 -0
  61. data/fckeditor/editor/_source/internals/fckconfig.js +199 -0
  62. data/fckeditor/editor/_source/internals/fckdebug.js +56 -0
  63. data/fckeditor/editor/_source/internals/fckdialog.js +38 -0
  64. data/fckeditor/editor/_source/internals/fckdialog_gecko.js +103 -0
  65. data/fckeditor/editor/_source/internals/fckdialog_ie.js +48 -0
  66. data/fckeditor/editor/_source/internals/fckdocumentprocessor.js +243 -0
  67. data/fckeditor/editor/_source/internals/fckdomtools.js +294 -0
  68. data/fckeditor/editor/_source/internals/fcklanguagemanager.js +161 -0
  69. data/fckeditor/editor/_source/internals/fcklisthandler.js +152 -0
  70. data/fckeditor/editor/_source/internals/fcklistslib.js +60 -0
  71. data/fckeditor/editor/_source/internals/fckplugins.js +46 -0
  72. data/fckeditor/editor/_source/internals/fckregexlib.js +95 -0
  73. data/fckeditor/editor/_source/internals/fckselection.js +24 -0
  74. data/fckeditor/editor/_source/internals/fckselection_gecko.js +151 -0
  75. data/fckeditor/editor/_source/internals/fckselection_ie.js +158 -0
  76. data/fckeditor/editor/_source/internals/fcktablehandler.js +385 -0
  77. data/fckeditor/editor/_source/internals/fcktablehandler_gecko.js +57 -0
  78. data/fckeditor/editor/_source/internals/fcktablehandler_ie.js +58 -0
  79. data/fckeditor/editor/_source/internals/fcktoolbaritems.js +121 -0
  80. data/fckeditor/editor/_source/internals/fcktoolbarset.js +357 -0
  81. data/fckeditor/editor/_source/internals/fcktools.js +225 -0
  82. data/fckeditor/editor/_source/internals/fcktools_gecko.js +235 -0
  83. data/fckeditor/editor/_source/internals/fcktools_ie.js +214 -0
  84. data/fckeditor/editor/_source/internals/fckundo_gecko.js +27 -0
  85. data/fckeditor/editor/_source/internals/fckundo_ie.js +123 -0
  86. data/fckeditor/editor/_source/internals/fckurlparams.js +39 -0
  87. data/fckeditor/editor/_source/internals/fckxhtml.js +466 -0
  88. data/fckeditor/editor/_source/internals/fckxhtml_gecko.js +66 -0
  89. data/fckeditor/editor/_source/internals/fckxhtml_ie.js +194 -0
  90. data/fckeditor/editor/_source/internals/fckxhtmlentities.js +345 -0
  91. data/fckeditor/editor/css/behaviors/disablehandles.htc +15 -0
  92. data/fckeditor/editor/css/behaviors/showtableborders.htc +36 -0
  93. data/fckeditor/editor/css/fck_editorarea.css +91 -0
  94. data/fckeditor/editor/css/fck_internal.css +111 -0
  95. data/fckeditor/editor/css/fck_showtableborders_gecko.css +42 -0
  96. data/fckeditor/editor/css/images/fck_anchor.gif +0 -0
  97. data/fckeditor/editor/css/images/fck_flashlogo.gif +0 -0
  98. data/fckeditor/editor/css/images/fck_hiddenfield.gif +0 -0
  99. data/fckeditor/editor/css/images/fck_pagebreak.gif +0 -0
  100. data/fckeditor/editor/dialog/common/fck_dialog_common.css +83 -0
  101. data/fckeditor/editor/dialog/common/fck_dialog_common.js +154 -0
  102. data/fckeditor/editor/dialog/common/fcknumericfield.htc +24 -0
  103. data/fckeditor/editor/dialog/common/images/locked.gif +0 -0
  104. data/fckeditor/editor/dialog/common/images/reset.gif +0 -0
  105. data/fckeditor/editor/dialog/common/images/unlocked.gif +0 -0
  106. data/fckeditor/editor/dialog/common/moz-bindings.xml +30 -0
  107. data/fckeditor/editor/dialog/fck_about.html +155 -0
  108. data/fckeditor/editor/dialog/fck_about/logo_fckeditor.gif +0 -0
  109. data/fckeditor/editor/dialog/fck_about/logo_fredck.gif +0 -0
  110. data/fckeditor/editor/dialog/fck_anchor.html +227 -0
  111. data/fckeditor/editor/dialog/fck_button.html +107 -0
  112. data/fckeditor/editor/dialog/fck_checkbox.html +107 -0
  113. data/fckeditor/editor/dialog/fck_colorselector.html +171 -0
  114. data/fckeditor/editor/dialog/fck_docprops.html +600 -0
  115. data/fckeditor/editor/dialog/fck_docprops/fck_document_preview.html +113 -0
  116. data/fckeditor/editor/dialog/fck_find.html +173 -0
  117. data/fckeditor/editor/dialog/fck_flash.html +146 -0
  118. data/fckeditor/editor/dialog/fck_flash/fck_flash.js +288 -0
  119. data/fckeditor/editor/dialog/fck_flash/fck_flash_preview.html +46 -0
  120. data/fckeditor/editor/dialog/fck_form.html +105 -0
  121. data/fckeditor/editor/dialog/fck_hiddenfield.html +116 -0
  122. data/fckeditor/editor/dialog/fck_image.html +252 -0
  123. data/fckeditor/editor/dialog/fck_image/fck_image.js +486 -0
  124. data/fckeditor/editor/dialog/fck_image/fck_image_preview.html +66 -0
  125. data/fckeditor/editor/dialog/fck_link.html +293 -0
  126. data/fckeditor/editor/dialog/fck_link/fck_link.js +664 -0
  127. data/fckeditor/editor/dialog/fck_listprop.html +116 -0
  128. data/fckeditor/editor/dialog/fck_paste.html +285 -0
  129. data/fckeditor/editor/dialog/fck_radiobutton.html +107 -0
  130. data/fckeditor/editor/dialog/fck_replace.html +156 -0
  131. data/fckeditor/editor/dialog/fck_select.html +176 -0
  132. data/fckeditor/editor/dialog/fck_select/fck_select.js +169 -0
  133. data/fckeditor/editor/dialog/fck_smiley.html +105 -0
  134. data/fckeditor/editor/dialog/fck_source.html +65 -0
  135. data/fckeditor/editor/dialog/fck_specialchar.html +113 -0
  136. data/fckeditor/editor/dialog/fck_spellerpages.html +64 -0
  137. data/fckeditor/editor/dialog/fck_spellerpages/spellerpages/blank.html +0 -0
  138. data/fckeditor/editor/dialog/fck_spellerpages/spellerpages/controlWindow.js +87 -0
  139. data/fckeditor/editor/dialog/fck_spellerpages/spellerpages/controls.html +153 -0
  140. data/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.cfm +174 -0
  141. data/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.php +196 -0
  142. data/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.pl +180 -0
  143. data/fckeditor/editor/dialog/fck_spellerpages/spellerpages/spellChecker.js +462 -0
  144. data/fckeditor/editor/dialog/fck_spellerpages/spellerpages/spellchecker.html +71 -0
  145. data/fckeditor/editor/dialog/fck_spellerpages/spellerpages/spellerStyle.css +49 -0
  146. data/fckeditor/editor/dialog/fck_spellerpages/spellerpages/wordWindow.js +272 -0
  147. data/fckeditor/editor/dialog/fck_table.html +286 -0
  148. data/fckeditor/editor/dialog/fck_tablecell.html +255 -0
  149. data/fckeditor/editor/dialog/fck_template.html +242 -0
  150. data/fckeditor/editor/dialog/fck_template/images/template1.gif +0 -0
  151. data/fckeditor/editor/dialog/fck_template/images/template2.gif +0 -0
  152. data/fckeditor/editor/dialog/fck_template/images/template3.gif +0 -0
  153. data/fckeditor/editor/dialog/fck_textarea.html +94 -0
  154. data/fckeditor/editor/dialog/fck_textfield.html +139 -0
  155. data/fckeditor/editor/fckdebug.html +153 -0
  156. data/fckeditor/editor/fckdialog.html +324 -0
  157. data/fckeditor/editor/fckeditor.html +227 -0
  158. data/fckeditor/editor/fckeditor.original.html +319 -0
  159. data/fckeditor/editor/filemanager/browser/default/browser.css +88 -0
  160. data/fckeditor/editor/filemanager/browser/default/browser.html +154 -0
  161. data/fckeditor/editor/filemanager/browser/default/connectors/asp/basexml.asp +62 -0
  162. data/fckeditor/editor/filemanager/browser/default/connectors/asp/class_upload.asp +234 -0
  163. data/fckeditor/editor/filemanager/browser/default/connectors/asp/commands.asp +183 -0
  164. data/fckeditor/editor/filemanager/browser/default/connectors/asp/config.asp +49 -0
  165. data/fckeditor/editor/filemanager/browser/default/connectors/asp/connector.asp +124 -0
  166. data/fckeditor/editor/filemanager/browser/default/connectors/asp/io.asp +89 -0
  167. data/fckeditor/editor/filemanager/browser/default/connectors/asp/util.asp +55 -0
  168. data/fckeditor/editor/filemanager/browser/default/connectors/aspx/connector.aspx +30 -0
  169. data/fckeditor/editor/filemanager/browser/default/connectors/cfm/config.cfm +99 -0
  170. data/fckeditor/editor/filemanager/browser/default/connectors/cfm/connector.cfm +363 -0
  171. data/fckeditor/editor/filemanager/browser/default/connectors/lasso/config.lasso +65 -0
  172. data/fckeditor/editor/filemanager/browser/default/connectors/lasso/connector.lasso +249 -0
  173. data/fckeditor/editor/filemanager/browser/default/connectors/perl/basexml.pl +63 -0
  174. data/fckeditor/editor/filemanager/browser/default/connectors/perl/commands.pl +158 -0
  175. data/fckeditor/editor/filemanager/browser/default/connectors/perl/connector.cgi +137 -0
  176. data/fckeditor/editor/filemanager/browser/default/connectors/perl/io.pl +131 -0
  177. data/fckeditor/editor/filemanager/browser/default/connectors/perl/upload_fck.pl +667 -0
  178. data/fckeditor/editor/filemanager/browser/default/connectors/perl/util.pl +60 -0
  179. data/fckeditor/editor/filemanager/browser/default/connectors/php/basexml.php +75 -0
  180. data/fckeditor/editor/filemanager/browser/default/connectors/php/commands.php +222 -0
  181. data/fckeditor/editor/filemanager/browser/default/connectors/php/config.php +56 -0
  182. data/fckeditor/editor/filemanager/browser/default/connectors/php/connector.php +113 -0
  183. data/fckeditor/editor/filemanager/browser/default/connectors/php/io.php +101 -0
  184. data/fckeditor/editor/filemanager/browser/default/connectors/php/util.php +41 -0
  185. data/fckeditor/editor/filemanager/browser/default/connectors/py/connector.py +785 -0
  186. data/fckeditor/editor/filemanager/browser/default/connectors/test.html +180 -0
  187. data/fckeditor/editor/filemanager/browser/default/frmactualfolder.html +67 -0
  188. data/fckeditor/editor/filemanager/browser/default/frmcreatefolder.html +113 -0
  189. data/fckeditor/editor/filemanager/browser/default/frmfolders.html +196 -0
  190. data/fckeditor/editor/filemanager/browser/default/frmresourceslist.html +160 -0
  191. data/fckeditor/editor/filemanager/browser/default/frmresourcetype.html +65 -0
  192. data/fckeditor/editor/filemanager/browser/default/frmupload.html +113 -0
  193. data/fckeditor/editor/filemanager/browser/default/images/ButtonArrow.gif +0 -0
  194. data/fckeditor/editor/filemanager/browser/default/images/Folder.gif +0 -0
  195. data/fckeditor/editor/filemanager/browser/default/images/Folder32.gif +0 -0
  196. data/fckeditor/editor/filemanager/browser/default/images/FolderOpened.gif +0 -0
  197. data/fckeditor/editor/filemanager/browser/default/images/FolderOpened32.gif +0 -0
  198. data/fckeditor/editor/filemanager/browser/default/images/FolderUp.gif +0 -0
  199. data/fckeditor/editor/filemanager/browser/default/images/icons/32/ai.gif +0 -0
  200. data/fckeditor/editor/filemanager/browser/default/images/icons/32/avi.gif +0 -0
  201. data/fckeditor/editor/filemanager/browser/default/images/icons/32/bmp.gif +0 -0
  202. data/fckeditor/editor/filemanager/browser/default/images/icons/32/cs.gif +0 -0
  203. data/fckeditor/editor/filemanager/browser/default/images/icons/32/default.icon.gif +0 -0
  204. data/fckeditor/editor/filemanager/browser/default/images/icons/32/dll.gif +0 -0
  205. data/fckeditor/editor/filemanager/browser/default/images/icons/32/doc.gif +0 -0
  206. data/fckeditor/editor/filemanager/browser/default/images/icons/32/exe.gif +0 -0
  207. data/fckeditor/editor/filemanager/browser/default/images/icons/32/fla.gif +0 -0
  208. data/fckeditor/editor/filemanager/browser/default/images/icons/32/gif.gif +0 -0
  209. data/fckeditor/editor/filemanager/browser/default/images/icons/32/htm.gif +0 -0
  210. data/fckeditor/editor/filemanager/browser/default/images/icons/32/html.gif +0 -0
  211. data/fckeditor/editor/filemanager/browser/default/images/icons/32/jpg.gif +0 -0
  212. data/fckeditor/editor/filemanager/browser/default/images/icons/32/js.gif +0 -0
  213. data/fckeditor/editor/filemanager/browser/default/images/icons/32/mdb.gif +0 -0
  214. data/fckeditor/editor/filemanager/browser/default/images/icons/32/mp3.gif +0 -0
  215. data/fckeditor/editor/filemanager/browser/default/images/icons/32/pdf.gif +0 -0
  216. data/fckeditor/editor/filemanager/browser/default/images/icons/32/png.gif +0 -0
  217. data/fckeditor/editor/filemanager/browser/default/images/icons/32/ppt.gif +0 -0
  218. data/fckeditor/editor/filemanager/browser/default/images/icons/32/rdp.gif +0 -0
  219. data/fckeditor/editor/filemanager/browser/default/images/icons/32/swf.gif +0 -0
  220. data/fckeditor/editor/filemanager/browser/default/images/icons/32/swt.gif +0 -0
  221. data/fckeditor/editor/filemanager/browser/default/images/icons/32/txt.gif +0 -0
  222. data/fckeditor/editor/filemanager/browser/default/images/icons/32/vsd.gif +0 -0
  223. data/fckeditor/editor/filemanager/browser/default/images/icons/32/xls.gif +0 -0
  224. data/fckeditor/editor/filemanager/browser/default/images/icons/32/xml.gif +0 -0
  225. data/fckeditor/editor/filemanager/browser/default/images/icons/32/zip.gif +0 -0
  226. data/fckeditor/editor/filemanager/browser/default/images/icons/ai.gif +0 -0
  227. data/fckeditor/editor/filemanager/browser/default/images/icons/avi.gif +0 -0
  228. data/fckeditor/editor/filemanager/browser/default/images/icons/bmp.gif +0 -0
  229. data/fckeditor/editor/filemanager/browser/default/images/icons/cs.gif +0 -0
  230. data/fckeditor/editor/filemanager/browser/default/images/icons/default.icon.gif +0 -0
  231. data/fckeditor/editor/filemanager/browser/default/images/icons/dll.gif +0 -0
  232. data/fckeditor/editor/filemanager/browser/default/images/icons/doc.gif +0 -0
  233. data/fckeditor/editor/filemanager/browser/default/images/icons/exe.gif +0 -0
  234. data/fckeditor/editor/filemanager/browser/default/images/icons/fla.gif +0 -0
  235. data/fckeditor/editor/filemanager/browser/default/images/icons/gif.gif +0 -0
  236. data/fckeditor/editor/filemanager/browser/default/images/icons/htm.gif +0 -0
  237. data/fckeditor/editor/filemanager/browser/default/images/icons/html.gif +0 -0
  238. data/fckeditor/editor/filemanager/browser/default/images/icons/jpg.gif +0 -0
  239. data/fckeditor/editor/filemanager/browser/default/images/icons/js.gif +0 -0
  240. data/fckeditor/editor/filemanager/browser/default/images/icons/mdb.gif +0 -0
  241. data/fckeditor/editor/filemanager/browser/default/images/icons/mp3.gif +0 -0
  242. data/fckeditor/editor/filemanager/browser/default/images/icons/pdf.gif +0 -0
  243. data/fckeditor/editor/filemanager/browser/default/images/icons/png.gif +0 -0
  244. data/fckeditor/editor/filemanager/browser/default/images/icons/ppt.gif +0 -0
  245. data/fckeditor/editor/filemanager/browser/default/images/icons/rdp.gif +0 -0
  246. data/fckeditor/editor/filemanager/browser/default/images/icons/swf.gif +0 -0
  247. data/fckeditor/editor/filemanager/browser/default/images/icons/swt.gif +0 -0
  248. data/fckeditor/editor/filemanager/browser/default/images/icons/txt.gif +0 -0
  249. data/fckeditor/editor/filemanager/browser/default/images/icons/vsd.gif +0 -0
  250. data/fckeditor/editor/filemanager/browser/default/images/icons/xls.gif +0 -0
  251. data/fckeditor/editor/filemanager/browser/default/images/icons/xml.gif +0 -0
  252. data/fckeditor/editor/filemanager/browser/default/images/icons/zip.gif +0 -0
  253. data/fckeditor/editor/filemanager/browser/default/images/spacer.gif +0 -0
  254. data/fckeditor/editor/filemanager/browser/default/js/common.js +55 -0
  255. data/fckeditor/editor/filemanager/browser/default/js/fckxml.js +130 -0
  256. data/fckeditor/editor/filemanager/upload/asp/class_upload.asp +234 -0
  257. data/fckeditor/editor/filemanager/upload/asp/config.asp +52 -0
  258. data/fckeditor/editor/filemanager/upload/asp/io.asp +29 -0
  259. data/fckeditor/editor/filemanager/upload/asp/upload.asp +121 -0
  260. data/fckeditor/editor/filemanager/upload/aspx/upload.aspx +30 -0
  261. data/fckeditor/editor/filemanager/upload/cfm/config.cfm +98 -0
  262. data/fckeditor/editor/filemanager/upload/cfm/upload.cfm +168 -0
  263. data/fckeditor/editor/filemanager/upload/lasso/config.lasso +65 -0
  264. data/fckeditor/editor/filemanager/upload/lasso/upload.lasso +157 -0
  265. data/fckeditor/editor/filemanager/upload/php/config.php +56 -0
  266. data/fckeditor/editor/filemanager/upload/php/upload.php +124 -0
  267. data/fckeditor/editor/filemanager/upload/php/util.php +40 -0
  268. data/fckeditor/editor/filemanager/upload/test.html +133 -0
  269. data/fckeditor/editor/images/anchor.gif +0 -0
  270. data/fckeditor/editor/images/arrow_ltr.gif +0 -0
  271. data/fckeditor/editor/images/arrow_rtl.gif +0 -0
  272. data/fckeditor/editor/images/smiley/msn/angel_smile.gif +0 -0
  273. data/fckeditor/editor/images/smiley/msn/angry_smile.gif +0 -0
  274. data/fckeditor/editor/images/smiley/msn/broken_heart.gif +0 -0
  275. data/fckeditor/editor/images/smiley/msn/cake.gif +0 -0
  276. data/fckeditor/editor/images/smiley/msn/confused_smile.gif +0 -0
  277. data/fckeditor/editor/images/smiley/msn/cry_smile.gif +0 -0
  278. data/fckeditor/editor/images/smiley/msn/devil_smile.gif +0 -0
  279. data/fckeditor/editor/images/smiley/msn/embaressed_smile.gif +0 -0
  280. data/fckeditor/editor/images/smiley/msn/envelope.gif +0 -0
  281. data/fckeditor/editor/images/smiley/msn/heart.gif +0 -0
  282. data/fckeditor/editor/images/smiley/msn/kiss.gif +0 -0
  283. data/fckeditor/editor/images/smiley/msn/lightbulb.gif +0 -0
  284. data/fckeditor/editor/images/smiley/msn/omg_smile.gif +0 -0
  285. data/fckeditor/editor/images/smiley/msn/regular_smile.gif +0 -0
  286. data/fckeditor/editor/images/smiley/msn/sad_smile.gif +0 -0
  287. data/fckeditor/editor/images/smiley/msn/shades_smile.gif +0 -0
  288. data/fckeditor/editor/images/smiley/msn/teeth_smile.gif +0 -0
  289. data/fckeditor/editor/images/smiley/msn/thumbs_down.gif +0 -0
  290. data/fckeditor/editor/images/smiley/msn/thumbs_up.gif +0 -0
  291. data/fckeditor/editor/images/smiley/msn/tounge_smile.gif +0 -0
  292. data/fckeditor/editor/images/smiley/msn/whatchutalkingabout_smile.gif +0 -0
  293. data/fckeditor/editor/images/smiley/msn/wink_smile.gif +0 -0
  294. data/fckeditor/editor/images/spacer.gif +0 -0
  295. data/fckeditor/editor/js/fckeditorcode_gecko.js +98 -0
  296. data/fckeditor/editor/js/fckeditorcode_ie.js +99 -0
  297. data/fckeditor/editor/lang/_getfontformat.html +85 -0
  298. data/fckeditor/editor/lang/_translationstatus.txt +76 -0
  299. data/fckeditor/editor/lang/af.js +504 -0
  300. data/fckeditor/editor/lang/ar.js +504 -0
  301. data/fckeditor/editor/lang/bg.js +504 -0
  302. data/fckeditor/editor/lang/bn.js +504 -0
  303. data/fckeditor/editor/lang/bs.js +504 -0
  304. data/fckeditor/editor/lang/ca.js +504 -0
  305. data/fckeditor/editor/lang/cs.js +504 -0
  306. data/fckeditor/editor/lang/da.js +504 -0
  307. data/fckeditor/editor/lang/de.js +504 -0
  308. data/fckeditor/editor/lang/el.js +504 -0
  309. data/fckeditor/editor/lang/en-au.js +504 -0
  310. data/fckeditor/editor/lang/en-ca.js +504 -0
  311. data/fckeditor/editor/lang/en-uk.js +504 -0
  312. data/fckeditor/editor/lang/en.js +504 -0
  313. data/fckeditor/editor/lang/eo.js +504 -0
  314. data/fckeditor/editor/lang/es.js +504 -0
  315. data/fckeditor/editor/lang/et.js +504 -0
  316. data/fckeditor/editor/lang/eu.js +505 -0
  317. data/fckeditor/editor/lang/fa.js +504 -0
  318. data/fckeditor/editor/lang/fi.js +504 -0
  319. data/fckeditor/editor/lang/fo.js +504 -0
  320. data/fckeditor/editor/lang/fr.js +504 -0
  321. data/fckeditor/editor/lang/gl.js +504 -0
  322. data/fckeditor/editor/lang/he.js +504 -0
  323. data/fckeditor/editor/lang/hi.js +504 -0
  324. data/fckeditor/editor/lang/hr.js +504 -0
  325. data/fckeditor/editor/lang/hu.js +504 -0
  326. data/fckeditor/editor/lang/it.js +504 -0
  327. data/fckeditor/editor/lang/ja.js +504 -0
  328. data/fckeditor/editor/lang/km.js +504 -0
  329. data/fckeditor/editor/lang/ko.js +504 -0
  330. data/fckeditor/editor/lang/lt.js +504 -0
  331. data/fckeditor/editor/lang/lv.js +504 -0
  332. data/fckeditor/editor/lang/mn.js +504 -0
  333. data/fckeditor/editor/lang/ms.js +504 -0
  334. data/fckeditor/editor/lang/nb.js +504 -0
  335. data/fckeditor/editor/lang/nl.js +504 -0
  336. data/fckeditor/editor/lang/no.js +504 -0
  337. data/fckeditor/editor/lang/pl.js +504 -0
  338. data/fckeditor/editor/lang/pt-br.js +504 -0
  339. data/fckeditor/editor/lang/pt.js +504 -0
  340. data/fckeditor/editor/lang/ro.js +504 -0
  341. data/fckeditor/editor/lang/ru.js +504 -0
  342. data/fckeditor/editor/lang/sk.js +504 -0
  343. data/fckeditor/editor/lang/sl.js +504 -0
  344. data/fckeditor/editor/lang/sr-latn.js +504 -0
  345. data/fckeditor/editor/lang/sr.js +504 -0
  346. data/fckeditor/editor/lang/sv.js +504 -0
  347. data/fckeditor/editor/lang/th.js +504 -0
  348. data/fckeditor/editor/lang/tr.js +504 -0
  349. data/fckeditor/editor/lang/uk.js +504 -0
  350. data/fckeditor/editor/lang/vi.js +504 -0
  351. data/fckeditor/editor/lang/zh-cn.js +504 -0
  352. data/fckeditor/editor/lang/zh.js +504 -0
  353. data/fckeditor/editor/plugins/autogrow/fckplugin.js +92 -0
  354. data/fckeditor/editor/plugins/placeholder/fck_placeholder.html +100 -0
  355. data/fckeditor/editor/plugins/placeholder/fckplugin.js +187 -0
  356. data/fckeditor/editor/plugins/placeholder/lang/de.js +27 -0
  357. data/fckeditor/editor/plugins/placeholder/lang/en.js +27 -0
  358. data/fckeditor/editor/plugins/placeholder/lang/fr.js +27 -0
  359. data/fckeditor/editor/plugins/placeholder/lang/it.js +27 -0
  360. data/fckeditor/editor/plugins/placeholder/lang/pl.js +27 -0
  361. data/fckeditor/editor/plugins/placeholder/placeholder.gif +0 -0
  362. data/fckeditor/editor/plugins/simplecommands/fckplugin.js +29 -0
  363. data/fckeditor/editor/plugins/tablecommands/fckplugin.js +32 -0
  364. data/fckeditor/editor/skins/_fckviewstrips.html +121 -0
  365. data/fckeditor/editor/skins/default/fck_dialog.css +137 -0
  366. data/fckeditor/editor/skins/default/fck_editor.css +464 -0
  367. data/fckeditor/editor/skins/default/fck_strip.gif +0 -0
  368. data/fckeditor/editor/skins/default/images/toolbar.arrowright.gif +0 -0
  369. data/fckeditor/editor/skins/default/images/toolbar.buttonarrow.gif +0 -0
  370. data/fckeditor/editor/skins/default/images/toolbar.collapse.gif +0 -0
  371. data/fckeditor/editor/skins/default/images/toolbar.end.gif +0 -0
  372. data/fckeditor/editor/skins/default/images/toolbar.expand.gif +0 -0
  373. data/fckeditor/editor/skins/default/images/toolbar.separator.gif +0 -0
  374. data/fckeditor/editor/skins/default/images/toolbar.start.gif +0 -0
  375. data/fckeditor/editor/skins/office2003/fck_dialog.css +138 -0
  376. data/fckeditor/editor/skins/office2003/fck_editor.css +476 -0
  377. data/fckeditor/editor/skins/office2003/fck_strip.gif +0 -0
  378. data/fckeditor/editor/skins/office2003/images/toolbar.arrowright.gif +0 -0
  379. data/fckeditor/editor/skins/office2003/images/toolbar.bg.gif +0 -0
  380. data/fckeditor/editor/skins/office2003/images/toolbar.buttonarrow.gif +0 -0
  381. data/fckeditor/editor/skins/office2003/images/toolbar.collapse.gif +0 -0
  382. data/fckeditor/editor/skins/office2003/images/toolbar.end.gif +0 -0
  383. data/fckeditor/editor/skins/office2003/images/toolbar.expand.gif +0 -0
  384. data/fckeditor/editor/skins/office2003/images/toolbar.separator.gif +0 -0
  385. data/fckeditor/editor/skins/office2003/images/toolbar.start.gif +0 -0
  386. data/fckeditor/editor/skins/silver/fck_dialog.css +141 -0
  387. data/fckeditor/editor/skins/silver/fck_editor.css +473 -0
  388. data/fckeditor/editor/skins/silver/fck_strip.gif +0 -0
  389. data/fckeditor/editor/skins/silver/images/toolbar.arrowright.gif +0 -0
  390. data/fckeditor/editor/skins/silver/images/toolbar.buttonarrow.gif +0 -0
  391. data/fckeditor/editor/skins/silver/images/toolbar.buttonbg.gif +0 -0
  392. data/fckeditor/editor/skins/silver/images/toolbar.collapse.gif +0 -0
  393. data/fckeditor/editor/skins/silver/images/toolbar.end.gif +0 -0
  394. data/fckeditor/editor/skins/silver/images/toolbar.expand.gif +0 -0
  395. data/fckeditor/editor/skins/silver/images/toolbar.separator.gif +0 -0
  396. data/fckeditor/editor/skins/silver/images/toolbar.start.gif +0 -0
  397. data/fckeditor/fckconfig.js +224 -0
  398. data/fckeditor/fckeditor.js +214 -0
  399. data/fckeditor/fckstyles.xml +53 -0
  400. data/fckeditor/fcktemplates.xml +103 -0
  401. data/lib/Wiki2GoEditor/Install/editor.rb +39 -0
  402. data/test/test_install.rb +40 -0
  403. metadata +517 -0
@@ -0,0 +1,174 @@
1
+ <cfsilent>
2
+ <!---
3
+ This code uses a CF User Defined Function and should work in CF version 5.0
4
+ and up without alteration.
5
+
6
+ Also if you are hosting your site at an ISP, you will have to check with them
7
+ to see if the use of <CFEXECUTE> is allowed. In most cases ISP will not allow
8
+ the use of that tag for security reasons. Clients would be able to access each
9
+ others files in certain cases.
10
+ --->
11
+
12
+ <!---
13
+ The following variables values must reflect your installation needs.
14
+ --->
15
+ <cfset apsell_dir = "c:\aspell\bin">
16
+
17
+ <cfset lang = "en_US">
18
+ <cfset aspell_opts = "-a --lang=#lang# --encoding=utf-8 -H">
19
+
20
+ <!--- Be sure the temporary folder exists --->
21
+ <cfset tempFolder = "c:\aspell\temp">
22
+ <cfset tempfile = "spell_#randrange(1,10000)#">
23
+
24
+ <cfset spellercss = "../spellerStyle.css">
25
+ <cfset word_win_src = "../wordWindow.js">
26
+
27
+ <cfset form.checktext = form["textinputs[]"]>
28
+
29
+ <cfscript>
30
+ function LastIndexOf(subs, str)
31
+ {
32
+ return Len(str) - Find(subs, Reverse(str)) + 1;
33
+ }
34
+ </cfscript>
35
+
36
+ <!--- Takes care of those pesky smart quotes from MS apps, replaces them with regular quotes --->
37
+ <cfparam name="url.checktext" default="">
38
+ <cfparam name="form.checktext" default="#url.checktext#">
39
+ <cfset submitted_text = replacelist(form.checktext,"%u201C,%u201D","%22,%22")>
40
+
41
+ <!--- submitted_text now is ready for processing --->
42
+
43
+ <!--- use carat on each line to escape possible aspell commands --->
44
+ <cfset text = "">
45
+ <cfset crlf = Chr(13) & Chr(10)>
46
+
47
+ <cfloop list="#submitted_text#" index="field" delimiters=",">
48
+ <cfset text = text & "%" & crlf
49
+ & "^A" & crlf
50
+ & "!" & crlf>
51
+ <cfset field = URLDecode(field)>
52
+ <cfloop list="#field#" index="line" delimiters="#crlf#">
53
+ <!--- <cfset submitted_text = replace(submitted_text,"'","\'","All")>
54
+ <cfset submitted_text = replace(submitted_text,"""","\""","All")> --->
55
+ <cfset text = text & "^" & Trim(JSStringFormat(line)) & "#crlf#">
56
+ </cfloop>
57
+ </cfloop>
58
+
59
+
60
+ <!--- need to escape special javascript characters such as ' --->
61
+ <cfset unaltered_text = submitted_text>
62
+
63
+ <!--- create temp file from the submitted text, this will be passed to aspell to be check for misspelled words --->
64
+ <cffile action="write" file="#tempFolder#\#tempfile#.txt" output="#text#" charset="utf-8">
65
+
66
+ <!--- cfsavecontent is used to set the variable that will be returned with the results from aspell.
67
+ If your using the new version of mx 6.1 you can use the following cfexecute tag instead:
68
+ <cfexecute name="C:\WINDOWS\SYSTEM32\cmd.exe" arguments="/c type c:\test\#tempfile#.txt | c:\aspell\bin\aspell #aspell_opts#" timeout="100" variable="results"></cfexecute> --->
69
+
70
+
71
+
72
+ <cfsavecontent variable="food">
73
+ <cfexecute name="C:\WINDOWS\SYSTEM32\cmd.exe" arguments="/c type #tempFolder#\#tempfile#.txt | #apsell_dir#\aspell #aspell_opts#" timeout="100"></cfexecute>
74
+ </cfsavecontent>
75
+
76
+
77
+
78
+ <!--- remove temp file --->
79
+ <cffile action="delete" file="#tempFolder#\#tempfile#.txt">
80
+
81
+ <cfset texts = StructNew()>
82
+ <cfset texts.textinputs = "">
83
+ <cfset texts.words = "">
84
+ <cfset texts.abort = "">
85
+
86
+ <!--- Generate Text Inputs --->
87
+
88
+ <cfset i = "0">
89
+ <cfloop index="text" list="#form.checktext#">
90
+ <cfset texts.textinputs = ListAppend(texts.textinputs, 'textinputs[#i#] = decodeURIComponent("#text#");', '#Chr(13)##Chr(10)#')>
91
+ <cfset i = i + "1">
92
+ </cfloop>
93
+
94
+ <!--- Generate Words Lists --->
95
+
96
+ <cfset cnt = "1">
97
+ <cfset word_cnt = "0">
98
+ <cfset input_cnt = "-1">
99
+ <cfloop list="#food#" index="list" delimiters="#chr(10)##chr(13)#">
100
+ <!--- removes the first line of the aspell output "@(#) International Ispell Version 3.1.20 (but really Aspell 0.50.3)" --->
101
+ <cfif NOT cnt IS "1">
102
+ <cfif Find("&", list) OR Find("##", list)>
103
+ <!--- word that misspelled --->
104
+ <cfset bad_word = listGetAt(list, "2", " ")>
105
+ <!--- sugestions --->
106
+ <cfset wrdList = mid(list,(LastIndexOf(':', list) + 2),(len(list) - (LastIndexOf(':', list) + 2)))>
107
+ <cfset wrdsList = "">
108
+ <cfloop list="#wrdList#" index="idx">
109
+ <cfset wrdsList = ListAppend(wrdsList, " '" & trim(replace(idx,"'","\'","All")) & "'", ", ")>
110
+ </cfloop>
111
+ <cfset wrdsList = Right(wrdsList, Len(wrdsList) - 1)>
112
+ <!--- javascript --->
113
+ <cfset texts.words = ListAppend(texts.words, "words[#input_cnt#][#word_cnt#] = '#trim(replace(bad_word,"'","\'","All"))#';", "#Chr(13)##Chr(10)#")>
114
+ <cfset texts.words = ListAppend(texts.words, "suggs[#input_cnt#][#word_cnt#] = [#trim(wrdsList)#];", "#Chr(13)##Chr(10)#")>
115
+ <cfset word_cnt = word_cnt + 1>
116
+ <cfelseif find("*", list)>
117
+ <cfset input_cnt = input_cnt + "1">
118
+ <cfset word_cnt = "0">
119
+ <cfset texts.words = ListAppend(texts.words, "words[#input_cnt#] = [];", "#crlf#")>
120
+ <cfset texts.words = ListAppend(texts.words, "suggs[#input_cnt#] = [];", "#crlf#")>
121
+ </cfif>
122
+ </cfif>
123
+ <cfset cnt = cnt + 1>
124
+ </cfloop>
125
+
126
+ <cfif texts.words IS "">
127
+ <cfset texts.abort = "alert('Spell check complete.\n\nNo misspellings found.');#chrlf#top.window.close();">
128
+ </cfif>
129
+
130
+ </cfsilent><cfoutput><cfcontent type="text/html"><html>
131
+ <head>
132
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
133
+ <link rel="stylesheet" type="text/css" href="#spellercss#" />
134
+ <script language="javascript" src="#word_win_src#"></script>
135
+ <script language="javascript">
136
+ var suggs = new Array();
137
+ var words = new Array();
138
+ var textinputs = new Array();
139
+ var error;
140
+
141
+ #texts.textinputs##Chr(13)##Chr(10)#
142
+ #texts.words#
143
+ #texts.abort#
144
+
145
+ var wordWindowObj = new wordWindow();
146
+ wordWindowObj.originalSpellings = words;
147
+ wordWindowObj.suggestions = suggs;
148
+ wordWindowObj.textInputs = textinputs;
149
+
150
+ function init_spell() {
151
+ // check if any error occured during server-side processing
152
+ if( error ) {
153
+ alert( error );
154
+ } else {
155
+ // call the init_spell() function in the parent frameset
156
+ if (parent.frames.length) {
157
+ parent.init_spell( wordWindowObj );
158
+ } else {
159
+ alert('This page was loaded outside of a frameset. It might not display properly');
160
+ }
161
+ }
162
+ }
163
+
164
+ </script>
165
+
166
+ </head>
167
+ <body onLoad="init_spell();">
168
+
169
+ <script type="text/javascript">
170
+ wordWindowObj.writeBody();
171
+ </script>
172
+
173
+ </body>
174
+ </html></cfoutput>
@@ -0,0 +1,196 @@
1
+ <?php
2
+ header('Content-type: text/html; charset=utf-8');
3
+
4
+ // The following variables values must reflect your installation needs.
5
+
6
+ $aspell_prog = '"C:\Program Files\Aspell\bin\aspell.exe"'; // by FredCK (for Windows)
7
+ //$aspell_prog = 'aspell'; // by FredCK (for Linux)
8
+
9
+ $lang = 'en_US';
10
+ $aspell_opts = "-a --lang=$lang --encoding=utf-8 -H"; // by FredCK
11
+
12
+ $tempfiledir = "./";
13
+
14
+ $spellercss = '../spellerStyle.css'; // by FredCK
15
+ $word_win_src = '../wordWindow.js'; // by FredCK
16
+
17
+ $textinputs = $_POST['textinputs']; # array
18
+ $input_separator = "A";
19
+
20
+ # set the JavaScript variable to the submitted text.
21
+ # textinputs is an array, each element corresponding to the (url-encoded)
22
+ # value of the text control submitted for spell-checking
23
+ function print_textinputs_var() {
24
+ global $textinputs;
25
+ foreach( $textinputs as $key=>$val ) {
26
+ # $val = str_replace( "'", "%27", $val );
27
+ echo "textinputs[$key] = decodeURIComponent(\"" . $val . "\");\n";
28
+ }
29
+ }
30
+
31
+ # make declarations for the text input index
32
+ function print_textindex_decl( $text_input_idx ) {
33
+ echo "words[$text_input_idx] = [];\n";
34
+ echo "suggs[$text_input_idx] = [];\n";
35
+ }
36
+
37
+ # set an element of the JavaScript 'words' array to a misspelled word
38
+ function print_words_elem( $word, $index, $text_input_idx ) {
39
+ echo "words[$text_input_idx][$index] = '" . escape_quote( $word ) . "';\n";
40
+ }
41
+
42
+
43
+ # set an element of the JavaScript 'suggs' array to a list of suggestions
44
+ function print_suggs_elem( $suggs, $index, $text_input_idx ) {
45
+ echo "suggs[$text_input_idx][$index] = [";
46
+ foreach( $suggs as $key=>$val ) {
47
+ if( $val ) {
48
+ echo "'" . escape_quote( $val ) . "'";
49
+ if ( $key+1 < count( $suggs )) {
50
+ echo ", ";
51
+ }
52
+ }
53
+ }
54
+ echo "];\n";
55
+ }
56
+
57
+ # escape single quote
58
+ function escape_quote( $str ) {
59
+ return preg_replace ( "/'/", "\\'", $str );
60
+ }
61
+
62
+
63
+ # handle a server-side error.
64
+ function error_handler( $err ) {
65
+ echo "error = '" . escape_quote( $err ) . "';\n";
66
+ }
67
+
68
+ ## get the list of misspelled words. Put the results in the javascript words array
69
+ ## for each misspelled word, get suggestions and put in the javascript suggs array
70
+ function print_checker_results() {
71
+
72
+ global $aspell_prog;
73
+ global $aspell_opts;
74
+ global $tempfiledir;
75
+ global $textinputs;
76
+ global $input_separator;
77
+ $aspell_err = "";
78
+ # create temp file
79
+ $tempfile = tempnam( $tempfiledir, 'aspell_data_' );
80
+
81
+ # open temp file, add the submitted text.
82
+ if( $fh = fopen( $tempfile, 'w' )) {
83
+ for( $i = 0; $i < count( $textinputs ); $i++ ) {
84
+ $text = urldecode( $textinputs[$i] );
85
+ $lines = explode( "\n", $text );
86
+ fwrite ( $fh, "%\n" ); # exit terse mode
87
+ fwrite ( $fh, "^$input_separator\n" );
88
+ fwrite ( $fh, "!\n" ); # enter terse mode
89
+ foreach( $lines as $key=>$value ) {
90
+ # use carat on each line to escape possible aspell commands
91
+ fwrite( $fh, "^$value\n" );
92
+ }
93
+ }
94
+ fclose( $fh );
95
+
96
+ # exec aspell command - redirect STDERR to STDOUT
97
+ $cmd = "$aspell_prog $aspell_opts < $tempfile 2>&1";
98
+ if( $aspellret = shell_exec( $cmd )) {
99
+ $linesout = explode( "\n", $aspellret );
100
+ $index = 0;
101
+ $text_input_index = -1;
102
+ # parse each line of aspell return
103
+ foreach( $linesout as $key=>$val ) {
104
+ $chardesc = substr( $val, 0, 1 );
105
+ # if '&', then not in dictionary but has suggestions
106
+ # if '#', then not in dictionary and no suggestions
107
+ # if '*', then it is a delimiter between text inputs
108
+ # if '@' then version info
109
+ if( $chardesc == '&' || $chardesc == '#' ) {
110
+ $line = explode( " ", $val, 5 );
111
+ print_words_elem( $line[1], $index, $text_input_index );
112
+ if( isset( $line[4] )) {
113
+ $suggs = explode( ", ", $line[4] );
114
+ } else {
115
+ $suggs = array();
116
+ }
117
+ print_suggs_elem( $suggs, $index, $text_input_index );
118
+ $index++;
119
+ } elseif( $chardesc == '*' ) {
120
+ $text_input_index++;
121
+ print_textindex_decl( $text_input_index );
122
+ $index = 0;
123
+ } elseif( $chardesc != '@' && $chardesc != "" ) {
124
+ # assume this is error output
125
+ $aspell_err .= $val;
126
+ }
127
+ }
128
+ if( $aspell_err ) {
129
+ $aspell_err = "Error executing `$cmd`\\n$aspell_err";
130
+ error_handler( $aspell_err );
131
+ }
132
+ } else {
133
+ error_handler( "System error: Aspell program execution failed (`$cmd`)" );
134
+ }
135
+ } else {
136
+ error_handler( "System error: Could not open file '$tempfile' for writing" );
137
+ }
138
+
139
+ # close temp file, delete file
140
+ unlink( $tempfile );
141
+ }
142
+
143
+
144
+ ?>
145
+ <html>
146
+ <head>
147
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
148
+ <link rel="stylesheet" type="text/css" href="<?php echo $spellercss ?>" />
149
+ <script language="javascript" src="<?php echo $word_win_src ?>"></script>
150
+ <script language="javascript">
151
+ var suggs = new Array();
152
+ var words = new Array();
153
+ var textinputs = new Array();
154
+ var error;
155
+ <?php
156
+
157
+ print_textinputs_var();
158
+
159
+ print_checker_results();
160
+
161
+ ?>
162
+
163
+ var wordWindowObj = new wordWindow();
164
+ wordWindowObj.originalSpellings = words;
165
+ wordWindowObj.suggestions = suggs;
166
+ wordWindowObj.textInputs = textinputs;
167
+
168
+ function init_spell() {
169
+ // check if any error occured during server-side processing
170
+ if( error ) {
171
+ alert( error );
172
+ } else {
173
+ // call the init_spell() function in the parent frameset
174
+ if (parent.frames.length) {
175
+ parent.init_spell( wordWindowObj );
176
+ } else {
177
+ alert('This page was loaded outside of a frameset. It might not display properly');
178
+ }
179
+ }
180
+ }
181
+
182
+
183
+
184
+ </script>
185
+
186
+ </head>
187
+ <!-- <body onLoad="init_spell();"> by FredCK -->
188
+ <body onLoad="init_spell();" bgcolor="#ffffff">
189
+
190
+ <script type="text/javascript">
191
+ wordWindowObj.writeBody();
192
+ </script>
193
+
194
+ </body>
195
+ </html>
196
+
@@ -0,0 +1,180 @@
1
+ #!/usr/bin/perl
2
+
3
+ use CGI qw/ :standard /;
4
+ use File::Temp qw/ tempfile tempdir /;
5
+
6
+ # my $spellercss = '/speller/spellerStyle.css'; # by FredCK
7
+ my $spellercss = '../spellerStyle.css'; # by FredCK
8
+ # my $wordWindowSrc = '/speller/wordWindow.js'; # by FredCK
9
+ my $wordWindowSrc = '../wordWindow.js'; # by FredCK
10
+ my @textinputs = param( 'textinputs[]' ); # array
11
+ # my $aspell_cmd = 'aspell'; # by FredCK (for Linux)
12
+ my $aspell_cmd = '"C:\Program Files\Aspell\bin\aspell.exe"'; # by FredCK (for Windows)
13
+ my $lang = 'en_US';
14
+ # my $aspell_opts = "-a --lang=$lang --encoding=utf-8"; # by FredCK
15
+ my $aspell_opts = "-a --lang=$lang --encoding=utf-8 -H"; # by FredCK
16
+ my $input_separator = "A";
17
+
18
+ # set the 'wordtext' JavaScript variable to the submitted text.
19
+ sub printTextVar {
20
+ for( my $i = 0; $i <= $#textinputs; $i++ ) {
21
+ print "textinputs[$i] = decodeURIComponent('" . escapeQuote( $textinputs[$i] ) . "')\n";
22
+ }
23
+ }
24
+
25
+ sub printTextIdxDecl {
26
+ my $idx = shift;
27
+ print "words[$idx] = [];\n";
28
+ print "suggs[$idx] = [];\n";
29
+ }
30
+
31
+ sub printWordsElem {
32
+ my( $textIdx, $wordIdx, $word ) = @_;
33
+ print "words[$textIdx][$wordIdx] = '" . escapeQuote( $word ) . "';\n";
34
+ }
35
+
36
+ sub printSuggsElem {
37
+ my( $textIdx, $wordIdx, @suggs ) = @_;
38
+ print "suggs[$textIdx][$wordIdx] = [";
39
+ for my $i ( 0..$#suggs ) {
40
+ print "'" . escapeQuote( $suggs[$i] ) . "'";
41
+ if( $i < $#suggs ) {
42
+ print ", ";
43
+ }
44
+ }
45
+ print "];\n";
46
+ }
47
+
48
+ sub printCheckerResults {
49
+ my $textInputIdx = -1;
50
+ my $wordIdx = 0;
51
+ my $unhandledText;
52
+ # create temp file
53
+ my $dir = tempdir( CLEANUP => 1 );
54
+ my( $fh, $tmpfilename ) = tempfile( DIR => $dir );
55
+
56
+ # temp file was created properly?
57
+
58
+ # open temp file, add the submitted text.
59
+ for( my $i = 0; $i <= $#textinputs; $i++ ) {
60
+ $text = url_decode( $textinputs[$i] );
61
+ @lines = split( /\n/, $text );
62
+ print $fh "\%\n"; # exit terse mode
63
+ print $fh "^$input_separator\n";
64
+ print $fh "!\n"; # enter terse mode
65
+ for my $line ( @lines ) {
66
+ # use carat on each line to escape possible aspell commands
67
+ print $fh "^$line\n";
68
+ }
69
+
70
+ }
71
+ # exec aspell command
72
+ my $cmd = "$aspell_cmd $aspell_opts < $tmpfilename 2>&1";
73
+ open ASPELL, "$cmd |" or handleError( "Could not execute `$cmd`\\n$!" ) and return;
74
+ # parse each line of aspell return
75
+ for my $ret ( <ASPELL> ) {
76
+ chomp( $ret );
77
+ # if '&', then not in dictionary but has suggestions
78
+ # if '#', then not in dictionary and no suggestions
79
+ # if '*', then it is a delimiter between text inputs
80
+ if( $ret =~ /^\*/ ) {
81
+ $textInputIdx++;
82
+ printTextIdxDecl( $textInputIdx );
83
+ $wordIdx = 0;
84
+
85
+ } elsif( $ret =~ /^(&|#)/ ) {
86
+ my @tokens = split( " ", $ret, 5 );
87
+ printWordsElem( $textInputIdx, $wordIdx, $tokens[1] );
88
+ my @suggs = ();
89
+ if( $tokens[4] ) {
90
+ @suggs = split( ", ", $tokens[4] );
91
+ }
92
+ printSuggsElem( $textInputIdx, $wordIdx, @suggs );
93
+ $wordIdx++;
94
+ } else {
95
+ $unhandledText .= $ret;
96
+ }
97
+ }
98
+ close ASPELL or handleError( "Error executing `$cmd`\\n$unhandledText" ) and return;
99
+ }
100
+
101
+ sub escapeQuote {
102
+ my $str = shift;
103
+ $str =~ s/'/\\'/g;
104
+ return $str;
105
+ }
106
+
107
+ sub handleError {
108
+ my $err = shift;
109
+ print "error = '" . escapeQuote( $err ) . "';\n";
110
+ }
111
+
112
+ sub url_decode {
113
+ local $_ = @_ ? shift : $_;
114
+ defined or return;
115
+ # change + signs to spaces
116
+ tr/+/ /;
117
+ # change hex escapes to the proper characters
118
+ s/%([a-fA-F0-9]{2})/pack "H2", $1/eg;
119
+ return $_;
120
+ }
121
+
122
+ # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
123
+ # Display HTML
124
+ # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
125
+
126
+ print <<EOF;
127
+ Content-type: text/html; charset=utf-8
128
+
129
+ <html>
130
+ <head>
131
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
132
+ <link rel="stylesheet" type="text/css" href="$spellercss"/>
133
+ <script src="$wordWindowSrc"></script>
134
+ <script type="text/javascript">
135
+ var suggs = new Array();
136
+ var words = new Array();
137
+ var textinputs = new Array();
138
+ var error;
139
+ EOF
140
+
141
+ printTextVar();
142
+
143
+ printCheckerResults();
144
+
145
+ print <<EOF;
146
+ var wordWindowObj = new wordWindow();
147
+ wordWindowObj.originalSpellings = words;
148
+ wordWindowObj.suggestions = suggs;
149
+ wordWindowObj.textInputs = textinputs;
150
+
151
+
152
+ function init_spell() {
153
+ // check if any error occured during server-side processing
154
+ if( error ) {
155
+ alert( error );
156
+ } else {
157
+ // call the init_spell() function in the parent frameset
158
+ if (parent.frames.length) {
159
+ parent.init_spell( wordWindowObj );
160
+ } else {
161
+ error = "This page was loaded outside of a frameset. ";
162
+ error += "It might not display properly";
163
+ alert( error );
164
+ }
165
+ }
166
+ }
167
+
168
+ </script>
169
+
170
+ </head>
171
+ <body onLoad="init_spell();">
172
+
173
+ <script type="text/javascript">
174
+ wordWindowObj.writeBody();
175
+ </script>
176
+
177
+ </body>
178
+ </html>
179
+ EOF
180
+