Topic: [extension release] pun_quote 2.0.2

This is a release of the new version of pun_quote. It is available on the extension page, SVN or you can get it via pun_repository. This version fixes bugs described in wiki, and improves the algorithm of processing selected text.

Re: [extension release] pun_quote 2.0.2

Glad to see it's fixed. I had a temporary fix before (modified .js to use seo-friendly urls) but it didn't resolve the signature in quote issue. Works great smile

Re: [extension release] pun_quote 2.0.2

don't work
i'm use the Opera v9.63

Re: [extension release] pun_quote 2.0.2

I've tested this extension in  Opera v9.63.  It seems to work properly. Could you please describe how it doesn't work by you in more detailed way?

Re: [extension release] pun_quote 2.0.2

pun_quote 2.0.3 has been released. Bugs appeared because of the changes in user's status (online/offline) are fixed.

Re: [extension release] pun_quote 2.0.2

i just updated to latest version, and it doesn't quote anymore. it was quoting before. i use google chrome.

MyFootballCafe.com  is Now Online!

Re: [extension release] pun_quote 2.0.2

I use FF 2.xx and it doesn't quote anything (for 2.0.2 and 2.03)

Re: [extension release] pun_quote 2.0.2

Slavok wrote:

I've tested this extension in  Opera v9.63.  It seems to work properly. Could you please describe how it doesn't work by you in more detailed way?

it doesn't quote anything. i don't know why.

Re: [extension release] pun_quote 2.0.2

SuperMAG wrote:

i just updated to latest version, and it doesn't quote anymore. it was quoting before. i use google chrome.

I have tested pun_quote in Google Chrome 1.0.154.48, it seems to work properly.
The latest version of pun_quote 2.0.4 is available for download. In this version fixed bug with quoting text with substitution lines in main.tpl.

10 (edited by daris 2009-02-13 22:05)

Re: [extension release] pun_quote 2.0.2

Slavok, what do you think about inserting quote content at selected position of quick reply field? Like pun_bbcode does. Something like:

--- scripts_org.js    2009-02-13 22:59:00.625000000 +0100
+++ scripts.js    2009-02-13 22:59:16.531250000 +0100
@@ -243,7 +243,7 @@
         }
     }
 
-    element.value += '[quote=' + author + ']' + post_content + '[/quote]';
+    q_insert_text(element, '[quote=' + author + ']' + post_content + '[/quote]');
 }
 
 function Reply(tid_param, qid_param, d)
@@ -329,7 +329,7 @@
         }
     }
 
-    element.value += ParseMessage(post_content);
+    q_insert_text(element, ParseMessage(post_content));
     form.submit();
     return;
 }
@@ -352,3 +352,34 @@
 }
 
 
+function q_insert_text(element, content)
+{
+    // IE support
+    if (document.selection && document.selection.createRange)
+    {
+        element.focus();
+        sel = document.selection.createRange();
+        sel.text = content;
+        element.focus();
+    }
+
+    // Moz support
+    else if (element.selectionStart || element.selectionStart == '0')
+    {
+        var startPos = element.selectionStart;
+        var endPos = element.selectionEnd;
+
+        element.value = element.value.substring(0, startPos) + content + element.value.substring(endPos, element.value.length);
+        element.selectionStart = element.selectionEnd = endPos + content.length;
+        element.focus();
+    }
+
+    // Fallback support for other browsers
+    else
+    {
+        element.value += content;
+        element.focus();
+    }
+
+    return;
+}

11

Re: [extension release] pun_quote 2.0.2

daris wrote:

...what do you think about inserting quote content at selected position of quick reply field?

Are you talking about inserting a quote at the cursor position? This feature request was added to Wiki by Anatoly.

12

Re: [extension release] pun_quote 2.0.2

Yes, exactly

13 (edited by daris 2009-02-17 18:20)

Re: [extension release] pun_quote 2.0.2

I found next bug. It shows some code at top of page (and quoting doesn't work) when I add </script> to post. I think javascript code should be inside html comment "<!-- ... //-->", quick patch:

--- manifest_old.xml    2009-02-17 19:00:14.781250000 +0100
+++ manifest.xml    2009-02-17 19:00:32.875000000 +0100
@@ -58,7 +58,7 @@
                 
                 if ($forum_db->num_rows($pun_quote_result))
                 {
-                    $forum_head['pun_quote_js'] .= '<script type="text/javascript">';
+                    $forum_head['pun_quote_js'] .= '<script type="text/javascript"><!--';
                     $forum_head['pun_quote_js'] .= 'var pun_quote_posts = new Array();';
                     $forum_head['pun_quote_js'] .= 'var pun_quote_authors = new Array();';
     
@@ -70,7 +70,7 @@
                         $forum_head['pun_quote_js'] .= 'pun_quote_authors['.$pun_quote_curr_message['id'].'] = "'.$pun_quote_curr_message['poster'].'";';
                     }
     
-                    $forum_head['pun_quote_js'] .= '</script>';
+                    $forum_head['pun_quote_js'] .= '//--></script>';
                 }
             }
 

edit: you can see demo of this bug at top of page big_smile

edit2: it doesn't solve problem when there's

//--></script>

in the post. Why don't you just encode all html chars using forum_htmlencode and then decode them back in javascript file?

14

Re: [extension release] pun_quote 2.0.2

Post for the Mods/Devs. Have you seen the top of this page when you view the topic?

Re: [extension release] pun_quote 2.0.2

Same error here. Must be a bug in some JS functions.

16

Re: [extension release] pun_quote 2.0.2

New version of pun_quote 2.1 has been released. The bug with output of special HTML chars was fixed. Feel free to report bugs.

17

Re: [extension release] pun_quote 2.0.2

New version of pun_quote  has been released. It is available on the extension page, SVN, in pun_repository. JS-arrays for quoting aren't output for guests now.

Re: [extension release] pun_quote 2.0.2

hey slavok, i think you people should release 1.3.3 now, there are alot of bugs fixed.

MyFootballCafe.com  is Now Online!

Re: [extension release] pun_quote 2.0.2

i have a problem, after i installed the latest version, it doesnt quick quote anymore, it normal quote now, i tried reinstalling, full refresh etc. nothing works.

MyFootballCafe.com  is Now Online!

Re: [extension release] pun_quote 2.0.2

SuperMAG wrote:

i think you people should release 1.3.3 now, there are alot of bugs fixed.

There are some bugs to be fixed. Then we'll release 1.3.3.

21

Re: [extension release] pun_quote 2.0.2

SuperMAG wrote:

hey slavok, i think you people should release 1.3.3 now, there are alot of bugs fixed.

The release of new version of pun_quote will not affect the fixing bugs and release of PunBB 1.3.3.

SuperMAG wrote:

i have a problem, after i installed the latest version, it doesnt quick quote anymore, it normal quote now, i tried reinstalling, full refresh etc. nothing works.

The latest version of the extension was installed on our forum and it works fine for me. Please, describe in a more detailed way the actions you do, when posts aren't quoted.

Re: [extension release] pun_quote 2.0.2

Slavok wrote:
SuperMAG wrote:

hey slavok, i think you people should release 1.3.3 now, there are alot of bugs fixed.

The release of new version of pun_quote will not affect the fixing bugs and release of PunBB 1.3.3.

SuperMAG wrote:

i have a problem, after i installed the latest version, it doesnt quick quote anymore, it normal quote now, i tried reinstalling, full refresh etc. nothing works.

The latest version of the extension was installed on our forum and it works fine for me. Please, describe in a more detailed way the actions you do, when posts aren't quoted.

i wasnt talking about quote extension on my first post, sorry i posted in the wrong post. i was talking that there have been alot of bugs fixed in the trac. and 1.3.2 has alot of bugs. so it would be bitter if it is released.

------------

oh and about quote extension, its working now, the javascript wasn't loading at first. it loads now.

MyFootballCafe.com  is Now Online!

23

Re: [extension release] pun_quote 2.0.2

bug: if selection includes a smiley, then whole message text is quoted rather than just the selection

24

Re: [extension release] pun_quote 2.0.2

i get this js error when click Quick Quote link:

Error: pun_quote_authors is not defined
Source File: http://forum.projanmo.com/extensions/pu … scripts.js
Line: 128

25

Re: [extension release] pun_quote 2.0.2

8k84 wrote:

bug: if selection includes a smiley, then whole message text is quoted rather than just the selection

When an image gets into selection, alt attribute of the image is added to the selected text. And when JS searches an entry of the selected text in a post, it will not find it, because within a post smiles are stored in BBCode. We will think about how to fix this.

rajuru wrote:

i get this js error when click Quick Quote link:

Error: pun_quote_authors is not defined
Source File: http://forum.projanmo.com/extensions/pu … scripts.js
Line: 128

Thanks for reporting, we will check it out.