|
I don't know if my problem is related but, its really annoying that some ad banners on this site are loaded from external sites (like the Dundas advert http://www.dundas.com/products/mfc/grid/images/Grid5Banner.gif)
It is annoying since over here we have a firewall which only allows access to certain sites, and www.dundas.com is not one of them, so every now and then I get an Access denies message.
(2b || !2b)
|
|
|
|
|
Chris, how about a Reply with quote button. Many times when editing a reply you will quote the previous posting, so an automatism would be very helpful. I suggest following format:
Thomas Freudenberg wrote: Chris, how about a Reply with quote button. Many times when editing a reply you will quote the previous posting, so an automatism would be very helpful. I suggest following format:
<blockquote><hr><small>
<b><a href="/script/profile/whos_who.asp?id=4960" target="_blank">Thomas Freudenberg</a> wrote:</b>
<br>
Chris, how about a <i>Reply with quote</i> button. Many times when editing
a reply you will quote the previous posting, so an automatism would be very helpful. I
suggest following format:
</small><hr></blockquote>
Regards
Thomas
Disclaimer: Because of heavy processing requirements, we are currently using some of your unused brain capacity for backup processing. Please ignore any hallucinations, voices or unusual dreams you may experience. Please avoid concentration-intensive tasks until further notice. Thank you.
|
|
|
|
|
I don't know if that is a good thing. Having it quote the entire message would lead to a lot of having to read through the same comments a lot of times in the different messages. I prefer just to quote the relevant part I'm replying to. Imagine the last message in a thread having the entire message made up of the entire thread plus a me too response.
Michael
|
|
|
|
|
Michael P Butler wrote: I prefer just to quote the relevant part I'm replying to.
And so I do
I know that trusting in the user's discipline to quote relevant parts only is too naive. Of course we must find a compromise between easy quoting and completely quoted threads.
Regards
Thomas
Disclaimer: Because of heavy processing requirements, we are currently using some of your unused brain capacity for backup processing. Please ignore any hallucinations, voices or unusual dreams you may experience. Please avoid concentration-intensive tasks until further notice. Thank you.
|
|
|
|
|
Why not have it so that the user has to highlight the text they want to quote and then click a Quote button which inserts the highlighted text with the Quote formatting into the text box.
If they don't highlight any text then nothing happens when they click the button (or it pops up a message saying "Highlight some text, please").
regards,
Paul Watson
Bluegrass
Cape Town, South Africa
Do you Sonork? I do! 100.9903 Stormfront
"The greatest thing you will ever learn is to love, and be loved in return" - Moulin Rouge
|
|
|
|
|
If you can work out the javascript that copies the selected text and pastes it into the edit window then you're a better man than I! (spent many hours trying to do exactly this - am I missing something simple?)
cheers,
Chris Maunder (CodeProject)
|
|
|
|
|
If you can work out the javascript that copies the selected text and pastes it into the edit window then you're a better man than I!
You should not set yourself up like that because...
Tada! Get selected text example
The trick is not so simple. Basically you have to create a textRange object and then pull the value from there.
Here is an example (very simple and quick):
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled</title>
<script language="JavaScript">
function getSel()
{
if (document.getSelection) txt = document.getSelection();
else if (document.selection) txt = document.selection.createRange().text;
else return;
if (txt !== ""){
txtReply.value = "<HR><I>" + txt.replace(new RegExp('([\\f\\n\\r\\t\\v ])+', 'g')," ") + "</I><HR>";
}
else
{
alert('You must please select some text to quote');
}
}
</script>
</head>
<body>
<DIV id="divOriginalPost">This is the original post, select some text and then click the quote button</DIV>
<TEXTAREA id="txtReply" COLS="40" ROWS="10"></TEXTAREA>
<INPUT type="Button" onclick="getSel()" id="cmdQuote" value="Quote">
</body>
</html>
It can be made to work in Netscape. We had to do this for an intranet project and it was a pain to figure out. Luckily that link I posted above helped a lot
I still don't feel a better man than you though.
regards,
Paul Watson
Bluegrass
Cape Town, South Africa
Do you Sonork? I do! 100.9903 Stormfront
"The greatest thing you will ever learn is to love, and be loved in return" - Moulin Rouge
|
|
|
|
|
Thanks Paul, thanks Mike!
The quote button is in.
cheers,
Chris Maunder (CodeProject)
|
|
|
|
|
*highlight text*
*click quote*
Chris Maunder wrote:
Thanks Paul, thanks Mike!
The quote button is in.
Ooooohhhhh
Now all we need is a "Generate rational, intelligent and rallying counter arguement" button...
regards,
Paul Watson
Bluegrass
Cape Town, South Africa
Do you Sonork? I do! 100.9903 Stormfront
"The greatest thing you will ever learn is to love, and be loved in return" - Moulin Rouge
|
|
|
|
|
Here's code that will append the current selection to the end of the textarea's contents. I couldn't figure out how to insert it at the current caret position (or even how to get the caret position).
Button1 = your Paste button, Text1 = the text box.
function Button1_onclick() {
var seltext = document.selection.createRange().text;
if ( seltext != "" )
Text1.value += seltext;
}
--Mike--
http://home.inreach.com/mdunn/
#include "witty_sig.h"
your with and
|
|
|
|
|
I couldn't figure out how to insert it at the current caret position (or even how to get the caret position).
I noticed that when inserting emoticons on CP it also just puts it at the end of the text, not where the cursor is.
However, seeing as focus is passed to the Quote button would there be a cursor (caret) position to get? I guess onblur of the textbox you could record the last caret position and use that. Then when you click the Quote button it uses the caret variable as the position... hmmm might work.
brb, trying it out
regards,
Paul Watson
Bluegrass
Cape Town, South Africa
Do you Sonork? I do! 100.9903 Stormfront
"The greatest thing you will ever learn is to love, and be loved in return" - Moulin Rouge
|
|
|
|
|
Paul Watson wrote:
I guess onblur of the textbox you could record the last caret position and use that. Then when you click the Quote button it uses the caret variable as the position... hmmm might work.
brb, trying it out
Any luck?
cheers,
Chris Maunder (CodeProject)
|
|
|
|
|
Chris Maunder wrote:
Any luck?
Here it is Chris. Once again not all my work, got it from FAQTs - Knowledge Base.
I took your new Quote code and put in the other code.
Once again it uses the TextRange object and then the CharAt method.
You may have to do a few more tests than I did on recording the caret position from the TEXTAREA as I have only covered OnClick and OnKeyPress. (Avoid the OnBlur, something odd happens)
You could also use the functions for inserting the Emoticons! That would be nice
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled</title>
</head>
<script language='JavaScript'>
<!--
function QuoteText(author)
{
var txt = "";
if (document.getSelection) txt = document.getSelection();
else if (document.selection) txt = document.selection.createRange().text;
else return;
var emph = false;
emph = true
var TextArea = txtReply;
if (txt !== "") {
var text = "";
var length = text.length;
if (length > 0 && text.charAt(length-1) != "\n") text += "\n\n";
text += (author + " wrote:\n");
if (emph) text += "<i>";
text += txt;
if (emph) text += "</i>";
text += "\n\n";
insertAtCaret(TextArea, text);
TextArea.focus();
}
else
alert('You did not select any text to quote');
}
function storeCaret (textEl)
{
if (textEl.createTextRange) textEl.caretPos = document.selection.createRange().duplicate();
}
function insertAtCaret (textEl, text)
{
if (textEl.createTextRange && textEl.caretPos)
{
var caretPos = textEl.caretPos;
caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? text + ' ' : text;
}
else textEl.value = text;
}
</script>
<body>
<DIV id="divOriginal" style="padding: 5px; width: 400px; border: 1px solid #cccccc">
Colin Davies wrote:
Yeah the quote button is a cool idea<BR><BR>
Thank Paul Watson and Mike Dunn for the kick in the bum to get this feature added.<BR><BR>
cheers,<BR>
Chris Maunder (CodeProject)
</DIV>
<BR><INPUT type="Button" name="cmdQuote" value="Quote that!" onclick="QuoteText('Bob');"><BR><BR>
<TEXTAREA name="txtReply" id="txtReply"
rows="20" cols="47"
style="width: 400px;"
onclick="storeCaret(this);"
onkeypress="storeCaret(this);" ></TEXTAREA>
</body>
</html>
regards,
Paul Watson
Bluegrass
Cape Town, South Africa
Do you Sonork? I do! 100.9903 Stormfront
"The greatest thing you will ever learn is to love, and be loved in return" - Moulin Rouge
|
|
|
|
|
Thanks Paul!
I had a go at this but it didn't seem to be consistently saving the carrot position. I'll have a second attempt later.
cheers,
Chris Maunder (CodeProject)
|
|
|
|
|
Hmmm, in what instances doesn't it record the caret position? I will have a look at it and fiddle.
(lame joke alert!) I may call Bugs Bunny, he is good with carrots...
Chris Maunder wrote:
cheers,
Chris Maunder (CodeProject)
Damn I like clicking that button...
regards,
Paul Watson
Bluegrass
Cape Town, South Africa
Do you Sonork? I do! 100.9903 Stormfront
"The greatest thing you will ever learn is to love, and be loved in return" - Moulin Rouge
|
|
|
|
|
I only had a brief time to play and it seemed semi-random. I'll have to sit down and really thrash it out.
cheers,
Chris Maunder (CodeProject)
|
|
|
|
|
1) A good idea would be to slightly vary the table row background of each forum message entry so that the subject can be linked to the author more easily. Just vary the orange slightly for conso that you can read across without jumping lines (as my eyes always tend to do.) I often find it difficult to link a post with an author on big threads.
2) There could be an 'expand all messages' option on the DHTML view so that IE can expand every messsage on the page. It would result in one huge page with all of the message text available with no clicking. Handy for sitting back and letting the page scroll.
Simon
Hey, it looks like you're writing a letter!
|
|
|
|
|
How about setting one of these up Chris? With a special Retromingents sections for john and all of his friends.
Michael Martin
Pegasystems Pty Ltd
Australia
martm@pegasystems.com
+61 413-004-018
"Don't belong. Never join. Think for yourself. Peace"
- Victor Stone
|
|
|
|
|
The gender ratio would be a problem. For every one girl, there are 500 guys here. Perhaps even 1000.
Nish
|
|
|
|
|
I doubt the ratio is that high! Probably 50 to 1 i'd say.
Simon
Hey, it looks like you're writing a letter!
|
|
|
|
|
How about a virtual dating service that would allow geeks to date without risk of actual human contact? That would allow us to indulge in our wildest fantasies without having to make small talk, shave or leave our CPU.
/ravi
"There is always one more bug..."
ravib@ravib.com
http://www.ravib.com
|
|
|
|
|
Already been done: It is called IRC
regards,
Paul Watson
Bluegrass
Cape Town, South Africa
"The greatest thing you will ever learn is to love, and be loved in return" - Moulin Rouge
"In other words, the developer is dealing with an elephant, the accountant is dealing with a bunny rabbit." by Stan Shannon - 16/10/2001
|
|
|
|
|
Some way to reply to the root of the thread from anywhere within the thread would be useful.
What happens to me is that I read the entire thread and then decide I want to say something about the thread, (or post off topic, you know me ), and I am three pages away from the root message. If I want my post to be in response to the root message then I have to page back to the root.
Or is there a way to do this already that I am managing to overlook?
Jason Jystad
Cito Technologies
www.citotech.net
>------------------------------------------------<
"Luckily," he went on, "you have come to exactly the right place with your interesting problem, for there is no such word as 'impossible' in my dictionary. In fact," he added, brandishing the abused book, "everything between 'herring' and 'marmalade' seems to be missing."
-- Dirk Gently (Douglas Adams)
>------------------------------------------------<
|
|
|
|
|
Click on [View Thread]
Nish
|
|
|
|
|
I don't really like the thread view, but I tried it out and it doesn't seem to give me any way to do what I am talking about.
Maybe I am just not seeing it, it is past my bedtime I'll try again in the morning.
Jason Jystad
Cito Technologies
www.citotech.net
>------------------------------------------------<
"Luckily," he went on, "you have come to exactly the right place with your interesting problem, for there is no such word as 'impossible' in my dictionary. In fact," he added, brandishing the abused book, "everything between 'herring' and 'marmalade' seems to be missing."
-- Dirk Gently (Douglas Adams)
>------------------------------------------------<
|
|
|
|