171 Document how to add TinyMCE Spell Checker plugin to Joomla! v 1.5

Google's Highly Open Participation Program tries to get young students into Open Source and Joomla! specifically. Everyone is welcome, there are not limits. You can be a coder, documenter, tester, translator to help out. Jump in and start helping!
Locked
User avatar
drmmr763
Joomla! Ace
Joomla! Ace
Posts: 1675
Joined: Tue Oct 23, 2007 8:51 pm
Location: Orlando, Florida
Contact:

171 Document how to add TinyMCE Spell Checker plugin to Joomla! v 1.5

Post by drmmr763 » Tue Jan 22, 2008 1:57 am

Task 171 Document how to add TinyMCE Spell Checker plugin to Joomla! v 1.5

http://code.google.com/p/google-highly- ... ail?id=171

I'm going to try to produce a document that shows someone how to install the spell checker plugin for the TinyMCE mambot. As it is right now, I haven't figured out myself how to install it! So, that would be the first of my questions! I followed the directions located here:

http://wiki.moxiecode.com/index.php/Tin ... ellchecker

but I still haven't been able to get things working correctly...or at all, actually.

What I've done:
Downloaded the SpellChecker file from this site: http://tinymce.moxiecode.com/download.php
Unzipped, and uploaded to this directory: /plugins/editors/TinyMCE/JScripts/tiny_mce/plugins
Changed the config file line to true
Left the Google Spell Checking Service like un-commented (usable) (I'm using php5, so I don't need CURL, correct?)

And that is it. I'm thinking that there is a line I am supposed to add to include in the TinyMCE plugins file that calls for the SpellChecker plugin. But I don't know what that line would look like....any ideas?

Thanks!
Last edited by AmyStephen on Tue Jan 29, 2008 4:58 pm, edited 1 time in total.
-Chad Windnagle
Please use the search feature as your question might already have been answered.

http://www.s-go.net/ ~ Website Hosting - Strategic Marketing - Website Development - Print Work

User avatar
mcsmom
Joomla! Exemplar
Joomla! Exemplar
Posts: 7985
Joined: Thu Aug 18, 2005 8:43 pm
Location: New York
Contact:

Re: 171 Document how to add TinyMCE Spell Checker plugin to Joomla! v 1.5

Post by mcsmom » Wed Jan 23, 2008 3:13 pm

Chad,

I'm glad you are doing this, on several levels. It's going to be really useful, but also, it seems like it is a  more complicated than it appears on the surface.

I agree that modifying the tinymce plugin in some way is what you said is probably what you need to do. i really hesitate to have a doc that tells people to modify core files though.  Let's see if there is a way to do it that doesn't require that. (I wish TIny had a component that would let you add plugins but it is what it is. )  In the meantime though let's at least try to get it working and worry about how to explain it to other people second.

Looking inside tinymce.php is see this as one example:


//media plugin
$plugins[] = 'media';
$buttons2[] = 'media';



maybe try that?
So we must fix our vision not merely on the negative expulsion of war, but upon the positive affirmation of peace. MLK 1964.
http://officialjoomlabook.com Get it at http://www.joomla.org/joomla-press-official-books.html Buy a book, support Joomla!.

AmyStephen
Joomla! Champion
Joomla! Champion
Posts: 7056
Joined: Wed Nov 22, 2006 3:35 pm
Location: Nebraska
Contact:

Re: 171 Document how to add TinyMCE Spell Checker plugin to Joomla! v 1.5

Post by AmyStephen » Wed Jan 23, 2008 11:00 pm

Installation Instructions

1. Download the latest version of the TinyMCE Spellchecker plugin, you can download this at the following location: http://tinymce.moxiecode.com/download.php


This is from the download page:
TinyMCE Spellchecker

Serverside spellchecker plugin, current version only supports PHP with pspell or the Google XML service.
TinyMCE Spellchecker PHP   v1.0.5   tgz / zip
2. Unzip the "spellchecker" directory into the "tiny_mce/plugins" dir, path should be "tiny_mce/plugins/spellchecker".
I unzipped it here: plugins\editors\tinymce\jscripts\tiny_mce\plugins\spellchecker

3. Open up the config.php file you just unziped in the spellchecker folder.

Opened plugins\editors\tinymce\jscripts\tiny_mce\plugins\spellchecker\config.php

4. Uncomment the spellchecker class you wish to use for example "TinyPspellShell.class.php".
Check.

5. Enable the spellchecker by changing the $spellCheckerConfig['enabled'] = false; to $spellCheckerConfig['enabled'] = true;
Check.

6. You can also configure default language, but the language will be taken from TinyMCE by default.
Ignored. Should figure out if this must be done for use with non-English languages.

7. If you use the command line PSpell/ASpell class, you may need to configure the following paths "tinypspellshell.aspell" and "tinypspellshell.tmp".
Ignored.

After the updates, my config.php file is thus:
// Spellchecker class use
require_once("classes/TinyPspellShell.class.php"); // Command line pspell
// require_once("classes/TinyGoogleSpell.class.php"); // Google web service//
// require_once("classes/TinyPspell.class.php"); // Internal PHP version

// General settings
$spellCheckerConfig['enabled'] = true;

didn't change the rest...
8. Edit your TinyMCE configuration. Add "spellchecker" to the list of plugins.
9. Add "spellchecker" as a button somewhere on your toolbar.

Here is the piece in red that WOULD BE a core hack to tinymce.php added 8) the plugin and 9) the toolbar button:
// template
$template = $this->params->def( 'template', 0 );
if ( $template ) {
$plugins[] = 'template';
$buttons3[] = 'template';
}

// spellcheck
$plugins[] = 'spellchecker';
$buttons3[] = 'spellchecker';


// text color
$buttons2[] = 'forecolor';
That process worked.

Question

#1 Explore more about the three spellcheck options - what are the requirements, how do you use them (i.e., where is the word list? how do you change it?)

#2 What are other interesting plugins are that could be added that are not already in Joomla!'s TinyMCE implementation.

Maybe this will - maybe this won't be recommended for the general population. Frankly, if you add a backup of the file before changing, I do not see this as a big deal. WordPress hacks are more serious than this and maybe we have been cushioning people too much. ? who knows?

If there are other plugins or emerging plugins, maybe this could become source information for a White paper for v 1.6 to see if there are ways to easily plugins - using parameters (perhaps?) that would allow users to use the plugin manager to edit the parameters for "yet unknown' plugins.

Thanks Chad!
Amy :)
Last edited by AmyStephen on Thu Jan 24, 2008 5:05 am, edited 1 time in total.

User avatar
mcsmom
Joomla! Exemplar
Joomla! Exemplar
Posts: 7985
Joined: Thu Aug 18, 2005 8:43 pm
Location: New York
Contact:

Re: 171 Document how to add TinyMCE Spell Checker plugin to Joomla! v 1.5

Post by mcsmom » Wed Jan 23, 2008 11:11 pm

Amy that is so awesome.

I think that we can reorient this task the way Amy says.

Joomla! users complain about Tinymce all the time, and part of the reason is that we don't know how to install the many plugins that exist for it and if we wrote a plugin we wouldn't know how to either.

One reason the JCE editor is so popular is that it has the ability to add plugins via a configuration component.

WHat if we proposed adding a configuration component that would allow administrators to add plugins?
So we must fix our vision not merely on the negative expulsion of war, but upon the positive affirmation of peace. MLK 1964.
http://officialjoomlabook.com Get it at http://www.joomla.org/joomla-press-official-books.html Buy a book, support Joomla!.

User avatar
drmmr763
Joomla! Ace
Joomla! Ace
Posts: 1675
Joined: Tue Oct 23, 2007 8:51 pm
Location: Orlando, Florida
Contact:

Re: 171 Document how to add TinyMCE Spell Checker plugin to Joomla! v 1.5

Post by drmmr763 » Wed Jan 23, 2008 11:49 pm

WHat if we proposed adding a configuration component that would allow administrators to add plugins?
Then I would run away with my hands over my ears saying 'nooooo!'.

Amy, you are awesome! That line is what was needed to get this working properly. All I did was add it and it was up and running.

Shall I continue with the task as it is written? Or should I expect changes as to what the final product will be?
-Chad Windnagle
Please use the search feature as your question might already have been answered.

http://www.s-go.net/ ~ Website Hosting - Strategic Marketing - Website Development - Print Work

User avatar
mcsmom
Joomla! Exemplar
Joomla! Exemplar
Posts: 7985
Joined: Thu Aug 18, 2005 8:43 pm
Location: New York
Contact:

Re: 171 Document how to add TinyMCE Spell Checker plugin to Joomla! v 1.5

Post by mcsmom » Thu Jan 24, 2008 12:16 am

No, not what the actual changes would be, but the concept of a change.

But I thinkm you can definitely write up the instructions for people.

Actually you could do that, and the post it in tips and tricks as well as make the document.
So we must fix our vision not merely on the negative expulsion of war, but upon the positive affirmation of peace. MLK 1964.
http://officialjoomlabook.com Get it at http://www.joomla.org/joomla-press-official-books.html Buy a book, support Joomla!.

User avatar
drmmr763
Joomla! Ace
Joomla! Ace
Posts: 1675
Joined: Tue Oct 23, 2007 8:51 pm
Location: Orlando, Florida
Contact:

Re: 171 Document how to add TinyMCE Spell Checker plugin to Joomla! v 1.5

Post by drmmr763 » Thu Jan 24, 2008 12:17 am

No, not what the actual changes would be, but the concept of a change.
Okay. So continue with the document as planned, then?
-Chad Windnagle
Please use the search feature as your question might already have been answered.

http://www.s-go.net/ ~ Website Hosting - Strategic Marketing - Website Development - Print Work

User avatar
mcsmom
Joomla! Exemplar
Joomla! Exemplar
Posts: 7985
Joined: Thu Aug 18, 2005 8:43 pm
Location: New York
Contact:

Re: 171 Document how to add TinyMCE Spell Checker plugin to Joomla! v 1.5

Post by mcsmom » Thu Jan 24, 2008 12:18 am

Amy? Agreed?
So we must fix our vision not merely on the negative expulsion of war, but upon the positive affirmation of peace. MLK 1964.
http://officialjoomlabook.com Get it at http://www.joomla.org/joomla-press-official-books.html Buy a book, support Joomla!.

AmyStephen
Joomla! Champion
Joomla! Champion
Posts: 7056
Joined: Wed Nov 22, 2006 3:35 pm
Location: Nebraska
Contact:

Re: 171 Document how to add TinyMCE Spell Checker plugin to Joomla! v 1.5

Post by AmyStephen » Thu Jan 24, 2008 4:54 am

Awesome! I've tried to prod Chad into building an extension for awhile -- and Elin - you convinced him!  :pop


++++

hehehe! Just wanted to scare you a bit, Chad, although I would love to see you developing, I think it's in you.

What Elin is trying to say, and I completely agree, is that hacking core is not something that we tend to promote for various reasons. One of the things about Joomla! is pretty amazing is how configurable.

When I proposed this task, I really did not know it meant hacking the core. Elin left a message with me, after she responded to your qustion, that she anticipated we would have to make the changes she documented. I was hoping that wasn't true and that is why I walked through the steps, to see if I could find any other way. But, I wound up exactly where she suspected. Hacking tinymce.php.

Right now, the developers are taking White Papers on proposed improvements to the architecture. Elin and I believe this is a very good candidate for a white paper. Even though I proposed it as documentation, we think it would be more useful to use this to show that adding plugins to Tiny could be improved.

1. Easiest way (No hack - but manual work) - just add a parameter that allows end users to name a new plugin - then adding the word "spellchecker" to the additional plugin parameter would cause Joomla! to automatically add it the tinyMCE.init statement. Other than that, the end user would have to copy the files to the locations needed.

2. Component - allow you to feed Joomla! the plugin zip file - and it would do both through the installation process.


I don't know if we should promote hacking the core. We should probably talk to others about that and see what they think. I know regular WordPress users hack more just making changes to a sidebar, but, Joomla! comes so easy to configure. My thinking is not to put it in the FAQ, but, I'll leave that to Elin, who is responsible for that, along with Chris.

But, there is value to this, certainly, for the basis of a White Paper - and the timing is perfect.

++++

What does this mean to you?

Do the documentation, as planned.

If you are interested (and I hope you are) in working with us on an expanded concept, we will work with you on ideas that we see might be nice for the future, given your experience with Joomla!, you no doubt have your own idea. Then, you can help write that portion up, as well, and submit the White Paper to the developers, yourself. (Chad - we would help you - so don't worry if that sounds complicated.)

Otherwise, we can take the your documentation and build up the concepts, submitted it along with your work (and your name, of course.)

Amy
Last edited by AmyStephen on Thu Jan 24, 2008 4:57 am, edited 1 time in total.

AmyStephen
Joomla! Champion
Joomla! Champion
Posts: 7056
Joined: Wed Nov 22, 2006 3:35 pm
Location: Nebraska
Contact:

Re: 171 Document how to add TinyMCE Spell Checker plugin to Joomla! v 1.5

Post by AmyStephen » Thu Jan 24, 2008 5:04 am

AmyStephen wrote:
8. Edit your TinyMCE configuration. Add "spellchecker" to the list of plugins.

No idea.  So, I looked on Tiny's Wiki Index which had Configuration. Did a find on 'spell' and saw gecko_spellcheck
That page indicated this is the change I should make:
tinyMCE.init({
...
gecko_spellcheck : true
});
In plugins/editors/tinymce.php it is already set to true:
$return = $load .
"\t
tinyMCE.init({
theme : \"$theme\",
language : \"". $langPrefix . "\",
mode : \"textareas\",
gecko_spellcheck : \"true\",
I am removing this portion from my previous post.

Ian let me know that the gecko_spellcheck is Firefox's spellcheck and has nothing to do with Tiny's.

I Googled to see if one might cause problems with the other, and I found a discussion at Drupal where they talk about leaving both on because people have different preferences.

In other words, I  do not think you have to run gecko_spellcheck off - but, it has nothing to do with Tiny's spellchecker.

I'll adjust my post, above, so as not to confuse anyone later.

Thanks, Ian!
Amy :)

User avatar
drmmr763
Joomla! Ace
Joomla! Ace
Posts: 1675
Joined: Tue Oct 23, 2007 8:51 pm
Location: Orlando, Florida
Contact:

Re: 171 Document how to add TinyMCE Spell Checker plugin to Joomla! v 1.5

Post by drmmr763 » Thu Jan 24, 2008 3:38 pm

Awesome! I've tried to prod Chad into building an extension for awhile -- and Elin - you convinced him!
Lol. I want to do an extension for Joomla! I really do. I'm just not a good enough programmer yet. I'm still working on building a simple template. Haven't even totally figured that out. I will, though.
What Elin is trying to say, and I completely agree, is that hacking core is not something that we tend to promote for various reasons. One of the things about Joomla! is pretty amazing is how configurable.
I agree as well. Even though its just a small 'hack', its still not safe/smart to do.
What does this mean to you?

Do the documentation, as planned.
Okay sweet!
If you are interested (and I hope you are) in working with us on an expanded concept, we will work with you on ideas that we see might be nice for the future, given your experience with Joomla!, you no doubt have your own idea. Then, you can help write that portion up, as well, and submit the White Paper to the developers, yourself. (Chad - we would help you - so don't worry if that sounds complicated.)
I'd be very interested in helping to bring this about. Just tell me what I need to do, and I'll do my best to bring it to you.
-Chad Windnagle
Please use the search feature as your question might already have been answered.

http://www.s-go.net/ ~ Website Hosting - Strategic Marketing - Website Development - Print Work

User avatar
drmmr763
Joomla! Ace
Joomla! Ace
Posts: 1675
Joined: Tue Oct 23, 2007 8:51 pm
Location: Orlando, Florida
Contact:

Re: 171 Document how to add TinyMCE Spell Checker plugin to Joomla! v 1.5

Post by drmmr763 » Fri Jan 25, 2008 2:08 am

I've got the first version of the document put together. Its only 3 pages! How's that for short and sweet?

Download Link
-Chad Windnagle
Please use the search feature as your question might already have been answered.

http://www.s-go.net/ ~ Website Hosting - Strategic Marketing - Website Development - Print Work

User avatar
trombonechamp
Joomla! Explorer
Joomla! Explorer
Posts: 403
Joined: Thu Nov 29, 2007 9:37 pm
Location: Minnesota, USA
Contact:

Re: 171 Document how to add TinyMCE Spell Checker plugin to Joomla! v 1.5

Post by trombonechamp » Fri Jan 25, 2008 11:46 pm

I love that ! logo at the top!
After the upload, open this file that you uploaded on your desktop using some sort of code editor such as notepad or dreamweaver.
Joomla! is free software, so why not use free software examples!?!?  Nvu and Notepad++ are great examples.  You could also say something as simple as "in a text editor".  If you choose not to, make sure you capitalize "Notepad" and "Dreamweaver".

You present "spell checker" in three different ways: "Spell Checker", "spellchecker" and "spell checker".  Choose one and stick to it. (probably the third one, it shouldn't be capitalized, and spellchecker isn't a word)
Leonard Bernstein for President -
Web Development Services: www.BernsteinForPresident.com
My Software Freedom Blog: Trombonechamp.Wordpress.com

User avatar
drmmr763
Joomla! Ace
Joomla! Ace
Posts: 1675
Joined: Tue Oct 23, 2007 8:51 pm
Location: Orlando, Florida
Contact:

Re: 171 Document how to add TinyMCE Spell Checker plugin to Joomla! v 1.5

Post by drmmr763 » Sun Jan 27, 2008 8:33 pm

Joomla! is free software, so why not use free software examples!?!?  Nvu and Notepad++ are great examples.  You could also say something as simple as "in a text editor".  If you choose not to, make sure you capitalize "Notepad" and "Dreamweaver".
I changed it to Notepad++ and Nvu. I personally don't use either, though. But, you're right, we should encourage the use of open source software.

--
You present "spell checker" in three different ways: "Spell Checker", "spellchecker" and "spell checker".  Choose one and stick to it. (probably the third one, it shouldn't be capitalized, and spellchecker isn't a word)
I've taken it down to two. The reason for this is because in file paths it is refered to as 'spellchecker', but in a sentence spell checker would be more grammatically correct.

Updated Linky
-Chad Windnagle
Please use the search feature as your question might already have been answered.

http://www.s-go.net/ ~ Website Hosting - Strategic Marketing - Website Development - Print Work

AmyStephen
Joomla! Champion
Joomla! Champion
Posts: 7056
Joined: Wed Nov 22, 2006 3:35 pm
Location: Nebraska
Contact:

Re: 171 Document how to add TinyMCE Spell Checker plugin to Joomla! v 1.5

Post by AmyStephen » Tue Jan 29, 2008 2:34 am

Love the Warning sign.

I would remove the "seriously" word from that Be Aware sentence.

Recommend changing the last sentence "Site code" to read "Upgrades to your site will require you redo these steps to add the spell checker to your site, again.".

Change "is sometimes hazardous and can damage your site" to "adding this plugin must be carefully accomplished."

Google must always be capitalized - especially when competing in a Google contest. ;)

On 4. Configure TinyMCE.

After telling them to download tinymce.php, make certain they save a copy of it somewhere that is not changed. Remind them if something goes wrong - this is the file the need to replace.

Otherwise, it looks great and works great as I walked through it.

Make those minor changes, then upload it to Google. We'll mark it as complete when you have done so!

Thanks very much Chad, for your contributions to Joomla! before, during and I am certain, after this contest. You are great to work with and made things fun for us!
Amy :)

User avatar
drmmr763
Joomla! Ace
Joomla! Ace
Posts: 1675
Joined: Tue Oct 23, 2007 8:51 pm
Location: Orlando, Florida
Contact:

Re: 171 Document how to add TinyMCE Spell Checker plugin to Joomla! v 1.5

Post by drmmr763 » Tue Jan 29, 2008 4:38 pm

I love that ! logo at the top!
Love the Warning sign.
Thanks to both of you on the compliments! I wasn't sure if using the Joomla! logo 'in' that would be allowed or not. So far, it seems I'm getting away with it. :P
Make those minor changes, then upload it to Google. We'll mark it as complete when you have done so!
Done!
Thanks very much Chad, for your contributions to Joomla! before, during and I am certain, after this contest. You are great to work with and made things fun for us!
Amy, it has been purely a pleasurable experience. I enjoyed it a great deal. I hope we can do another one when they release Joomla! 2.0!
-Chad Windnagle
Please use the search feature as your question might already have been answered.

http://www.s-go.net/ ~ Website Hosting - Strategic Marketing - Website Development - Print Work

AmyStephen
Joomla! Champion
Joomla! Champion
Posts: 7056
Joined: Wed Nov 22, 2006 3:35 pm
Location: Nebraska
Contact:

Re: 171 Document how to add TinyMCE Spell Checker plugin to Joomla! v 1.5

Post by AmyStephen » Tue Jan 29, 2008 4:59 pm

I have been curious, BTW, why drmmr763? Unless it's a closely guarded secret?

Closed your Google task. Thanks again!

Amy :)

User avatar
drmmr763
Joomla! Ace
Joomla! Ace
Posts: 1675
Joined: Tue Oct 23, 2007 8:51 pm
Location: Orlando, Florida
Contact:

Re: 171 Document how to add TinyMCE Spell Checker plugin to Joomla! v 1.5

Post by drmmr763 » Tue Jan 29, 2008 5:28 pm

No, its not a closely guarded secret. I am a drummer, and my very first user name on the internet ever was 'DRUMMER BOY'. When I went to sign up for my gmail account, (back when gmail accounts could only be gotten if you knew someone who had one or were geek enough for Google to give you one) DRUMMER BOY wasn't available (probably because of the space), but Google suggested 'drmmr763', so I was like 'okay...I'll just use that'.

So, then Instant Messaging starting become prominent in the internet communities. Everyone was like 'oh, I have AIM' 'well, MSN is better' 'nu uh! yahoo is!', so, I ended up getting an MSN, which actually doesn't have anything to do with drums, and then an AIM, which was drmmr763, and then eventually a yahoo and skype, all were 'drmmr763'.

Basically, drmmr763 was a name that no one else would ever have or think of, so I didn't have to spend 20 minuets thinking of a name no one else had. If you google it, you'll find me on like, all the search results (its kinda cool).

So yeah, thats the great hidden secret behind my user name.

Where did you ever think of the name AmyStephen? ;)  :P
-Chad Windnagle
Please use the search feature as your question might already have been answered.

http://www.s-go.net/ ~ Website Hosting - Strategic Marketing - Website Development - Print Work

JesterMagic
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Fri Mar 02, 2007 1:19 am

Re: 171 Document how to add TinyMCE Spell Checker plugin to Joom

Post by JesterMagic » Sun Jan 25, 2009 3:57 pm

I am using the latest version of Joomla and I downloaded the 2.0.2 of the Spellchecker but the instructions in this topic doesn't seem to work anymore. I can't seem to get the button enabled for the spellchecker.

Can anyone help me out here?

Thanks

Tom


Locked

Return to “Google's Highly Open Participation Contest”