Author Topic: Plugin for sig-above-reply option?  (Read 20805 times)

Offline ABerglund

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 673
Plugin for sig-above-reply option?
« on: August 13, 2009, 05:50:48 PM »
I'm hoping not to get into the top-post/bottom-post debate here. But I was wondering if anyone was working on an API plugin for 0.3 to allow a user to select signatures above or below the reply? Like it or not, many people do top post, and having this as a user-selectable option is probably the last barrier for our organization to use Roundcube to replace squirrelmail.
Arne Berglund
SysAdmin, Internet Services
Lane Education Service District
Eugene, OR, USA

Offline techdude

  • Jr. Member
  • **
  • Posts: 38
Plugin for sig-above-reply option?
« Reply #1 on: August 13, 2009, 07:43:34 PM »
I would definately be interested in seeing this.

Offline ABerglund

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 673
Plugin for sig-above-reply option?
« Reply #2 on: September 04, 2009, 11:15:04 PM »
Now that 0.3 has gone Stable, I'm hoping that someone looks into this, as I don't think I have the PHP or js skills to pull it off myself.
Arne Berglund
SysAdmin, Internet Services
Lane Education Service District
Eugene, OR, USA

Offline ABerglund

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 673
Plugin for sig-above-reply option?
« Reply #3 on: September 10, 2009, 01:33:57 PM »
A perhaps simpler option might be to develop a plugin to add a button that inserts the signature where the cursor is at that time. People could post at the top or the bottom and then insert the signature as appropriate.
Arne Berglund
SysAdmin, Internet Services
Lane Education Service District
Eugene, OR, USA

Offline xrxca

  • Jr. Member
  • **
  • Posts: 22
Plugin for sig-above-reply option?
« Reply #4 on: September 17, 2009, 07:04:36 PM »
This may be possible but not easy with the existing hooks, I did a few trials with the message_compose hook, but it becomes overly complicated because the message body hasn't been created at this point so the plugin would have to duplicate all that other work...

It's pretty easy to override some of the options, but not all, for instance with
the current hook you can't seem change the subject on a reply, only on a new message...

Offline ABerglund

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 673
Plugin for sig-above-reply option?
« Reply #5 on: September 17, 2009, 07:56:04 PM »
Yeah, after I thought about it some, the button solution looks to be much harder to pull off than simply adding a choice of where the signature is placed when the compose window is first populated.
Arne Berglund
SysAdmin, Internet Services
Lane Education Service District
Eugene, OR, USA

Offline Julius Caesar

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 498
    • http://www.de-keizer.net/
Plugin for sig-above-reply option?
« Reply #6 on: September 18, 2009, 03:04:22 AM »
Just a note for the one who is gonna develop it.

Make sure that the separator
Code: [Select]
[B]-- [/B] is not included when adding the signature is another place than bottom. Well configured mail programs will snip the separator and everything below it.
Julius Caesar

You can download the Groupvice4 theme here.
Sie können Groupvice4 hier he

Offline ABerglund

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 673
Plugin for sig-above-reply option?
« Reply #7 on: September 18, 2009, 11:30:33 AM »
Quote from: Julius Caesar;21439
Just a note for the one who is gonna develop it.

Make sure that the separator
Code: [Select]
[B]-- [/B] is not included when adding the signature is another place than bottom. Well configured mail programs will snip the separator and everything below it.
Good reminder. That was one of the things that people forgot in the v0.2 hacks for moving the signature.

Another thing to consider is that if the signature is inserted above the reply, there needs to be a empty line in HTML messages that is before the
Code: [Select]
 tag so that word wrap and other formatting works properly.

Sad fact is I know exactly what our organization needs on this, but I doubt I have the skills do pull it off myself.
« Last Edit: September 19, 2009, 12:05:16 AM by ABerglund »
Arne Berglund
SysAdmin, Internet Services
Lane Education Service District
Eugene, OR, USA

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,845
Plugin for sig-above-reply option?
« Reply #8 on: October 10, 2009, 11:49:10 AM »
would some one who uses this feature mind testing the patch in this mailing list post? I had a quick look but I dont belive it is possible to do this via a plugin, it requries changes in places not controled by hooks.

RoundCube Mailing Lists

It requires the lastest SVN version of RoundCube (patch built against rev 3030) It will not work with 0.3 stable.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…

Offline ABerglund

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 673
Plugin for sig-above-reply option?
« Reply #9 on: October 10, 2009, 12:34:37 PM »
Quote from: JohnDoh;22008
would some one who uses this feature mind testing the patch in this mailing list post? I had a quick look but I dont belive it is possible to do this via a plugin, it requries changes in places not controled by hooks.

RoundCube Mailing Lists

It requires the lastest SVN version of RoundCube (patch built against rev 3030) It will not work with 0.3 stable.
Phil, I'll be happy to test it, but I just left for a week of vacation and won't be able to look into this until I get back. Edit: I was wrong, see next post.
« Last Edit: October 12, 2009, 12:13:10 AM by ABerglund »
Arne Berglund
SysAdmin, Internet Services
Lane Education Service District
Eugene, OR, USA

Offline ABerglund

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 673
Plugin for sig-above-reply option?
« Reply #10 on: October 10, 2009, 08:30:15 PM »
Well, didn't make it out of town today after all, so I took a few minutes to pull down and set up a fresh copy of SVN 3031 and patched it.

Obviously, I'll want to do more testing over a longer period, but at first glance it looks like a really good start. In fact, the actual top posting part looks to be pretty solid. Much better than any of the hacks people did to v.0.2.

The "insert signature" part works, but looking at it as if I was one of my non-technical users, I see a couple of glitches.

One is that the "Insert" button looks available even when it's not. For example, if the signature is set to auto-insert (set to always, for example), the "insert" button correctly does nothing. But it is still visible, and is not grayed out. Ideally, the button would only be visible if the option was available, or at least grayed out.

But the larger issue is that if the users' pref is set to top post, clicking the "Insert" button inserts the sig at the very beginning of the message. This would be fine if the user clicked the button before beginning to compose. But if the user types in their message, and then clicks the button, the sig is inserted at the top, above the message the user just typed.

I strongly suspect that your average email user is going to expect that the "insert" button would insert the sig at the cursor position within the text editor box. And in hind sight, that probably isn't possible, as the insert routine needs to grab the contents of the text editor, add the sig and then reload it. (Or so it would seem to me.) If that truly is the case, I fear the "insert" button will cause confusion and frustration for normal users, and might be best abandoned.
Arne Berglund
SysAdmin, Internet Services
Lane Education Service District
Eugene, OR, USA

Offline ABerglund

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 673
Plugin for sig-above-reply option?
« Reply #11 on: October 19, 2009, 10:29:49 PM »
Used this patched version all day today, with nothing new to add from the previous comment. Other than the above noted behavior of the "Insert sig" button, I'm pretty pleased with how it works. And the rest of the options work well enough that the "Insert Sig" probably isn't needed anyway. Nice job!
« Last Edit: October 19, 2009, 10:39:43 PM by ABerglund »
Arne Berglund
SysAdmin, Internet Services
Lane Education Service District
Eugene, OR, USA

Offline epinter

  • Jr. Member
  • **
  • Posts: 10
Plugin for sig-above-reply option?
« Reply #12 on: October 22, 2009, 08:10:07 AM »

Offline ABerglund

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 673
Plugin for sig-above-reply option?
« Reply #13 on: October 27, 2009, 07:16:13 PM »
Well, a few of my team and myself have been using the first patch (the one that includes the Insert Sig button) in 3031 extensively since my original post. I do now believe that the Insert Sig button is not needed and probably confusing to average users. But we're very happy with how the top-post/bottom-post choices work in this patch.

From a backend perspective, I prefer solutions that do not require DB schema changes from the default, so I have not tested the other patch listed. That said, if it was incorporated into the release and the DB update became part of the default schema, that's OK too. I just don't want any patches or plugins that require my DB to be non-standard.
Arne Berglund
SysAdmin, Internet Services
Lane Education Service District
Eugene, OR, USA

Offline epinter

  • Jr. Member
  • **
  • Posts: 10
Plugin for sig-above-reply option?
« Reply #14 on: October 29, 2009, 06:26:33 AM »
I agree.

I'm testing internally before publish for my users (I'm a ISP). I'm waiting this patch or any other that provide the top-posting option to become official ... Many users are asking me.

I sent an email to Thomas, asking the possibility to become official. I don't have an answer yet.

If you want to test, the database change it's just 1 field added in identities table.

Quote from: ABerglund;22568
Well, a few of my team and myself have been using the first patch (the one that includes the Insert Sig button) in 3031 extensively since my original post. I do now believe that the Insert Sig button is not needed and probably confusing to average users. But we're very happy with how the top-post/bottom-post choices work in this patch.

From a backend perspective, I prefer solutions that do not require DB schema changes from the default, so I have not tested the other patch listed. That said, if it was incorporated into the release and the DB update became part of the default schema, that's OK too. I just don't want any patches or plugins that require my DB to be non-standard.