Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Sobota, 28. november 2026
O nás
Magazín
Otvorený softvér
CVS
Služby
Index  »  Projekty  »  phpMyEdit  »  Fórum  »  Spell Checking

phpMyEdit Features     Spell Checking
Odoslať novú tému   Odpovedať na tému    
 
JammerPro     Založený: 07.12.2006   Príspevky: 33  
Príspevok Zaslal: 2011-01-08 13:30
Návrat hore  Odpovedať s citátom     

I found several programs that can spell check text fields but I cannot incorporate them into phpMyEdit. Spell checking would be a great feature for phpMyEdit. The program I am trying to incorporate is speller pages at http://spellerpages.sourceforge.net/index.html.

There are parameters that need to be passed to the javascript via a form in plain html:

Kód:
<form name="form1">
<input type="text" name="text1" size="30">
<br />
<textarea name="textarea1" rows="10" cols="60">
</textarea>
<br />
<input type="button" value="Check Spelling" onClick="openSpellChecker();"/>
</form>


It's basically just a couple lines of code that need to be executed when you hit the "check spelling" button and I placed these in the header successfully:

Kód:


<!-- Source the JavaScript spellChecker object -->
<script language="javascript" type="text/javascript" src="spellChecker.js">
</script>

<!-- Call a function like this to handle the spell check command -->
<script language="javascript" type="text/javascript">
function openSpellChecker() {
   // get the textarea we're going to check
   var txt = document.myform.mytextarea;
   // give the spellChecker object a reference to our textarea
   // pass any number of text objects as arguments to the constructor:
   var speller = new spellChecker( txt );
   // kick it off
   speller.openChecker();
}
</script>

...



The problem is I can't get the 'var text' and 'var speller' variables into the javascript from phpMy Edit. Also, I need to know how to tell the javascript which textarea in phpMyEdit is the one that needs to be spell checked.

Any help would be greatly appreciated and the resulting spell checker would be a great addition to phpMyEdit!

All the best.

JammerPro

 
doug     Založený: 10.02.2003   Príspevky: 1013   Bydlisko: Denver, Colorado (USA)
Príspevok Zaslal: 2011-01-08 14:41
Návrat hore  Odpovedať s citátom     

I doubt the maintainers will implement spell checking. In Change mode, Firefox does a pretty good job of highlighting words which are mis-spelled and/or not found in the Firefox dictionary.

 
JammerPro     Založený: 07.12.2006   Príspevky: 33  
Príspevok Zaslal: 2011-01-08 19:10
Návrat hore  Odpovedať s citátom     

With all due respect, I have invested alot of time and money in phpMyEdit, and your responses to new ideas for development have been discouraging to say the least...

YOU ARE A MAINTAINER... AND, YES, we get it, you don't want to work on this script anymore... There have been no updates since 9/16/2007. That's 4 years!

In the future, I would appreciate it if you did not post in such a discouraging manner shooting down any attempts to add to this project. Even though this is a dead project so far as the MAINTAINERS are concerned, maybe there are some of us out there who still believe in the project and want to make it better.

In that light, if anyone reads this post, and wants to make some money, please let me know by sending me an email at outerdom@outerdomain.com.

BEST WISHES.

 
JammerPro     Založený: 07.12.2006   Príspevky: 33  
Príspevok Zaslal: 2011-01-14 06:22
Návrat hore  Odpovedať s citátom     

I have successfully integrated spell checking for textareas into phpMyEdit using Speller Pages (GPL) at http://spellerpages.sourceforge.net/index.html.

Download the files, unzip, and upload to a folder named 'speller' in your root directory (http://yoursite.com/speller).

In the <head> section of your phpMyEdit form, or in your header.php file, place the following code:

Kód:

<!-- Source the JavaScript spellChecker object -->
<script language="javascript" type="text/javascript" src="../speller/spellChecker.js"></script>

<!-- Call a function like this to handle the spell check command -->

<script language="javascript" type="text/javascript">

function openSpellChecker() {
   var speller = new spellChecker();
   speller.checkTextAreas();
}
</script>


In your phpMyEdit form, program the text area field as follows:

Kód:

$opts['fdd']['notes'] = array(
  'default'    => '',
  'help|ACP'   => '<a href="javascript:openSpellChecker();">Click to Spell Check&nbsp;</a>',
  'input'      => '',
  'name'       => 'Notes',
  'options'    => 'ACPVDLF',
  'select'     => 'T',
  'sqlw'       => 'TRIM("$val_as")',
  'strip_tags|LF' => true,
  'textarea'   => array('rows' => '5', 'cols' => '58'),
  'trimlen|LF' => 75,
  'sort'       => false
);
// MySQL column 33: blob - longtext


To test, enter "change mode" for the form and right click "Click to Spell Check" in the help area next to the textarea.

Happy New Year.

Best Wishes,

JammerPro

 
Odoslať novú tému   Odpovedať na tému    

Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok · Odkazový formulár · Prihláška
Upozorniť na chybu na PLATON.SK webstránke · Podmienky použitia · Ochrana osobných údajov