[REQUEST] Spell Check Feature

Looking for a MOD? Have a MOD request? Post here for help. (Note: This forum is community supported; phpBB does not have official MOD authors)
Anti-Spam Guide
Locked
User avatar
D¡cky
Former Team Member
Posts: 11812
Joined: Tue Jan 25, 2005 8:38 pm
Location: New Hampshire, USA
Name: Richard Foote
Contact:

Re: [REQUEST] Spell Check Feature

Post by D¡cky »

VPWanda wrote:I just installed this spell checker on my forum.
It mostly works, but it doesn't give any "suggestions" for correct words like it does in the demo.
Can someone please help me with this.

----
Figured it out.
There is a coding mistake in spell_phpbb3.php (line 101 - variable i).
This is the fix:
OPEN spelling/spell_phpbb3.php

FIND (Line 91)

Code: Select all

    while ($Fetched_Array = $db->sql_fetchrow($Query_Result)) {
BEFORE, ADD

Code: Select all

	$i=0;
FIND

Code: Select all

        $Suggestions[$i] = str_replace('\'\'', '\'', trim(strtolower($Fetched_Array['word'])));
      }
AFTER, ADD

Code: Select all

      $i++;
FIND (Line 135)

Code: Select all

    while ($Fetched_Array = $db->sql_fetchrow($Query_Result)) {
BEFORE, ADD

Code: Select all

	$i=0;
FIND

Code: Select all

        $Suggestions[$i] = str_replace('\'\'', '\'', trim(strtolower($Fetched_Array['word'])));
      }
AFTER, ADD

Code: Select all

      $i++;
Have you hugged someone today?
Bmlow
Registered User
Posts: 93
Joined: Mon Sep 01, 2008 1:41 pm

Re: [REQUEST] Spell Check Feature

Post by Bmlow »

I'm not the greatest at adding mods or editing codes, is there going to be an easier way to instal this mod in the future?. I'm finding it hard to see how this would work with my current forum skin MoonClaw.

Instructions are still not clear for installing
chrisbrow
Registered User
Posts: 20
Joined: Thu Oct 09, 2008 2:45 pm

Re: [REQUEST] Spell Check Feature

Post by chrisbrow »

I have loaded this mod but can not get it to work. I have a custom template that i believe is the reason. I get hug up on the posting_buttons step? My code loks nothing like what you guys have posted.

maybe someone can help.

at this point I have no button for spell check on my site.

Her is the code.

Code: Select all

<tr valign="middle" align="{S_CONTENT_FLOW_BEGIN}">
	<td colspan="2">
		<script type="text/javascript">
		// <![CDATA[
		
		// Define the bbCode tags
		var bbcode = new Array();
		var bbtags = new Array('[b]','[/b]','[i]','[/i]','[u]','[/u]','[quote]','[/quote]','[code]','
','
  • ','
','
  • ','
','[img]','[/img]','','','[flash=]', '[/flash]','[size=]','[/size]'<!-- BEGIN custom_tags -->, {custom_tags.BBCODE_NAME}<!-- END custom_tags -->);
var imageTag = false;

// Helpline messages
var help_line = {
b: '{LA_BBCODE_B_HELP}',
i: '{LA_BBCODE_I_HELP}',
u: '{LA_BBCODE_U_HELP}',
q: '{LA_BBCODE_Q_HELP}',
c: '{LA_BBCODE_C_HELP}',
l: '{LA_BBCODE_L_HELP}',
o: '{LA_BBCODE_O_HELP}',
p: '{LA_BBCODE_P_HELP}',
w: '{LA_BBCODE_W_HELP}',
s: '{LA_BBCODE_S_HELP}',
f: '{LA_BBCODE_F_HELP}',
e: '{LA_BBCODE_E_HELP}',
d: '{LA_BBCODE_D_HELP}',
t: '{LA_BBCODE_T_HELP}',
tip: '{L_STYLES_TIP}'
<!-- BEGIN custom_tags -->
,cb_{custom_tags.BBCODE_ID}: '{custom_tags.A_BBCODE_HELPLINE}'
<!-- END custom_tags -->
}

// ]]>
</script>
<script type="text/javascript" src="{T_TEMPLATE_PATH}/editor.js"></script>

<!-- IF S_BBCODE_ALLOWED -->
<input type="button" class="button2" value="Spell Check" name="button" onclick="openspell();" title="Run Spell Checker" />
<input type="button" class="button2" accesskey="b" name="addbbcode0" value=" B " style="font-weight:bold; width: 30px" onclick="bbstyle(0)" onmouseover="helpline('b')" onmouseout="helpline('tip')" />
<input type="button" class="btnbbcode" accesskey="i" name="addbbcode2" value=" i " style="font-style:italic; width: 30px;" onclick="bbstyle(2)" onmouseover="helpline('i')" onmouseout="helpline('tip')" />
<input type="button" class="btnbbcode" accesskey="u" name="addbbcode4" value=" u " style="text-decoration: underline; width: 30px;" onclick="bbstyle(4)" onmouseover="helpline('u')" onmouseout="helpline('tip')" />
<!-- IF S_BBCODE_QUOTE -->
<input type="button" class="btnbbcode" accesskey="q" name="addbbcode6" value="Quote" style="width: 50px" onclick="bbstyle(6)" onmouseover="helpline('q')" onmouseout="helpline('tip')" />
<!-- ENDIF -->
<input type="button" class="btnbbcode" accesskey="c" name="addbbcode8" value="Code" style="width: 40px" onclick="bbstyle(8)" onmouseover="helpline('c')" onmouseout="helpline('tip')" />
<input type="button" class="btnbbcode" accesskey="l" name="addbbcode10" value="List" style="width: 40px" onclick="bbstyle(10)" onmouseover="helpline('l')" onmouseout="helpline('tip')" />
<input type="button" class="btnbbcode" accesskey="o" name="addbbcode12" value="List=" style="width: 40px" onclick="bbstyle(12)" onmouseover="helpline('o')" onmouseout="helpline('tip')" />
<input type="button" class="btnbbcode" accesskey="t" name="addlitsitem" value="[*]" style="width: 40px" onclick="bbstyle(-1)" onmouseover="helpline('e')" onmouseout="helpline('tip')" />
<!-- IF S_BBCODE_IMG -->
<input type="button" class="btnbbcode" accesskey="p" name="addbbcode14" value="Img" style="width: 40px" onclick="bbstyle(14)" onmouseover="helpline('p')" onmouseout="helpline('tip')" />
<!-- ENDIF -->
<!-- IF S_LINKS_ALLOWED -->
<input type="button" class="btnbbcode" accesskey="w" name="addbbcode16" value="URL" style="text-decoration: underline; width: 40px" onclick="bbstyle(16)" onmouseover="helpline('w')" onmouseout="helpline('tip')" />
<!-- ENDIF -->
<!-- IF S_BBCODE_FLASH -->
<input type="button" class="btnbbcode" accesskey="d" name="addbbcode18" value="Flash" onclick="bbstyle(18)" onmouseover="helpline('d')" onmouseout="helpline('tip')" />
<!-- ENDIF -->
<span class="genmed nowrap">{L_FONT_SIZE}: <select class="gensmall" name="addbbcode20" onchange="bbfontstyle('[size=' + this.form.addbbcode20.options[this.form.addbbcode20.selectedIndex].value + ']', '[/size]');this.form.addbbcode20.selectedIndex = 2;" onmouseover="helpline('f')" onmouseout="helpline('tip')">
<option value="50">{L_FONT_TINY}</option>
<option value="85">{L_FONT_SMALL}</option>
<option value="100" selected="selected">{L_FONT_NORMAL}</option>
<option value="150">{L_FONT_LARGE}</option>
<option value="200">{L_FONT_HUGE}</option>
</select></span>
<!-- ENDIF -->
</td>
</tr>
<!-- IF S_BBCODE_ALLOWED and .custom_tags -->
<tr valign="middle" align="{S_CONTENT_FLOW_BEGIN}">
<td colspan="2">
<!-- BEGIN custom_tags -->
<input type="button" class="btnbbcode" name="addbbcode{custom_tags.BBCODE_ID}" value="{custom_tags.BBCODE_TAG}" onclick="bbstyle({custom_tags.BBCODE_ID})"<!-- IF custom_tags.BBCODE_HELPLINE !== '' --> onmouseover="helpline('cb_{custom_tags.BBCODE_ID}')" onmouseout="helpline('tip')"<!-- ENDIF --> />
<!-- END custom_tags -->
</td>
</tr>
<!-- ENDIF -->
<!-- IF S_BBCODE_ALLOWED -->
<tr>
<td<!-- IF $S_SIGNATURE or S_EDIT_DRAFT --> colspan="2"<!-- ENDIF -->><input type="text" readonly="readonly" name="helpbox" style="width:100%" class="helpline" value="{L_STYLES_TIP}" /></td>
<!-- IF not $S_SIGNATURE and not S_EDIT_DRAFT -->
<td class="genmed" align="center">{L_FONT_COLOR}</td>
<!-- ENDIF -->
</tr>
<!-- ENDIF -->
[/code]

if anyone can help that would be great!!!
chrisbrow
Registered User
Posts: 20
Joined: Thu Oct 09, 2008 2:45 pm

Re: [REQUEST] Spell Check Feature

Post by chrisbrow »

so after playing with it. I can see it if I go to the buttons.html page, but this still does not show up in my fourms.

this link shows the buttons. http://drivenbyblood.com/phpBB3/styles/ ... ttons.html
sicoanimal
Registered User
Posts: 23
Joined: Fri Mar 14, 2008 11:21 pm

Re: [REQUEST] Spell Check Feature

Post by sicoanimal »

i can not see why it would not be showing up from that file...

but one thing to note is that where you currently have the code for the spell check button, it would only show up if you had BBCodes enabled. it might be an idea to move the buttons code above the line:

<!-- IF S_BBCODE_ALLOWED -->

______________________________

Have just tried adding the button in this position on my own site...

Your problem may be that you are not clearing your forums cache so that the change takes effect. If you go to the 'Administration Control Panel' and click the 'Run Now' button for 'Purge the cache' on the ACP index page then your problem should resolve itself.
askidmore
Registered User
Posts: 2
Joined: Tue Oct 21, 2008 3:19 pm

Re: [REQUEST] Spell Check Feature

Post by askidmore »

I got everything installed but when i try go to my spellingspell_MYSQL.php i get this error and it won't load the .dic file i get erros there as well can anyone tell me what to do.

Warning: mysql_pconnect() [function.mysql-pconnect]: Can't connect to MySQL server on 'localhost' (10061) in c:\websites\jeffhall1360\jeffhall13.com\phpBB2\spelling\spell_MySQL.php on line 20

Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in c:\websites\jeffhall1360\jeffhall13.com\phpBB2\spelling\spell_MySQL.php on line 21
askidmore
Registered User
Posts: 2
Joined: Tue Oct 21, 2008 3:19 pm

Re: [REQUEST] Spell Check Feature

Post by askidmore »

Can anyone help me with this and tell me why i am getting this error?
Warning: mysql_pconnect() [function.mysql-pconnect]: Can't connect to MySQL server on 'localhost' (10061) in c:\websites\jeffhall1360\jeffhall13.com\phpBB2\spelling\spell_MySQL.php on line 20

Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in c:\websites\jeffhall1360\jeffhall13.com\phpBB2\spelling\spell_MySQL.php on line 21
User avatar
Muad''Dib
Registered User
Posts: 311
Joined: Tue Jun 12, 2007 6:20 pm
Contact:

Re: [REQUEST] Spell Check Feature

Post by Muad''Dib »

This section is for PHPBB 3, it appears you are installing on v2..

Either way this thread was for a mod request, not a helpdesk for phpspell.
spudevo
Registered User
Posts: 81
Joined: Fri Jun 17, 2005 5:31 pm

Re: [REQUEST] Spell Check Feature

Post by spudevo »

when i get to the install page and hit submit i get this error

Fatal error: SQL ERROR [ mysqli ]

Unknown table 'phpbb_spelling_words' [1051]
spudevo
Registered User
Posts: 81
Joined: Fri Jun 17, 2005 5:31 pm

Re: [REQUEST] Spell Check Feature

Post by spudevo »

come one some one must know what i did wrong?
spudevo
Registered User
Posts: 81
Joined: Fri Jun 17, 2005 5:31 pm

Re: [REQUEST] Spell Check Feature

Post by spudevo »

ok i still cant get this to work, on my host I CAN NOT creat data bases but only have acsses to phpmyadmin

i was told by my host all i got to do is added it to the prefix...

i have tyred doing what the mod says about phpBB3 but still wont work..


has anyone done this with out creating a seperate data base for it and getting to work?
saneramb
Registered User
Posts: 1
Joined: Thu Dec 11, 2008 9:57 pm

Re: [REQUEST] Spell Check Feature

Post by saneramb »

I had been using the spelI check feature on my site when it was phpbb 2.x. I have since upgraded to phpbb 3.x and want to continue using the feature. I have begun the installation process but I am hung up with the code to put on the posting page template. I am now using the RedSilver Style templates for phpbb 3.x. I do not have any .tpl files for this style template but i believe the equivilent is the 'posting_body.html' and the 'overall_header.html' files. I have tried to add the code you directed to these files but have been unsuccessful. What do I need to add to which files to use the spell check feature for the Red Silver template?

Thank You!
allanhardy
Registered User
Posts: 197
Joined: Sun Dec 15, 2002 4:20 am

Re: [REQUEST] Spell Check Feature

Post by allanhardy »

I am getting nothing but an error page when I try to get phpspell or event the base master-technology.com website. Are they out of business or having a a bad couple days?

http://www.master-technology.com/demos/spell/

I am wondering what are the advantages of having spell check integrated into phpBB now all the major browsers have free alternatives? My phpBB members can use the free versions everywhere, not just my phpBB site.

So just wondering what gives? Why so much effort to use phpspell, do integration, touch phpBB code, etc??

(Free in Safari, Firefox and a free add-in for IE - iespell)
User avatar
D¡cky
Former Team Member
Posts: 11812
Joined: Tue Jan 25, 2005 8:38 pm
Location: New Hampshire, USA
Name: Richard Foote
Contact:

Re: [REQUEST] Spell Check Feature

Post by D¡cky »

allanhardy wrote:I am getting nothing but an error page when I try to get phpspell or event the base master-technology.com website. Are they out of business or having a a bad couple days?

http://www.master-technology.com/demos/spell/
It is just a bad few days with the site. It happens frequently.
allanhardy wrote:I am wondering what are the advantages of having spell check integrated into phpBB now all the major browsers have free alternatives? My phpBB members can use the free versions everywhere, not just my phpBB site.

So just wondering what gives? Why so much effort to use phpspell, do integration, touch phpBB code, etc??

(Free in Safari, Firefox and a free add-in for IE - iespell)
My thoughts exactly. I suppose it makes it easier for IE users. They don't have to install an add-on. They only have to click a button when they are composing a message.
Have you hugged someone today?
ryanmagic
Registered User
Posts: 1
Joined: Fri Apr 10, 2009 2:39 pm

Re: [REQUEST] Spell Check Feature

Post by ryanmagic »

Hi Guys

Working with Phppb3/IE7/Firefox :

I have re-wrote sections of the javascript to make this work with firefox. I can also supply you with a complete package so then all you have to do is change 2 lines and some basic configuration settings to get it working.


Cheers.
Last edited by darcie on Sat Apr 11, 2009 12:15 am, edited 1 time in total.
Reason: A link to your email not needed. Your edits can be requested in this topic, if desired. Thanks.
Locked

Return to “[3.0.x] MOD Requests”