|
|
PRE blocks (and CODE blocks) get syntax colored in messages, which is great.
The tags also accept a language specification, as in <PRE lang=VB>
The default language seems to be C# in most if not all forums.
How about making it forum-specific? With an incorrect language setting, results can be strange, here[^] is an example without lang= (and one of the replies has lang=VB).
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
I'm going to hold off on this excellent idea just for now, but yes, I agree something in that vein would be very helpful.
cheers,
Chris Maunder
The Code Project Co-founder
Microsoft C++ MVP
|
|
|
|
|
I prefer them all in "basic black" unless I specify a language.
|
|
|
|
|
Most members won't specify a language and most uses of code/pre will have actual code.
If you wish to have no colorising the option of adding lang="text" as an attribute to the pre/code tag exists.
cheers,
Chris Maunder
The Code Project Co-founder
Microsoft C++ MVP
|
|
|
|
|
I suggest you adjust your monitor to grayscale only then
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
OK.
you could add it to the "Current Bug list - PLEASE READ BEFORE POSTING [last update: Aug 9]" sticky.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
How hard would it be to do this automatically so my posts from the last session weren't marked as new? eg
if ((Post.TimeStamp > Reader.LastSessionTimeStamp) && (Post.AuthorID != Reader.UserID))
Post.IsNew = true;
Since you need to do the check on a per page load basis anyway because of the timestamp I don't think the userID check would cause a significant extra burden.
(Hoping not to be proved wrong)
The European Way of War: Blow your own continent up.
The American Way of War: Go over and help them.
|
|
|
|
|
What a sensible idea. I'll have that uploaded tonight.
cheers,
Chris Maunder
The Code Project Co-founder
Microsoft C++ MVP
|
|
|
|
|
can you use the same logic for bolding the navigation pane items? In late hours I sometimes go visit bolded forums to discover the only new messages I find are my own.
I trust this is a bit more challenging...
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Unfortunately that is more challenging but I'll see if I can wrangling it.
cheers,
Chris Maunder
The Code Project Co-founder
Microsoft C++ MVP
|
|
|
|
|
have a first then.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Too bad. It's confusing enough when the nav and forum are out of sync due to caching.
The European Way of War: Blow your own continent up.
The American Way of War: Go over and help them.
|
|
|
|
|
I still say we need a Regular Expressions forum.
|
|
|
|
|
What about a RegEx section as well?
cheers,
Chris Maunder
The Code Project Co-founder
Microsoft C++ MVP
|
|
|
|
|
What's a "section"? Do they require extra hamsters?
|
|
|
|
|
As in an article section.
Yes, we have special hamsters for these. Commando Hamsters. Very rare.
cheers,
Chris Maunder
The Code Project Co-founder
Microsoft C++ MVP
|
|
|
|
|
Sure, might as well, go for it, knock yourself out.
I'll get working on my Regex article...
|
|
|
|
|
Hi,
I need a regular expression that will validate if an input has 1 t 10 alphanumerics but exclude the spaces.
I tried this one \b[\w]{1,10}\b. it works if put anything between than 1 and 10 alphanumerics.
If I put a number and a space it still validates.
How can I make sure that it does not validate if someone puts a space?
Thanks
Wonder Hlongwane
|
|
|
|
|
If you want to validate that the user entered only the alphanumerics:
^\w{1,10}$
|
|
|
|
|
Hi,
Thanks for the reply
I put \b[\w]{1,10}$\b since I want it to invalidate if it finds something not AlphaNumeric like a space.
This seems to invalidate only when I put the space at the end of the input.
But If I say 12345 67890 or if I put the space at the beginning it validates. That is not what I need.
Please help
Thank you
Wonder
|
|
|
|
|
Did you try the Regex I suggested?
|
|
|
|
|
Eyi,
It works like a charm.
I had omitted the ^ thats is why it did not work.
Thank you very much
Wonder Hlongwane
South Africa
|
|
|
|
|
|
How did you stumble upon that profile? He does not have any messages/articles.
|
|
|
|