|
What this site really needs is a gadget article section and message board. And by gadgets I don't mean rubbishy javascript clocks and what not, but cool gadgets like The GP32x F-200[^] and Micro 'copters with frickin' laser beams[^] that people might actually want.
"On one of my cards it said I had to find temperatures lower than -8. The numbers I uncovered were -6 and -7 so I thought I had won, and so did the woman in the shop. But when she scanned the card the machine said I hadn't.
"I phoned Camelot and they fobbed me off with some story that -6 is higher - not lower - than -8 but I'm not having it."
-Tina Farrell, a 23 year old thicky from Levenshulme, Manchester.
|
|
|
|
|
|
It's still here. I'll check to see what's going on with it
cheers,
Chris Maunder
CodeProject.com : C++ MVP
|
|
|
|
|
Is there something going on with article images? I have had several instances where screen shots are not being displayed. Specifically this article, http://www.codeproject.com/KB/cs/GlobalizationSample.aspx[^] coming from server Web 17 doesn't come with images
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Individuality is fine, as long as we do it together - F. Burns
|
|
|
|
|
Yes, we've had a few hassles lining everything up but are going back to basics today to see what is causing the problem.
cheers,
Chris Maunder
CodeProject.com : C++ MVP
|
|
|
|
|
Thanks Chris! In case you don't know, you guys are doing a fantastic job!
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Individuality is fine, as long as we do it together - F. Burns
|
|
|
|
|
Why does my sig display differently when I put the code directly in a message? Notice that the gap between the top border of box and the first line of text in the signature is considerably SMALLER than the way it's displayed in the actual signature.
--- In-message sig starts (and this is the way I want it to look)
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
--- In-message sig ends
Here's the HTML with (artificial line breaks for the screen-width impaired):
<div style="border:2px solid #FF9900;
color:#000000;
background-color:#FDF3CF;
font-family:Arial;
font-size:11px;
padding:5px 5px 5px 5px;">
<i>"Why don't you tie a kerosene-soaked rag around your
ankles so the ants won't climb up and eat your candy
ass..."</i> - <b>Dale Earnhardt, 1997</b><br />
-----<br />
<i>"...the staggering layers of obscenity in your
statement make it a work of art on so many levels."
</i> - <b>Jason Jystad, 10/26/2001</b>
</div>
I'm using exactly the same html in this message as I did in the sig input form in the My Settings page.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
There's a bug in the signature processing code. Apparently, it tries to "pretty-print" HTML, if it doesn't find spaces before opening tags and after closing tags. By "pretty-print", i mean that it adds newlines and indentation.
The forum software converts newlines to <br> tags. So you really don't want additional newlines.
The work-around is to manually add spaces between tags and at the start and end of the post. I've (*ahem*) already modified CPhog to do this behind the scenes.
---- ...the wind blows over it and it is gone, and its place remembers it no more...
|
|
|
|
|
Why don't they just fix it to render the HTML correctly? My sig has no spaces between tags at all. The code in the <PRE> block is formatted to make it easier to read (and not cause a horizontal scroll bar).
I did notice that if you change/save your signature, it adds spaces in weird places.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
John Simmons / outlaw programmer wrote: Why don't they just fix it to render the HTML correctly?
I have to guess at this...
In the past, there have been a lot of problems caused by people who, out of ignorance, carelessness, or outright malice, would put invalid HTML into their sigs, spreading destruction and annoyance wherever they posted. So now, CP runs all HTML through a cleanup engine to ensure that it is valid HTML. I'm guessing that it is actually running it through an XML engine at some point, with the intent option turned on - which would be ok if it weren't for the \n -> <br> conversion that the forum engine does...
---- ...the wind blows over it and it is gone, and its place remembers it no more...
|
|
|
|
|
Well, one way to address the rogue HTML would be to always enclose a signature in a div with overflow set to "hidden" and a maximum allowable height (say 100 pixels) and width. That would/should prevent/reduce malformed HTML from screwing up the rest of the page.
They could also filter styles for undesirable elements, and prohibit some html tags altogether. Granted, writing such a filter would be tedious, but it's certainly not impossible, or even difficult.
Beyond that, for signatures they should :
- delete linefeeds instead of replacing them with a BR tag.
- eliminate any style element that has a negative value (eliminating negative margins, paddings, and other sizings)
- only allow sizes to be specified in pixels (no percentages or em's)
- disallow font sizes outside the range of 8 to 14 pixels
I did my entire sig with HTML formatting - entirely proper and legal HTML, I might add - and CP is borking it up.
Maybe people shouldn't be allowed to have sigs until they've been members for a couple of years.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Sorry, I think all font sizes should be in points, you should never assume other machines are
running at a dpi setting close to yours.
|
|
|
|
|
John Simmons / outlaw programmer wrote: Well, one way to address the rogue HTML would be to always enclose a signature in a div with overflow set to "hidden" and a maximum allowable height (say 100 pixels) and width. That would/should prevent/reduce malformed HTML from screwing up the rest of the page.
Except when someone screws up their nesting: <div><i></div></i> or <div><i></i>... and the latter is common enough simply because people will type or paste past the sig limit and parts get chopped off.
John Simmons / outlaw programmer wrote: They could also filter styles for undesirable elements, and prohibit some html tags altogether. Granted, writing such a filter would be tedious, but it's certainly not impossible, or even difficult.
I suspect that's what's been tried... maybe the author couldn't stand the tedium.
John Simmons / outlaw programmer wrote: I did my entire sig with HTML formatting - entirely proper and legal HTML, I might add - and CP is borking it up.
Hey, i hear ya. It took me a fair bit of time to figure out what was going on and how to work around it. I had something like 14 signatures that all broke in one way or another. I suspect this is just an option someone forgot to turn off, but frankly it's bizarre enough that i'm not sure i've even guessed at the problem correctly. And this isn't even the worst part - i had one sig that contained symbols ( · ), and CP now won't accept it at all - even though it's properly encoded as an HTML entity ( · ). Figure that one out...
---- ...the wind blows over it and it is gone, and its place remembers it no more...
|
|
|
|
|
John Simmons / outlaw programmer wrote: enclose a signature in a div with overflow set to "hidden" and a maximum allowable height (say 100 pixels) and width
Done but doesn't solve hanging/malformed HTML. Divs leak badly.
John Simmons / outlaw programmer wrote: They could also filter styles for undesirable elements, and prohibit some html tags altogether. Granted, writing such a filter would be tedious, but it's certainly not impossible, or even difficult.
This is already in place.
John Simmons / outlaw programmer wrote: delete linefeeds instead of replacing them with a BR tag.
Sigs must work the same way as the main message text otherwise it would be inconsistent and confusing
John Simmons / outlaw programmer wrote: and CP is borking it up
This is (was) a bug with us. No need to come down on heavy because our code is a little wonky.
cheers,
Chris Maunder
CodeProject.com : C++ MVP
|
|
|
|
|
Chris Maunder wrote: his is (was) a bug with us. No need to come down on heavy because our code is a little wonky.
I didn't think I was coming down that heavy.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Mind if I borrow this for a second?
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
There ya go - it looks fine in the message, but the post-processing done on the sig before it's "saved" adds stuff that changes it's appearance.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Please consider setting overflow to "hidden" so we don't get the scrollbars. If you're trying to limit people's signatures to a maximum size, that's fine, but I think you should clip the content if it exceeds your maximum size. The scrollbars take up more room than they're worth.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Then what indication do you have that a signature has been clipped?
I'm trying to make everyone happy here. Am tempted just to revert back.
cheers,
Chris Maunder
CodeProject.com : C++ MVP
|
|
|
|
|
Just put a notice where the signature is edited saying that the signature will be constrained to a div that's 800x100 or some other appropriate size, and caution them to keep their sigs simple. That's what you're after anyway, right?
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
|
Probably because the article's author messed up when assigning it to a category/section.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
I mean, is the ; after the closing bracket really expected ?
|
|
|
|
|
yes, statements should end on either ; or }
and I like it like that.
|
|
|
|
|
toxcct wrote: I mean, is the ; after the closing bracket really expected ?
Yes, how else are you going to know when the statement ends? Syntax is important, you know.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|