mIRC Home    About    Download    Register    News    Help

Print Thread
#37074 18/07/03 11:21 PM
Joined: Dec 2002
Posts: 580
N
Fjord artisan
OP Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 580
Text that is in a [ code ] in these message forums doesn't copy in to mirc properly. I would assume that the web page doesn't have CR after it's LF, because it pastes all as one line.


NaquadaBomb
www.mirc-dll.com
#37075 18/07/03 11:34 PM
Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
This has nothing to do with mirc. A workaround is to paste to Wordpad and copy from there.


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
#37076 18/07/03 11:45 PM
Joined: Dec 2002
Posts: 580
N
Fjord artisan
OP Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 580
Really, so if mirc's editor didn't require the CR or if the web pages could add a CR, life wouldn't be better??? Gee, why don't we just go back to carving words on to stone tablets... smile


NaquadaBomb
www.mirc-dll.com
#37077 19/07/03 03:22 AM
Joined: Feb 2003
Posts: 2,812
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
Well, it really isn't the forums or mirc fault... but how IE copies the data.

[[b][/b]code] tags are converted into <pre> tags, so CRLF's can be treated literally instead of requiring <br> tags after each line. However, IE strips CRLFs and only treats <br> and <p> tags as new lines, because CRLFs mean nothing in HTML... except maybe a space between 2 words.

If IE knew how to handle the data copied between <pre> tags, there wouldn't be a problem. Blame Microsoft. smirk

- Raccoon


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
#37078 19/07/03 08:36 AM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
it might alse have to do with the fact that the forum liek sot use xml breaks (<br />) instead of the normal break ... >:(


-KingTomato
#37079 19/07/03 05:18 PM
Joined: Feb 2003
Posts: 2,812
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
Naa, it doesn't use 'any' line breaks (except CRLF) in <pre> tags. It's the lack of <br> breaks that causes the lines to stack into one.

One way to copy [[b][/b]code] snips would be to View Source and Find (F3) for <pre> until it finds the snip you want.


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
#37080 19/07/03 06:40 PM
Joined: Dec 2002
Posts: 2,809
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
Seeing as how the forums are php, why even do such a thing? If I recall <code> </code> gives you a monotyped font, it just doesn't treat crlf special, so just use php functions to handle that.

nl2br(htmlspecialchars($the_text));

Something like that would make it so [code ] works perfectly.

#37081 19/07/03 07:23 PM
Joined: Feb 2003
Posts: 2,812
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
You don't seem to understand or appreciate how the <pre> tag works. [[b][/b]code] is translated to <pre> so that SPACES and CRLFs and even <TAGS> (that includes <br>) are treated literally. You would have to abolish the use of <pre> to use <br>.

If the forums were to use <font face="courier"> instead of <pre> and used <br> instead of literally interpreting CRLFs, then you would suddenly lose all your SPACE indentation. Solution? Replace SPACEs with &#160; but that only causes more problems.

Again, there is no fix for this one until Microsoft handles how <pre></pre> data is sent to the clipboard On Copy.

- Raccoon


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
#37082 19/07/03 07:28 PM
Joined: Dec 2002
Posts: 2,809
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
Well no you wouldn't replace with &#160;, you'd replace with &nbsp; which would not introduce any problems, and the htmlspecialchars function I used would preserve any HTML tags you include because they would be converted to for example &lt;b&gt;, and the nl2br will allow the CRLF to become <br> therefore it would work perfectly.

#37083 19/07/03 07:32 PM
Joined: Feb 2003
Posts: 2,812
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
I used &#160; instead of &nbsp; because both are identical, but not everyone knows &nbsp; is really a $chr(160) character.

No, this is not a solution. You would end up with HARD SPACES (aka Non-Breaking SPace) in your code that will cause "Unknown command" errors.

Instead of having to manually break code into multiple lines, now you have to manually delete all the HARD SPACES which indent your code.

- Raccoon


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
#37084 19/07/03 08:11 PM
Joined: Dec 2002
Posts: 2,809
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
I just wrote this to an HTML file:
alias blah {<BR>
&nbsp;&nbsp;&nbsp;echo -a JHDSKJDHSJD<BR>
}


I then opened that file, copied it into mIRC's editor, and clicked {}. I then did /blah and I got:
JHDSKJDHSJD

So either IE converts the char 160 to a char 32, or mIRC does it, but either way it works fine pasting that into the editor.

#37085 20/07/03 12:48 AM
Joined: Feb 2003
Posts: 2,812
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
touché.


Well. At least I won lunch.
Good philosophy, see good in bad, I like!

Link Copied to Clipboard