Nukemods Forum  
» Log in
User Name:

Password:

Not a member yet?
Register Now!
» Online Users: 26
0 members and 26 guests
No Members online
Most users ever online was 611, 03-21-2008 at 11:10 PM.
» .::.
Online Degree - search for 1000+ online degrees, online colleges & online universities.
Tattoo - we are a group of tattoo enthusiasts
Gexa Energy - your absolute best choice in electric service
Texas electricity - save on electric rates
The Lyric Archive
Dining Room Furniture

Go Back   Nukemods Forum > PHP-Nuke 7.x > Nuke 7.x - General

Reply
 
LinkBack Thread Tools Display Modes
BBcode placement problem in the forums
Old
  (#1 (permalink))
Junior Member
 
Status: Offline
Posts: 5
Join Date: Mar 2005
BBcode placement problem in the forums - 03-10-2005, 01:22 PM

I'm having a problem with BBcode placements in the posts. For example, let's say I want to make a word in my post bold. So I highlight the word, and click the "B" button. But instead of wrapping the BBcodes around the highlighted word, "[b]" is inserted at the end of the post. It doesn't matter which function I use (font, color, URL, etc.), the BBcode is always inserted at the end of the post, not around the highlighted text. Needless to say it gets very annoying if the word I need to apply it to is somewhere in the middle of the post. I'm using Mozilla 1.7.5, but I have the same problem in Firefox and other versions of Mozilla. It works fine in IE, but I really don't use IE.

I know that phpBB standalone (2.0.11 and above) doesn't have this problem, and I also noticed that in this particular forum, I don't have this problem, either.

Here's where it gets interesting. I have this problem in the DeepBlue theme that came with phpNuke. I also have this problem in the subBlack theme (from this site). But I installed the genElectro theme from phpnuke-fr.com, and miraculously, the problem was solved! I went back to subBlack, and I still have the problem. So the problem seems to be in the theme, not the Nuke or phpBB. I'm guessing the theme that runs on this site doesn't have this problem, either.

I have the following:

phpNuke 7.5
subBlack theme (from this site)
BBtoNuke211 (update for phpBB to 2.0.11, from nukeresources.com, but I had this problem before I updated)
Mozilla/Firefox browser (any version)

Any help/suggestions are welcome!
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#2 (permalink))
Super Moderator
 
coldblooded's Avatar
 
Status: Offline
Posts: 623
Join Date: Jan 2002
Location: USA
03-11-2005, 11:54 PM

I ran a diff on the posting_body.tpl from subBlack and helius, and there are differences in the bbcode control. It's quite likely that code has been improved over time, so the newer themes don't exhibit some issues the older ones do. We don't mess with that code at all during the porting. I would try backing up that file, and replacing the bbcode control from a working style.


The more we learn... the more we realize how little we actually know.
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#3 (permalink))
Junior Member
 
Status: Offline
Posts: 5
Join Date: Mar 2005
03-17-2005, 10:56 AM

Thanx, I didn't realize that forum templates are theme-specific, and to be honest, i had no idea that BBcode control is in the template file. So I replaced the bbfontstyle & bbstyle functions from the standalone phpBB code, works great! 8)

While researching the problem, I even came across the smilie fix for Mozilla. Smilies are always inserted at the end of the post, instead of the cursor position. Here's the code that I found at http://nukecops.com/postitle35863-0-0-bbcode.html

Quote:
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(posttextar ea.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;
}
}
I know next to nothing about PHP and Javascript, so I really have no clue how this works. But it does work, though I noticed it only works for regular smilies, the additional ones (from the "View more Emoticons" popup) still don't work properly.
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Advanced BBCode Box forum php nuke7.1 taf Nuke 7.x - General 1 11-29-2006 03:30 AM
Mozilla / PHPBB / BBCODE Juniorx72 Other "stuff" 4 01-26-2006 07:26 PM
BBcode used on the forum jn1167 Nuke 7.x - General 1 07-21-2004 04:15 PM
fiapple Banner/Ad Placement PCplay Nuke 6.5 to 6.9 - Themes 5 06-22-2003 09:08 PM
Banner Placement Problem! byron Purged Topics 0 01-02-2003 10:14 AM




vBulletin Skin developed by: vBStyles.com


LinkBacks Enabled by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31