Code help -newbie adding button to template -Spell Check / phpSpell

Started by Dove, April 27, 2004, 12:32:53 PM

Previous topic - Next topic

icegator

Thank you much Dove.  :) Worked like a charm!  :D  This spell checker has been a life saver because my hosting providers just can't seem to get the dictionary for pspell installed.   Thanks again for letting everyone know about this particular spell checker and how to install it.  ;)

Dove

Oh gee..  :) your welcome :)

Here is what one hosting company had to say to me when
I asked them if their php included pspell:
QuotePHP is supported. All versions are the newest.
I'm not sure wat pspell is, but if you could explain it, I'm sure we could get it, or put it on our list of additional features.

Thanks for your interest!
;)

Take Care

mrandall131

Has anyone done this for 1.1 Beta 3 yet?  I can't seem to find the correct places to modify post.template.php.

Dove

Hi,
     You can download the updated instructions with the modified
spellmessage.js HERE [nofollow]

I'll have a complete package for download by the end of today. :)


mrandall131

Wow, I wasn't expecting the response so fast!  Thanks a lot!

mrandall131

Awsome it works! 

I came back here to find out how to integrate it into the instant message function and there is one problem, there is no instantmessage.template.php in 1.1 Beta 3?

Dove

Hello,
  At the end of the day those instructions made it .. :)

### THE PERSONAL MESSAGE TEMPLATE (this was called InstantMessageTemplate.php in Older SMF Versions): ###

1. Open up the Themes/default/PersonalMessage.template.php (or yourthemename/PersonalMessage.template.php)
2. [ FIND around line 689]:--------------------------------------------------------
// Send, Preview, spellcheck buttons.
        echo '
                          <tr>
                                    <td align="right" colspan="2">
                                    <input type="submit" value="', $txt[148], '" tabindex="', $context['tabindex']++, '" onclick="return submitThisOnce(this);" accesskey="s" />
                                    <input type="submit" name="preview" value="', $txt[507], '" tabindex="', $context['tabindex']++, '" onclick="return submitThisOnce(this);" accesskey="p" />';


3. [CHANGE TO: ----- [SO NOW THE ENTIRE BLOCK OF CODE SHOULD LOOK LIKE THIS: ]-------

// Send, Preview, spellcheck buttons.
        echo '
                          <script language="Javascript" src="spelling/spellmessage.js"></script>
        <tr>
                                    <td align="right" colspan="2">
                                    <input type="submit" value="', $txt[148], '" tabindex="', $context['tabindex']++, '" onclick="return submitThisOnce(this);" accesskey="s" />
                                    <input type="submit" name="preview" value="', $txt[507], '" tabindex="', $context['tabindex']++, '" onclick="return submitThisOnce(this);" accesskey="p" />
<input type="button" class="" value="Spell Check" onclick="openspell();">';
                                                                               


The InstantMessageTemplate.php is now --->PersonalMessage.template.php

:)

mrandall131


xtremecruiser

I just found this thread, Thank you for all the guys like me who have PHP impared hosts !

wally2255

OK I am new to admin of forums so I hope I don't sound stupid for asking this. I have the newest version of SMF and I would like to add phpspell can some one give me step by step instruction on how to set it up. I have access to mysql and phpadmin. But I don't know how to add or set up phpspell.

mrandall131

Just thought I'd update this, in case other are installing it again.  The following has the updated line numbers for finding the associated lines of code. I didn't have to install the database, or upload anything, just modify the 2 files.

post.template.php - around line 600
PersonalMessage.template.php - around line 884

mrandall131

Hate to bring this up again.  i installed it on RC2 and the checker works in the post template.  Unfortunately, I can't get it to work in the PM template.

Advertisement: