Author |
Topic |
|
robrjohnson
Starting Member
10 Posts |
Posted - 10 September 2005 : 11:09:56
|
I found a bug in the IMG tag & URL tag buttons (located in the editor). In the code, if nothing is highlighted, it's supposed to ask the user for a description (url tag) and a URL (url & image).
There is an if(text==null) that never gets entered because it is never null, it's a zero length string. I also took out the if(basic) blocks. Now I get dialogs for users to use. If a word is highlighted (url), then only the URL is requested. If a word is highlighted (img) then it simply outputs the tags around the highlighted text.
In inc_code.js, functions hyperlink & image, I changed the code to the following:
function hyperlink() { var text = getText(); if (helpstat) { alert("Hyperlink Tag \nTurns an url into a hyperlink.\n\nUSE: http://w br / ww.anywhere.com\n\nUSE: [url=\"http://www.anywhere.com\"]link text txt "; AddText(AddTxt); } else { AddTxt="[url=\""+txt+"\"]"+txt2+" |
Edited by - Davio on 26 September 2006 05:42:45 |
|
MarcelG
Retired Support Moderator
Netherlands
2625 Posts |
Posted - 10 September 2005 : 14:58:34
|
robrjohnson, thanks for this code, but is this post complete ? It doesn't look like it... I guess you cannot easily parse the javascript here in the forum, as it'll be partially processed.
Perhaps you could link us to a txt version of your inc_code.js ?< |
portfolio - linkshrinker - oxle - twitter |
|
|
robrjohnson
Starting Member
10 Posts |
Posted - 10 September 2005 : 19:15:40
|
Sure: Here it is.
This is the complete inc_code.js file. The text of the post above is all there when I edit the post. I thought maybe it had something to do with the forum being moderated that it didn't show completely.< |
|
|
MarcelG
Retired Support Moderator
Netherlands
2625 Posts |
|
Davio
Development Team Member
Jamaica
12217 Posts |
Posted - 06 August 2006 : 01:40:17
|
Don't see anything wrong with the Image tag. Fixed the bug with the URL tag though.
In inc_code.js, I changed line 255 from this:if (text!=null) { to this:if (text!="") {
Fixed in 3.4.06.< |
Support Snitz Forums
|
|
|
|
Topic |
|