|
|
|
Joined: Dec 2002
Posts: 580
Fjord artisan
|
OP
Fjord artisan
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.
|
|
|
|
Joined: Jan 2003
Posts: 2,523
Hoopy frood
|
Hoopy frood
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
|
|
|
|
Joined: Dec 2002
Posts: 580
Fjord artisan
|
OP
Fjord artisan
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...
|
|
|
|
Joined: Feb 2003
Posts: 2,812
Hoopy frood
|
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. - Raccoon
Well. At least I won lunch. Good philosophy, see good in bad, I like!
|
|
|
|
Joined: Jan 2003
Posts: 3,012
Hoopy frood
|
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
|
|
|
|
Joined: Feb 2003
Posts: 2,812
Hoopy frood
|
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!
|
|
|
|
Joined: Dec 2002
Posts: 2,809
Hoopy frood
|
Hoopy frood
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.
|
|
|
|
Joined: Feb 2003
Posts: 2,812
Hoopy frood
|
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   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!
|
|
|
|
Joined: Dec 2002
Posts: 2,809
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,809 |
Well no you wouldn't replace with  , you'd replace with 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 <b>, and the nl2br will allow the CRLF to become <br> therefore it would work perfectly.
|
|
|
|
Joined: Feb 2003
Posts: 2,812
Hoopy frood
|
Hoopy frood
Joined: Feb 2003
Posts: 2,812 |
I used   instead of because both are identical, but not everyone knows 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!
|
|
|
|
Joined: Dec 2002
Posts: 2,809
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,809 |
I just wrote this to an HTML file: alias blah {<BR> 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.
|
|
|
|
Joined: Feb 2003
Posts: 2,812
Hoopy frood
|
Hoopy frood
Joined: Feb 2003
Posts: 2,812 |
Well. At least I won lunch. Good philosophy, see good in bad, I like!
|
|
|
|
|
|
|
|