diff --git a/package-info.xml b/package-info.xml
new file mode 100644
index 0000000..8ce896a
--- /dev/null
+++ b/package-info.xml
@@ -0,0 +1,23 @@
+
+
+
+ Frenzie:quick_quote
+ Quick Quote
+ 0.1
+ addon
+
+ readme.txt
+ This ElkArte addon is released under a BSD license
+ Integration hooks
+ The workhorse
+ English language strings
+
+
+
+
+
+
+
+
+
+
diff --git a/quickQuote.english.php b/quickQuote.english.php
new file mode 100644
index 0000000..1a151e1
--- /dev/null
+++ b/quickQuote.english.php
@@ -0,0 +1,3 @@
+=0 ){
+ bb.push('[ATTACH='+node.href+']');
+ bb.push(treeToBBCode(node.childNodes));
+ bb.push('[/ATTACH]');
+ }
+ else{
+ bb.push('[url='+node.href+']');
+ bb.push(treeToBBCode(node.childNodes));
+ bb.push('[/url]');
+ }
+ break;
+ case 'img':
+ var smileyCode = getSmileyCode(node);
+ bb.push( smileyCode ? ' '+smileyCode+' ' : '[img]'+node.src+'[/img]');
+ break;
+ case 'ol':
+ var type = node.className.indexOf("alpha")>=0 ? 'a' : '1';
+ case 'ul':
+ bb.push('[list'+(type?'='+type:'')+']');
+ var lis = node.selectNodes('li');
+ for(var k=0,li;li=lis[k++];)
+ bb.push('\n [*] '+trim(treeToBBCode(li)));
+ bb.push('[/list]');
+ break;
+ case 'span':
+ //check for css properties
+ var props=[
+ {name:'textDecoration',forceValue:'underline',before:'[u]',after:'[/u]'},
+ {name:'color',before:'[color=@value]',after:'[/color]'},
+ {name:'fontFamily',before:'[font=@value]',after:'[/font]'},
+ {name:'fontSize',before:'[size=@value]',after:'[/size]',values:{
+ 'xx-small':1,
+ 'x-small':2,
+ 'small':3,
+ 'medium':4,
+ 'large':5,
+ 'x-large':6,
+ 'xx-large':7
+ }}
+ ];
+ var start='', end='';
+ for(var k=0,p;p=props[k++];){
+ var value = trim(node.style[p.name]||'',' "');
+ if( ( p.forceValue && value==p.forceValue ) || ( !p.forceValue && value ) ){
+ start += p.before.replace('@value',(p.values ? p.values[value]:null) || value);
+ end += p.after;
+ };
+ };
+ //check for class attribute
+ props=[
+ {name:'alignleft',before:'[ALIGN=left]',after:'[/ALIGN]'},
+ {name:'aligncenter',before:'[ALIGN=center]',after:'[/ALIGN]'},
+ {name:'alignright',before:'[ALIGN=right]',after:'[/ALIGN]'},
+ {name:'alignjustify',before:'[ALIGN=justify]',after:'[/ALIGN]'}
+ ];
+ for(var k=0,p;p=props[k++];){
+ if( node.className.indexOf(p.name)>=0 ){
+ start += p.before;
+ end += p.after;
+ };
+ };
+ bb.push(start);
+ bb.push(treeToBBCode(node.childNodes));
+ bb.push(end);
+ break;
+ case 'p':
+ var ns = node.nextElementSibling||node.nextSibling;
+ //detect quote
+ if( node.className.indexOf("cite") >= 0 &&
+ ns &&
+ ns.nodeName.toLowerCase()=='blockquote' &&
+ ns.className.indexOf("bbquote") >= 0 ){
+ //TODO: user quote - this will break when the forums get localized !
+ ns.__userNameQuoted = node.textContent.replace(/.*originally\s+posted\s+by\s+/i,'').replace(/\s*\:$/,'');
+ }
+ else{
+ bb.push(treeToBBCode(node.childNodes));
+ }
+ break;
+ case 'blockquote':
+ if( node.className.indexOf("bbquote") >= 0 ){
+ bb.push('[QUOTE'+(node.__userNameQuoted?'='+node.__userNameQuoted:'')+']');
+ bb.push(treeToBBCode(node.childNodes));
+ bb.push('[/QUOTE]');
+ }
+ else{
+ bb.push(treeToBBCode(node.childNodes));
+ }
+ break;
+ default:
+ bb.push(treeToBBCode(node.childNodes));
+ break;
+ };
+ }
+ break;
+ case Node.DOCUMENT_NODE:// 9
+ case Node.DOCUMENT_FRAGMENT_NODE:// 11
+ bb.push(treeToBBCode(node.childNodes));
+ break;
+ case Node.TEXT_NODE://3
+ case Node.CDATA_SECTION_NODE:// 4
+ var text = node.nodeValue;
+ if (!node.selectSingleNode('ancestor::pre'))
+ text = text.replace(/\n[ \t]+/g,'\n')
+ bb.push(text);
+ break;
+ }
+ return bb.join('');
+ };
+ treeToBBCode.defaults = {
+ strong:{before:'[B]',after:'[/B]'},
+ b:{before:'[B]',after:'[/B]'},
+ i:{before:'[I]',after:'[/I]'},
+ em:{before:'[I]',after:'[/I]'},
+ s:{before:'[S]',after:'[/S]'},
+ sup:{before:'[SUP]',after:'[/SUP]'},
+ sub:{before:'[SUB]',after:'[/SUB]'},
+ pre:{before:'[CODE]',after:'[/CODE]'},
+ br:{before:'\n',after:''}
+ };
+
+ /*
+ * trim() - trim string
+ */
+ function trim(str, charToReplace) {
+ //if char is specified, use that one else clear whitespace
+ if( charToReplace ) {
+ return String(str).replace(new RegExp('^['+charToReplace+']+|['+charToReplace+']+$','g'),'');
+ }
+ else{
+ return String(str).replace(/^\s+|\s+$/g, '');
+ }
+ }
+
+ /*
+ * getSmileyCode() - returns smiley code
+ */
+ function getSmileyCode(img){
+ if (!img.src.match(/^http:\/\/thedndsanctuary\.eu\/Smileys\/(default|myopera)\/(\w+)\.gif$/))
+ return ''; // Event not spawned by a forum smiley (else match smiley name below)
+
+ else {
+ // Alternative text corresponds to smiley code.
+ return img.alt;
+ }
+
+/*
+ var smileyName = RegExp.$1;
+
+ if (buildSmileyTooltip.buildSmileyTooltipMatches[smileyName]) // Smiley is in exception list.
+ return buildSmileyTooltip.buildSmileyTooltipMatches[smileyName];
+ else // Use filename to obtain smiley code.
+ return ':'+smileyName+':';*/
+ }
+
+ function getParents(el) {
+ var parents = [];
+
+ var p = el.parentNode;
+
+ while (p !== null) {
+ var o = p;
+ parents.push(o);
+ p = o.parentNode;
+ }
+ return parents; // returns an Array []
+ }
+
+ function getPostAncestor(selectionAncestor) {
+ var parents = getParents(selectionAncestor);
+ for(var i=0; i