News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Pretty URLs

Started by SMFHacks.com Team, January 31, 2007, 10:56:43 AM

Previous topic - Next topic

Atoa

I have a Issue with AjaxChat Integration.

if i check the option "Rewrite Board URLs" the chat stop working.

The error probably occur because the chat is located on the "http://myforum.com/chat" folder, and the pretty thinks it is the url of an board named "Chat".

I want too much to use the pretty url and the AjaxChat Integration togther.

I have the SMF 2.0RC1-1 and the the pretty url 0.9.3

Blinker

I think my problem with spell check is for the same reason.

The URL is "http://blinkersforum.org/forum/spelling/phpSpell.html" and it probably thinks "spelling" is the name of a board.

Just like AJAXChat, it needs to run in it's own folder, not root. Surely this must be a fairly common scenario? Is there a workaround for this Dannii?

Dannii

Quote from: Atoa on June 13, 2009, 10:52:08 PM
I have a Issue with AjaxChat Integration.

if i check the option "Rewrite Board URLs" the chat stop working.

The error probably occur because the chat is located on the "http://myforum.com/chat" folder, and the pretty thinks it is the url of an board named "Chat".

I want too much to use the pretty url and the AjaxChat Integration togther.

I have the SMF 2.0RC1-1 and the the pretty url 0.9.3
Use the latest snapshot and you can add an exception to the top of the .htaccess file.

Quote from: Blinker on June 14, 2009, 12:10:43 AM
I think my problem with spell check is for the same reason.

The URL is "http://blinkersforum.org/forum/spelling/phpSpell.html" and it probably thinks "spelling" is the name of a board.

Just like AJAXChat, it needs to run in it's own folder, not root. Surely this must be a fairly common scenario? Is there a workaround for this Dannii?
It has a file extension so it won't be touched. However, if it is using a relative URL it may not work... instead of http://blinkersforum.org/forum/spelling/phpSpell.html you would get http://blinkersforum.org/forum/board/topic/spelling/phpSpell.html

Can you check if it uses absolute or relative URLs?
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

Blinker

I'm pretty sure it's an absolute URL.

TheDisturbedOne

Danii, I'm sure this has been answered, but I can't find it.  I wish to have Pretty Board Urls, but I have a directory called "site" which has a e107 site on it.  If I go to mysite.com/site I get sent to the forum.  How would I get an exception just for the directory "site"?

Thanks!

Dannii

http://www.blinkersforum.org/forum/spelling/phpSpell.html doesn't work for me... is that the right address?

Quote from: TheDisturbedOne on June 14, 2009, 09:35:54 AM
Danii, I'm sure this has been answered, but I can't find it.  I wish to have Pretty Board Urls, but I have a directory called "site" which has a e107 site on it.  If I go to mysite.com/site I get sent to the forum.  How would I get an exception just for the directory "site"?

Thanks!
Use the latest snapshot, then add a rule to the top of your .htaccess to let it pass through. Something like
RewriteRule ^site/? ./site/index.php [L,QSA]
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

Atoa

QuoteUse the latest snapshot and you can add an exception to the top of the .htaccess file.
Noobish question: how can i do this? XD

TheDisturbedOne

The last version of .htaccess, I believe.

Dannii

Go to the google code site and look in the downloads list?
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

Blinker

Quote from: Dannii on June 14, 2009, 11:36:20 AM
http://www.blinkersforum.org/forum/spelling/phpSpell.html doesn't work for me... is that the right address?

Quote from: TheDisturbedOne on June 14, 2009, 09:35:54 AM
Danii, I'm sure this has been answered, but I can't find it.  I wish to have Pretty Board Urls, but I have a directory called "site" which has a e107 site on it.  If I go to mysite.com/site I get sent to the forum.  How would I get an exception just for the directory "site"?

Thanks!
Use the latest snapshot, then add a rule to the top of your .htaccess to let it pass through. Something like
RewriteRule ^site/? ./site/index.php [L,QSA]

That's not the actual address Dannii, just for used example here. The only difference from the real one is in the domain, blinkersforum, all else is exactly as normal. Put it this way, when I open the link up in a browser when I'm not logged in the spell check is there and it just sits there saying "Checking Document", obviously because it wasn't called from within the forum and the message composition.

Would it be possible for me to also add a rule to exclude the 'spelling' directory as per your advice to TheDisturbedOne?

Dannii

Can you just give me the real link? And does the URL ever change depending on which topic you're in?
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

Blinker

Hi Dannii

Sorry, not trying to be a pain in the ass but I can't give you the real link as I run a private board.

No, the URL never changes no matter where the spell checker is called from. Hopefully this will help -

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

That's the page for the author of the software and it works exactly the same as on my forum. Follow the link, click on 'Spell Check' and it will open a popup/new tab with the spell checker at this URL - http://master-technology.com/demos/spell/phpSpell.html

That's what I'm talking about.

P.S. I really appreciate your willingness to help me out with this issue, it means a lot. :)

Dannii

Then PM me the link!

Everyone: If you won't give me URLs you're just wasting my time. Please read the first post.
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

Blinker

Check your PM Dannii. Sorry if I wasted your time. I figured this could be solved easily or be told it couldn't be solved. Either way, you do a fine job of supporting your mod and for that you are to be commended.

Dannii

So am I right that you said when you click on the spell check button nothing happens? Do you have <form action="spellcheck.php" in your page source?
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

Blinker

Correct, when Pretty URL's are enabled clicking on spell check does nothing.

Currently they're disabled and spell check works. I clicked on it and looked at the page source and there is nothing like <form action="spellcheck.php" in it.

Here it is anyway, not sure if it helps -

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
     <title>phpSpell</title>
     <script language="javascript" src="spelling.js"></script>
     <script language="javascript">
       function Can_Start_Spellchecker()
       {
         if (op6 || op7) setTimeout('Start_Spellchecker();', 500);
         else Start_Spellchecker();
       }
     </script>
     <link rel=stylesheet href='spelling-op.css' type='text/css'>

</head>

<body bgcolor="#ffffff" class="bodyclass" topmargin=0 leftmargin=0 marginheight=0 marginwidth=0 onload="Can_Start_Spellchecker();">
<table width="500" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
        <td colspan="2" background="titlebgd.gif">
        <img src="titlebgd.gif" width="3" height="51" border="0" alt="" align="absmiddle"><span class="Title">phpSpell<br></span>
        </td>
</tr>
<tr>
        <td colspan="2">
        <table width="550" border="0" cellspacing="1" cellpadding="0" align="center" bgcolor="#000000">
        <TR>

        <td class="toprowcolor" colspan="2">
        <table width="550" border="0" cellspacing="0" cellpadding="4" align="center">
        <TR>
        <script language="javascript">
          DocOutput = "about:blank";
          if (op7) DocOutput = "blank.html";
          document.write('<td class="toprowcolor"><iframe src="'+DocOutput+'" scrolling="no" name="ispellheader" id="ispellheader" width="100%" height=16 marginwidth="0" marginheight="0" frameborder="0"></iframe></td>');
          document.write('</tr></table><tr>');
          document.write('<td width=400><iframe src="'+DocOutput+'" name="ispellcheck" id="ispellcheck" width="400" height="300" marginwidth="0" marginheight="0" frameborder="0" bgcolor=#ffffff></iframe></td>');
          document.write('<td width=150><iframe src="'+DocOutput+'" name="ioptions" id="ioptions" width="150" height="300" marginwidth="0" marginheight="0" scrolling="no" frameborder="0" bgcolor="white"></iframe></td>');
        </script>
        </tr>
        </table>
        </td>
</tr>
<tr class="toprowcolor"><td><a href="http://www.master-technology.com/demos/spell" target="_blank"><span class="crowtext">&nbsp;(c)Copyright 2002-2008, Team phpSpell.</span></a></td>

</table>
</form>
</body>
</html>



Dannii

No you need to look in the forum post/edit page.
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

Blinker

Sorry, my bad. I checked a reply page source and the only reference to spell check is the same code from the post.template.php file that I put there for the spell check:

<tr>
<td align="center" colspan="2">
<script language="Javascript" src="spelling/spellmessage.js"></script>

     <span class="smalltext"><br />shortcuts: hit alt+s to submit/post or alt+p to preview</span><br />
     <input type="submit" name="post" value="Post" onclick="return submitThisOnce(this);" accesskey="s" tabindex="3" />
     <input type="submit" name="preview" value="Preview" onclick="return (!document.postmodify.attachmentPreview.value || confirm('MSN')) &amp;&amp; submitThisOnce(this);" accesskey="p" tabindex="4" />
     <input type="button" class="button" name="spellcheck" value="SpellCheck" onclick="openspell();"/>

Dannii

<script language="Javascript" src="spelling/spellmessage.js"></script>

As I said before, you're using relative URLs. Make that one absolute.
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

Blinker

Sorry. Based on my understanding I thought blinkersforum.org/forum/spelling/phpSpell.html was an absolute URL.

How do I do make <script language="Javascript" src="spelling/spellmessage.js"></script> a relative URL? Does that require a whole big answer? If so, I'll try and figure it out with Google.

Advertisement: