The Joomla! Forum ™






Post new topic Reply to topic  [ 19 posts ] 
Author Message
PostPosted: Tue Jan 22, 2008 1:57 am 
User avatar
Joomla! Ace
Joomla! Ace

Joined: Tue Oct 23, 2007 8:51 pm
Posts: 1670
Location: Orlando, Florida
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!

_________________
-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


Last edited by AmyStephen on Tue Jan 29, 2008 4:58 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: Wed Jan 23, 2008 3:13 pm 
User avatar
Joomla! Exemplar
Joomla! Exemplar

Joined: Thu Aug 18, 2005 8:43 pm
Posts: 7986
Location: New York
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!.


Top
 Profile  
 
PostPosted: Wed Jan 23, 2008 11:00 pm 
Joomla! Champion
Joomla! Champion

Joined: Wed Nov 22, 2006 3:35 pm
Posts: 7056
Location: Nebraska
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:
Quote:
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


Quote:
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:
Quote:
// 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:

Quote:
// 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 :)

_________________
http://Twitter.com/AmyStephen
http://www.alltogetherasawhole.org/


Last edited by AmyStephen on Thu Jan 24, 2008 5:05 am, edited 1 time in total.

Top
 Profile  
 
PostPosted: Wed Jan 23, 2008 11:11 pm 
User avatar
Joomla! Exemplar
Joomla! Exemplar

Joined: Thu Aug 18, 2005 8:43 pm
Posts: 7986
Location: New York
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!.


Top
 Profile  
 
PostPosted: Wed Jan 23, 2008 11:49 pm 
User avatar
Joomla! Ace
Joomla! Ace

Joined: Tue Oct 23, 2007 8:51 pm
Posts: 1670
Location: Orlando, Florida
Quote:
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


Top
 Profile  
 
PostPosted: Thu Jan 24, 2008 12:16 am 
User avatar
Joomla! Exemplar
Joomla! Exemplar

Joined: Thu Aug 18, 2005 8:43 pm
Posts: 7986
Location: New York
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!.


Top
 Profile  
 
PostPosted: Thu Jan 24, 2008 12:17 am 
User avatar
Joomla! Ace
Joomla! Ace

Joined: Tue Oct 23, 2007 8:51 pm
Posts: 1670
Location: Orlando, Florida
Quote:
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


Top
 Profile  
 
PostPosted: Thu Jan 24, 2008 12:18 am 
User avatar
Joomla! Exemplar
Joomla! Exemplar

Joined: Thu Aug 18, 2005 8:43 pm
Posts: 7986
Location: New York
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!.


Top
 Profile  
 
PostPosted: Thu Jan 24, 2008 4:54 am 
Joomla! Champion
Joomla! Champion

Joined: Wed Nov 22, 2006 3:35 pm
Posts: 7056
Location: Nebraska
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

_________________
http://Twitter.com/AmyStephen
http://www.alltogetherasawhole.org/


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

Top
 Profile  
 
PostPosted: Thu Jan 24, 2008 5:04 am 
Joomla! Champion
Joomla! Champion

Joined: Wed Nov 22, 2006 3:35 pm
Posts: 7056
Location: Nebraska
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:
Quote:
tinyMCE.init({
...
gecko_spellcheck : true
});


In plugins/editors/tinymce.php it is already set to true:
Quote:
$return = $load .
"\t


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group