Using Firefox, it doesn't seem that the buttons to insert bbcode work properly. When I highlight text and hit (for example) the (bold) button, it will stick a [/b] at the end of the post, but nothing anywhere near the text I just selected.
This was never a problem for me, as I learned to just type my tags. It became a problem when I recommended that everyone who comes to my site give Firefox a try. After going on and on about how much better it was, how much more stable and secure, etc., of course one of the first comments was how our site didn't work with Firefox because the bbcode buttons were broken.
I finally found several threads on the Mozilla forums that indicate that this is not a Firefox bug, per se. Apparently PHP-Nuke (and other CMS's that implement WYSIWYG editors) use some Javascript functions that are IE-proprietary, and implemented differently in Firefox (I think it was document.selection.createRange().text that's causing the problem, but I'm not certain).
There is a Firefox extension to create a workaround for this problem, but IMO, my users shouldn't have to install a browser add-in in order to use my site properly.
Has anyone heard of a workaround for this problem? Maybe outputting one chunk of javascript if the user is using IE, and another if they're using Firefox? Seems to me that it's an issue with the bbstyle function, and wouldn't be that hard to fix for someone who knows what they're doing. I unfortunately know very little about Javascript, but I'm tempted to learn just so that my site works properly for those users who have heeded my advice to try Firefox -- the more converts I can get, the better off we'll all be.
Anyways, thanks for listening, and thanks for any advice anyone can provide.
My opinion, firefox is crap (at least the current version).
In short, my problem is Firefox won't display a simple table that works in the other big 3 browsers, AND alters the default language for everything below that block.
_________________
USE THE FORUM. If you contact me via messenger for support I will add you to my ignore list.
edubb Nuke Soldier
Joined: Jul 23, 2004
Posts: 19
Posted:
Tue Oct 12, 2004 5:07 am
Just experienced this myself as well. Installed phpbb template and my friend was using FireFox, IE myself, and he couldn't see the forum at all except the head image.
Syenna Private
Joined: Aug 27, 2004
Posts: 47
Posted:
Wed Oct 13, 2004 2:59 am
Well, I'm not sure about your problem, but from what I understand, the problem that I describe is not technically a problem with Firefox, but a problem with the BBtoNuke package making use of a non-standard Javascript function. Given all of the other advantages Firefox offers, I don't think that two problems with PHP-Nuke makes Firefox crap, especially given what a total piece of horses* IE is, security- and functionality-wise.
[sort of off-topic]
Here's my opinion; I think that MS has IE use non-standard functionality like this not because it makes the browsing experience better, but because it leads to people who try an alternative browser coming to the conclusion that the browser is broken because it won't render certain pages properly because the designers have only designed it for IE (that is, not compliant with standards). I'd say that most of the web pages that don't render properly in Firefox are because the coders have used IE-native functions -- not because Firefox is broken.
[/sort of off-topic]
Anyways, back to topic. I think this is a BBtoNuke issue in its use of a non-standard JS function that only works in IE. Is there anyone who knows of a fix to get this to work in Firefox and other browsers who actually do make use of standard JS?
(BTW Brain, I've got the utmost respect for all the support you offer here, and I don't want to turn this into a "my browser is bigger than your browser" thing -- I just want to get this problem fixed)
Syenna
BrainSmashR Support Mod
Joined: Jan 05, 2004
Posts: 1390
Location: Louisiana, USA
Posted:
Fri Oct 15, 2004 3:13 pm
Quote:
problem that I describe is not technically a problem with Firefox, but a problem with the BBtoNuke package making use of a non-standard Javascript function.
LOl, in English, we call that a problem exclusive to Firefox.
Quote:
Given all of the other advantages Firefox offers, I don't think that two problems with PHP-Nuke makes Firefox crap, especially given what a total piece of horses* IE is, security- and functionality-wise.
IE is not the only other browser out there, and not being able to properly view either of our own websites without tweaking the browser is a BIG problem for Firefox, since:
1) I do not have access to edit all browsers for all users.
2) All other browsers seem to handle this "problem" just fine.
In short, like you, I too was in love with Firefox, but have now found a total of 4 users (3 on this topic alone) here on Nukecops, that are having problems or know of issues that are specific to Firefox.
Good luck in your search for the cure, and be sure to post it so we can both go back to Firefox.
_________________
USE THE FORUM. If you contact me via messenger for support I will add you to my ignore list.
Syenna Private
Joined: Aug 27, 2004
Posts: 47
Posted:
Sat Oct 16, 2004 6:54 pm
Ok, I may have gotten this problem fixed. It was indeed an issue with the use of document.selection.createRange() in the bbstyle Javascript function in the file posting_body.tpl.
(Sidenote: Whee! I can finally highlight and tag text)
I will apologize in advance if this is kludgy or inelegant. I don't know Javascript, and had to cobble together bits and pieces of stuff I found elsewhere. If you can see a way to improve this, I am definitely all ears.
I've also only tested it on Firefox and IE. I'm sure someone who's a little more conversant in JS could make it so the "alternate portion" runs only under Firefox, but that's beyond me at this point.
Replace the following code (around line 140) in the file themes/YourTheme/forums/posting_body.tpl:
Code:
if ((clientVer >= 4) && is_ie && is_win)
theSelection = document.selection.createRange().text; // Get text selection
Oops. That didn't cover the color and size tags. To get those, change the function bbfontstyle in that same file (around line 105, maybe 15-20 lines long) to read:
Not really the type of fix I had in mind, seeing as how Nuke now comes with 14 themes in the default setup.
Quote:
I've also only tested it on Firefox and IE.
What's your address, I have Netscape and Mozilla installed as well and would be happy to check for any visible errors with those browsers for you.
_________________
USE THE FORUM. If you contact me via messenger for support I will add you to my ignore list.
Syenna Private
Joined: Aug 27, 2004
Posts: 47
Posted:
Sun Oct 17, 2004 4:26 am
Aye, that's a pain, but since the offending code is in the theme directory, I couldn't figure out how else to do it. It actually took me an hour of beating my head against a wall before I realized that I wasn't supposed to change the version of posting_body.tpl in modules/Forums/templates/subSilver.
PM sent with the site address; I'll set it to allow anonymous posting for the time being so you can test it without having to register.
Also, one last fix for placing the emoticons properly. Same file, change the function emoticon(text) (around line 95) to:
Code:
function emoticon(text) {
text = ' ' + text + ' ';
if (document.post.message.createTextRange && document.post.message.caretPos) {
var caretPos = document.post.message.caretPos;
caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? text + ' ' : text;
document.post.message.focus();
} else {
posttextarea = document.post.message;
selected=(posttextarea.value).substring(posttextarea.selectionStart,posttextarea.selectionEnd);
str=' ' + text + ' ';
posttextarea.focus();
start=posttextarea.selectionStart;
end=posttextarea.textLength;
endtext=posttextarea.value.substring(posttextarea.selectionEnd,end);
starttext=posttextarea.value.substring(0,start);
posttextarea.value=starttext + str + endtext;
posttextarea.selectionStart=start;
posttextarea.selectionEnd=start;
return;
}
}
Syenna
2unreal Nuke Cadet
Joined: Oct 20, 2004
Posts: 9
Posted:
Wed Oct 20, 2004 5:01 pm
Quote:
Warning: Cannot modify header information - headers already sent by (output started at /home/psychede/public_html/forums/header.php:32) in /home/psychede/public_html/forums/includes/sessions.php on line 222
Warning: Cannot modify header information - headers already sent by (output started at /home/psychede/public_html/forums/header.php:32) in /home/psychede/public_html/forums/includes/sessions.php on line 223
Quote:
Warning: Cannot modify header information - headers already sent by (output started at /home/psychede/public_html/forums/header.php:32) in /home/psychede/public_html/forums/includes/page_header.php on line 492
Warning: Cannot modify header information - headers already sent by (output started at /home/psychede/public_html/forums/header.php:32) in /home/psychede/public_html/forums/includes/page_header.php on line 494
Warning: Cannot modify header information - headers already sent by (output started at /home/psychede/public_html/forums/header.php:32) in /home/psychede/public_html/forums/includes/page_header.php on line 495
Heres my errors.... right on the forums..... firefox suxors! Have no issues with IE... no errors... These are the errors I get straight after installing.... if i view the forums with firefox.... lol... so I havent even begun to tweak nuke yet.... lol.... well... just started today.... but these errors are only in firefox
If anyone knows how to fix this error that would be great... I have visited alot of nuke forums, and I havent seen these errors in anyone elses forum header....lol
anyways, if you want to check out the errors visit:
http://www.psychedelica.com.au/forums -the site still looks like crap, but hopefully I will get it to look more like my website..., is my first time ever attempting to change a theme in nuke... some reason i cant alter subsilver.css, boxes dont change colors to the ones I specify... lol
Syenna Private
Joined: Aug 27, 2004
Posts: 47
Posted:
Thu Oct 21, 2004 4:03 am
This should solve your problem. Looks like another instance of PHP-Nuke having instructions to "do this if the user has IE," but without any kind of handling for users with other browsers.
Thanx for the fixes Syenna! I was also able to fix the BBcode placement bug by copying the bbfontstyle & bbstyle functions from the standalone version of phpBB.
Your smilie fix works, I put it on my site! But I have a bit of a problem with it. It only works for regular smilies, the additional ones (from the "View more Emoticons" popup) still don't work properly. Unfortunately I don't know much about PHP or Javascript, so I can't even try to figure it out...
BreeeZe Nuke Cadet
Joined: Oct 16, 2004
Posts: 4
Posted:
Thu May 12, 2005 8:13 am
gknight wrote:
Thanx for the fixes Syenna! I was also able to fix the BBcode placement bug by copying the bbfontstyle & bbstyle functions from the standalone version of phpBB.
Your smilie fix works, I put it on my site! But I have a bit of a problem with it. It only works for regular smilies, the additional ones (from the "View more Emoticons" popup) still don't work properly. Unfortunately I don't know much about PHP or Javascript, so I can't even try to figure it out...
Bit of a late reply, but better late then never
Open posting_smilies.tpl
and replace the javascript with:
Code:
<!--
function emoticon(text) {
text = ' ' + text + ' ';
if (opener.document.forms['post'].message.createTextRange && opener.document.forms['post'].message.caretPos) {
var caretPos = opener.document.forms['post'].message.caretPos;
caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? text + ' ' : text;
opener.document.forms['post'].message.focus();
} else {
posttextarea = opener.document.forms['post'].message;
selected=(posttextarea.value).substring(posttextarea.selectionStart,posttextarea.selectionEnd);
str=' ' + text + ' ';
posttextarea.focus();
start=posttextarea.selectionStart;
end=posttextarea.textLength;
endtext=posttextarea.value.substring(posttextarea.selectionEnd,end);
starttext=posttextarea.value.substring(0,start);
posttextarea.value=starttext + str + endtext;
posttextarea.selectionStart=start;
posttextarea.selectionEnd=start;
return;
}
}
//-->
Works for me
gknight Nuke Cadet
Joined: Mar 17, 2005
Posts: 2
Posted:
Tue May 17, 2005 8:37 am
@ BreeeZe - thanx for the tip! I'm gonna edit the file as you suggested.
BreeeZe Nuke Cadet
Joined: Oct 16, 2004
Posts: 4
Posted:
Sat May 21, 2005 2:48 pm
gknight wrote:
@ BreeeZe - thanx for the tip! I'm gonna edit the file as you suggested.
Hope it fixes your problem
I have a new question for everyone, when using the smilie popup window in firefox it remains the active window after you klick on a smilie, if you use IE, the main window gets back focus so you have to select the smilie window on the taskbar again if you want to add more.
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 vote in polls in this forum