Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 DEV-Group
 DEV Bug Reports (Closed)
 URL Tag & Image Tag buttons bug & Fix
 Forum Locked  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

robrjohnson
Starting Member

10 Posts

Posted - 10 September 2005 :  11:09:56  Show Profile
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  Show Profile  Visit MarcelG's Homepage
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
Go to Top of Page

robrjohnson
Starting Member

10 Posts

Posted - 10 September 2005 :  19:15:40  Show Profile
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.<
Go to Top of Page

MarcelG
Retired Support Moderator

Netherlands
2625 Posts

Posted - 11 September 2005 :  06:46:03  Show Profile  Visit MarcelG's Homepage
Tested your file! Works as a charm! Never knew it should work like that...<

portfolio - linkshrinker - oxle - twitter
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 06 August 2006 :  01:40:17  Show Profile
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
Go to Top of Page
  Previous Topic Topic Next Topic  
 Forum Locked  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.14 seconds. Powered By: Snitz Forums 2000 Version 3.4.07