miniBB ® miniBB®
miniBB Support Forums
 | Forums | Register | Reply | Search | Statistics | Manual |
Suggestions miniBB Support Forums / Suggestions /   

Quote function - support for Safari?

Page  Page 1 of 3:  1  2  3  Next »  
Author marsbar
Associated Member
#1 | Posted: 23 May 2005 04:46 | Edited by: marsbar 
Hi Team,

I hope you can assist me with this problem: the quote function on my miniBB 1.7f installation does not appear to work anymore* for Safari 2.0 users. When (Safari) users select some text to quote, an alert pops up and says "please selct some text".

Any help/advice would be greatly appreciated.
- mb

* The quote function has not been working too well for Safari users on my forums: last year they experienced problems as described in thread "Fix for the quote problem in Safari" - I did apply the fix, and everyone was happy--until yesterday when this new problem emerged. :-(

Author realitybytes
Registered
#2 | Posted: 23 May 2005 09:42 
Has there been any upgrades for Safari?

Author marsbar
Associated Member
#3 | Posted: 23 May 2005 15:10 | Edited by: marsbar 
Just received more information from Safari users; the problem described in my original post affect:
Safari 2.0 on OSX (Tiger 10.4.1)
Safari 1.3 (v312) on OSX 10.3.9.

---
Other browsers checked on Mac OS X (Tiger 10.4.1):
Camino 0.8.3: quote function works
Firefox 1.0: quote function works
Mozilla Firebird 1.4a: quote function works
Netscape 7.1: quote function works
Opera 7.54u1: quote function does not appear in message whn logged in
Internet Explorer 5.2.3: quote function works

---
Safari 1.03: quote function works.

- mb

Author Team
8-)
#4 | Posted: 23 May 2005 16:14 | Edited by: Team 
So... I think it's Safari problem?
I have no Safari installed and available. So I can not say more about that.
JavaScript quote code is working fine in the latest versions of Internet Explorer, Mozilla, and Opera.

Author marsbar
Associated Member
#5 | Posted: 24 May 2005 04:04 | Edited by: marsbar 
Thanks for taking the time to reply, Team.

In another related thread, realitybytes suggested that I tried getting the debug information from the browser and see whether the exact problem could be pinpointed. As I haven't access to a working Mac that can run OS X here, I asked Mac users on my forums to help me to obtain this information. The helpful volunteers have come back to me with this disappointing response:
I don't get any debug info (isn't it only IE on Windows that does that?). Just the Javascript alert: "Please select some text first!".

So, it is back to square one: problem remains unresolved. :-(

Is anyone else able to help, please?

- mb

Author realitybytes
Registered
#6 | Posted: 24 May 2005 05:13 | Edited by: realitybytes 
http://www.webmasterworld.com/forum49/508.htm

This post has related information to finding the debug information for safari, to quote that post.

"If you are running Safari and have the debug menu enabled, it's possible (although I've never used it) for Safari to log javascript exceptions and provide all sorts of feedback on the javascripts it runs. Might be useful to see what it outputs?"

Here is a link to enable the debug feature http://www.macosxhints.com/article.php?story=20030906093300383

Author marsbar
Associated Member
#7 | Posted: 24 May 2005 06:04 | Edited by: marsbar 
Many thanks for the helpful information, realitybytes - I shall pass it on to the Mac users. Let's hope one of them will be happy to enable the feature so that we may gain more insight to the nature of the problem.
Cheers,
mb

Author Team
8-)
#8 | Posted: 24 May 2005 10:22 
Actually, I know what the problem is - Safari doesn't support 'selected' methods. For example, it doesn't recognize either document.getSelection() either document.selection.createRange().text either window.getSelection(). So, maybe it recognizes it another way? I would be happy to know that.

Author realitybytes
Registered
#9 | Posted: 24 May 2005 11:28 | Edited by: realitybytes 
http://www.quirksmode.org/js/selected.html

window.getselection()

on version 1.2, but version 2.0 I am still looking in to

Ok I think this should be of help

http://joemaller.com/2005/04/24/post503/getselection-workaround

safari 1.2* is different from 1.3+

edited
hmm I should have read this whole thread.

Author Team
8-)
#10 | Posted: 24 May 2005 12:33 
So, I have found only that window.getSelection()+'' might solve this problem, but I can not test it myself.

Author marsbar
Associated Member
#11 | Posted: 24 May 2005 14:55 | Edited by: marsbar 
Team wrote: window.getSelection()+'' might solve this problem, but I can not test it myself.

No worries, Team: I have willing helpers here who can help with the testing--just let us know the JavaScript code to use, please. :-)
- mb

--
EDIT: Below is the JavaScript code in my main_posts.html:

<script type="text/javascript">
<!--
function checkBrowser()
{
this.ver=navigator.appVersion;
this.dom=document.getElementById?1:0;
this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom)?1:0;
this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0;
this.ns6=(this.dom && parseInt(this.ver)>= 5)?1:0;
this.ns4=(document.layers && !this.dom)?1:0;
this.opr=(navigator.userAgent.toLowerCase().indexOf("opera")!=-1)?1:0;
return this
}

function paste_strinL(strinL,isQuote){
if(strinL=='') alert('Please, select some text first!');
else{
if (isQuote == 1) {
strinL = '[i]' + strinL + '[/i]' + '\n';
}
if (isQuote == 2) {
strinL = '[b]' + strinL + '[/b]' + '\n';
}
var isForm=document.forms["postMsg"];
if (isForm) {
var input=document.forms["postMsg"].elements["postText"];
input.value=input.value+strinL;
}
else alert('{$l_accessDenied}');
}
}

function pasteSel() {
if(document.getSelection) selection=document.getSelection();
else if(document.selection) selection=document.selection.createRange().text;
else if(window.getSelection) selection=window.getSelection();
else selection='';
}

function getQuotation() {
var bw=new checkBrowser();
if ((bw.ns6 || bw.ie5 || bw.ie6 || bw.ns4) && !bw.opr) {
document.writeln('<a href="javascript:paste_strinL(selection,1)" onMouseDown="pasteSel()">{$l_quoting}</a>');
}
}
//-->
</script>

Author realitybytes
Registered
#12 | Posted: 24 May 2005 15:37 | Edited by: realitybytes 
try

function pasteSel() {
if(document.getSelection) selection=document.getSelection();
else if(document.selection) selection=document.selection.createRange().text;
else if(window.getSelection) selection=window.getSelection();
else if(window.getSelection) selection=window.getSelection()+'';
else selection='';
}

Author marsbar
Associated Member
#13 | Posted: 24 May 2005 15:57 | Edited by: marsbar 
Many, many thanks for supplying a possible solution for me to try, realitybytes. I have made the necessary code change and am now waiting for user feedback. I shall report back here.
- mb

Author marsbar
Associated Member
#14 | Posted: 25 May 2005 12:45 | Edited by: marsbar 
Hi realitybytes, Team, and everyone else who is reading this thread,

Bad news: the code change has not made a difference. :-( Safari 2 and 1.3 users report that Safari does not keep text highlighted/selected if you click on a link. The Safari 1.3 user also mentions that text was highlighting fine in Safari 1.3 until he updated the operating system.

Can you suggest anything else to try?

Thanks in anticipation,
- mb

Author realitybytes
Registered
#15 | Posted: 25 May 2005 12:54 | Edited by: realitybytes 
Anybody come back with some debug information?

I am just trying out pearpc emulator, hopefully I will have OS X installed and working shortly and be able to see what is going on.

Fingers crossed it will work.

I hope I will have time to look in to it today but it might be tomorrow.

Page  Page 1 of 3:  1  2  3  Next » 
Suggestions miniBB Support Forums / Suggestions / Quote function - support for Safari? Top

Your Reply Click this icon to move up to the quoted message

 Short link for this topic:

 ?
Only registered users are allowed to post here. Please, enter your username/password details upon posting a message, or register first.


Before posting, make sure your message is compliant with our forum posting rules. If not, it may be locked or deleted with no explanation.
 
 
miniBB Support Forums Powered by Forum Software miniBB ® Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contacts
Get the Captcha add-on: protect your miniBB-forums from the automated spam and flood.
Captcha Addon for miniBB