Gossamer Forum
Home : Products : Gossamer Forum : Discussion :

Selected Text Quoting

Quote Reply
Selected Text Quoting
I badly need a "selected text" quoting/reply function for my family's GForum board we are finishing. I have searched onsite here without finding anything definitive. Taking liberty of posting some code segments from mods to another package we tested -- these functionally worked perfectly on that board. One highlights text in a message, chooses "Quote with Link" and ONLY the selected text appears as a quote in the reply. There is also a nice author-date-time addition to the quote function.
I am not a programmer; I hope someone who is might find a way to get this working in GForum 1.2.3. It is really a beneficial code change.

Code:
####
First, code that was inserted into the "message display" segment
####

<#if $head->{param} =~ match(Add)#>
<img src="$skin_icon_url/quote.gif" title="Copy highlighted text to new message" alt="Copy highlighted text to new message" border="0" height="16" onMouseDown="copy_selection('$message->{author}','<#date $message->{time} format "$L{LONGDATE}"#>','#POST$message->{number}')" onMouseOver="javascript:if (style) style.cursor = 'pointer';">
<#endif#>

####
Then, code that was inserted into a javascript functions segment
####

function copy_selection(message_author,post_date,link_post,author_profile) {
if (document.getSelection) {
//for Netscape
var str = document.getSelection();
document.userpass.message.value+="\\quote_with_link{"+message_author+","+post_date+","+link_post+","+str+"}";
document.userpass.message.focus();
} else if (document.selection) {
//for Internet Explorer
var str = document.selection.createRange().text;
document.userpass.message.value+="\\quote_with_link{"+message_author+","+post_date+","+link_post+","+str+"}";
document.userpass.message.focus();
var rng = document.userpass.message.createTextRange();
rng.collapse(false);
rng.select();
} else {
//display message if browser does not support above methods.
window.alert("Your browser does not support this feature");
return;
}
}

####
Finally, a "webtags" description of the "quote with link" tag
####

"quote_with_link"

<blockquote><hr size=0><!-quote-!><font size=1 font color=b22222><b><u>|1|</font><font size=1><font color=000080></u> wrote on |2| - |3|, |4|:</b><p><font size=1><a href="|5|">|6|</font></a><!-/quote-!><hr size=0><font size=2><font color=000000></blockquote>
Quote Reply
Re: [cajun100] Selected Text Quoting In reply to
After spending more time on this forum, I notice that there are only a handful of GT staff replies to any messages here in the last few months. Is this a hint of GForum being dropped as a viable product? Has the number of actual users shrunken? I also notice that a few of the better forum sites once held up as GForum examples are now using other software (notably VBulletin or PhPBB). Am I taking a chance here getting Gforum ready for use in a small setting? I need some support -- not a lot -- but if you visit some of the other discussion board sites, the traffic is heavy, the advice flows freely. The comparison here is not encouraging.
Any comments from anyone?
Quote Reply
Re: [cajun100] Selected Text Quoting In reply to
Hi Cajun,

No, we have no intention of dropping Gossamer Forum as a supported product - we're currently working on version 2.0.0, and beyond the 2.x.y incremental releases, we also have much longer term plans for a 3.0.0 release. The principle reason for the drop is that we are putting a lot of time and effort into our new version development of Gossamer Forum as well as other products. But let me repeat again - Gossamer Forum is in no way an abandoned or dropped program.

As to your specific question, I think it is possible to implement something like this - it's something that I think can be added fairly easily to version 2 and would benefit GForum. After going through it, I think it requires more than a simple template change, however the changes will most likely provide the benefit of making tasks similar to this easier in the future, and so I think it is definitely a positive thing to include in v2.

Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com
Quote Reply
Re: [Jagerman] Selected Text Quoting In reply to
Thanks for the fine response, very helpful. I am not up to speed on your development activities, obviously. Let me make something clear: I very much enjoy using and refining your forum program. It is by far the most flexible in admin tasks, and I do prefer threading and the approach GT has taken. Plus it is "clean" -- not full of flashing icons, lights and whirling logos, etc.
I also appreciate your clarifying that the "select text" function would likely require more than template language changes -- that relieves me of worrying and struggling with it for now. I HAVE successfully made the simple changes brought up by others a year or so ago, which cleared up some of the reply box orientation, let me easily indent the quote, etc.
I hope you as a developer can fully appreciate the end user's reaction to limited feedback on a product like this. I have already worked my way through 3 good discussion board packages that either disappeared or were merged/acquired out of existence or usefulness to a small user.
And I find I can use the "Advanced Editor" under Firefox !!!!!! Hooray.