Roundcube Community Forum

Third Party Contributions => API Based Plugins => Topic started by: rosali on February 06, 2010, 02:10:27 AM

Title: Sticky Notes Plugin
Post by: rosali on February 06, 2010, 02:10:27 AM
There were some requests for Sticky Notes plugin from Squirrelmail users.

I have coded the framework (attached).

I need some help from the professional to get it perfect:

/**
 *
 *  ToDo: Switch button if $count > 0 (need notes button merged with a red exclamation mark)
 *        Limit amount of notes (has to be done in the jquery stuff)
 *        Min width/height when resizing a note (has to be done in the jquery stuff)
 *        More appropriate background than this ugly wooden wallpaper
 *
 **/

Notice: There are two plugins attached (sticky_notes and jquery plugin)!
Title: Sticky Notes Plugin
Post by: rosali on February 06, 2010, 02:33:01 AM
Forgot to mention:

Please remove:   public $task = "dummy";

Forgot to do that (it is debugging code).
Title: Sticky Notes Plugin
Post by: rosali on February 06, 2010, 04:04:55 AM
A question for the professionals ...

Are there any concerns to have a tag for stylesheets in the body section instead of the head?

The background of this question is that I plan to implement some template_object_... hooks in the jquery plugin to get f.e. the datepicker with a template_object instead of having all the stuff in the skin template.
Title: Sticky Notes Plugin
Post by: SKaero on February 08, 2010, 02:51:13 AM
The tag should only go it the header the html won't validate in the body, It may not work in all browser because of that. I'd recommend trying to get it in the header but if you can't try it in the body and see if it works. Nice plugin, can you make the sticky note change color?
Title: Sticky Notes Plugin
Post by: rosali on February 08, 2010, 03:12:19 AM
Thanks skaero,

I saw here jQuery Sticky Notes Plugin (http://www.jquery-sticky-notes.com/) that it might be also ok in the body section.

Could you please be more detailed what you expect by "change color". Currently it is using a background image. So, I would need new images and I'm not really skilled in image designing.
Title: Sticky Notes Plugin
Post by: SKaero on February 08, 2010, 03:22:48 AM
I was think of option to change the sticky color so I could have a blue, green, yellow, etc. colored sticky to categorize notes.
Title: Sticky Notes Plugin
Post by: doctor madness on February 09, 2010, 02:26:47 AM
Hi,

I was ready to learn php just to try to make this plugin ;)
So, I get the archive, i unzipped it, stored both directory (sticky_notes and jquery) in plugins directory,added 'sticky_notes' to my plugins list, but then nothing happened, no "notes" or similar appears. How may I use this pluging ?
Title: Sticky Notes Plugin
Post by: SKaero on February 09, 2010, 02:56:04 AM
In the sticky_notes.php remove the line:
Code: [Select]
public $task = "dummy";its on line 34.
Title: Sticky Notes Plugin
Post by: dinhnguunguyen on February 09, 2010, 03:17:19 AM
When I add sticky notes:
1. Roundcube load incorrect in IE (layout is broken and IE diplay error: Webpage error details

Message: Invalid argument.
Line: 88
Char: 9
Code: 0
URI: http://...../skins/default/splitter.js?s=1265005198)
2. Repeat message: Server Error (Ok)
Please help me!
Title: Sticky Notes Plugin
Post by: SKaero on February 09, 2010, 03:28:27 AM
Is there anything in your error logs.
Title: Sticky Notes Plugin
Post by: rosali on February 09, 2010, 04:58:50 AM
@ doctor madness,

you have to register both, sticky_notes and jquery. Also remove the dummy task in sticky_notes.php as skaero adviced above.
Title: Sticky Notes Plugin
Post by: doctor madness on February 09, 2010, 08:46:45 AM
Hi,

1st of all, I have to admit I forgot to comment the
public $task = "dummy";
So i did it, and I've the notes icon, and when I click on it, i've a wonderful wood paper, and a note. but it's impossible to do anything else than writing in this note. I can't save (there are no button) nor move it.
In the error log file from roundcube, nothing about this problem.
In the error console in FF :
Erreur : _div_wrap.resizable is not a function
Fichier Source : http://my_ip/plugins/sticky_notes/skins/default/jquery.stickynotes.js?s=1265715383
Ligne : 78
and many others
Title: Sticky Notes Plugin
Post by: SKaero on February 09, 2010, 09:16:17 AM
Did you run the SQL in SQL/mysql.sql?
Title: Sticky Notes Plugin
Post by: doctor madness on February 10, 2010, 02:40:14 AM
Yes, I run the SQL script, the "notes" tables has been created.
Title: Author of jquery sticky notes plugin
Post by: danielnowak on February 15, 2010, 07:42:45 AM
Hello,

i am the author of the above mentioned jquery sticky notes plugin and in the company i am working for we are using roundcube. So if you need any help do not hesitate to ask me. the mail group for these kind of issues can be found here: jQuery Sticky Notes | Google Groups (http://groups.google.com/group/jquery-sticky-notes)
Title: Sticky Notes Plugin
Post by: doctor madness on February 15, 2010, 08:24:47 AM
hi,

I followed the instruction in the jquery readme, telling me to NOT register this plugin. As Rosali said, I added the jquery to the module list in main.inc.php, and it works !

Just a detail, I move the notes around the "wonderfull" wood background. When I leave and come back to notes, the notes are all stacked on each others, and no position nor dimensions. This behaviour is really annoying.
Title: Sticky Notes Plugin
Post by: rosali on February 15, 2010, 10:58:19 AM
@doctor madness:
jquery plugin has been re-designed and must be registered now. If positions/dimensions are not save there either something wrong with the database installation or it is a browser issue (which browser do you use?).

@danielnovak:
Do you want to take the plugin? Please feel free to improve it. I think about limits for resizing (f.e. 50 x 50), categories (different colors for different categories) and a better fitting background image.
Title: Sticky Notes Plugin
Post by: doctor madness on February 15, 2010, 05:35:23 PM
the "notes" table seems to be correct, every details is described and modified when I move my notes (width | height | pos_x | pos_y)
so I think my browser is involved. I'm running firefox 3.6 on a linux debian squeeze and on a windows XP SP2.

On Opera on debian squeeze, everything is fine
I'll test on IE tomorrow
Title: Sticky Notes Plugin
Post by: doctor madness on February 16, 2010, 05:10:24 AM
It's okay on IE6, okay with Opera on linux, and NOK with FF 3.6 on Windows & Linux
Title: Sticky Notes Plugin
Post by: rosali on February 17, 2010, 12:42:03 PM
Check this version ... FF bug should be fixed.
Title: Sticky Notes Plugin
Post by: doctor madness on February 19, 2010, 05:22:29 AM
This version is OK on FF (both linux & windows)

here is a french translation for sticky notes :
Title: Sticky Notes Plugin
Post by: olesj on April 22, 2010, 02:39:47 AM
Quote from: doctor madness;25394
Yes, I run the SQL script, the "notes" tables has been created.


For a newbie what is the procedure to run this script.
I already have a MySql running and has also created various databases I have not tried setting up tables in??

I'm using "MySQL Workbench" for database handling .
Title: Sticky Notes Plugin
Post by: rosali on April 22, 2010, 04:13:15 AM
It's very easy by using PHPMyAdmin. This is a PHP based administration interface for MySQL. Google is your friend.
Title: Sticky Notes Plugin
Post by: henrikp on April 29, 2010, 09:52:27 AM
Reporting the same problem with the javascript script, plugin isn't working in 0.4-beta, don't know if older versions are affected - haven't tried it.
Title: Sticky Notes Plugin
Post by: rosali on April 29, 2010, 10:02:40 AM
Works for me on 0.4-beta. "Is not working" is a really poor discription of the problem you experience.
Title: Sticky Notes Plugin
Post by: henrikp on April 29, 2010, 10:21:18 AM
Seems I'm having troubles of finding the start and end of threads...anyways, the problem was that I needed to include 'jquery' to the plugins list, what was not needed according to plugins/jquery/README, perhaps a little update to that file in order to stop blind people (pointing at myself here) reporting these small annoyances? I will try to read the threads more attentively next time :)
Title: Sticky Notes Plugin
Post by: rosali on April 30, 2010, 01:05:58 AM
Thanks for your translations. I will update the mis-leading README. Sorry!

I also appreciate contributions for documentation.
Title: Cannot save sticky notes
Post by: SleepyJohn on August 25, 2010, 08:05:49 PM
Hi rosali, I installed the sticky notes plugin the other day and it seems to work.  However, when I close and reopen the page the yellow notes are still there but all the writing on them has gone.  I cannot find any relevant errors in the log.  Any idea what could be wrong?  I do have the notes table in the database.
Title: Sticky Notes Plugin
Post by: rosali on August 26, 2010, 03:57:57 AM
I see that the plugin is buggy with v0.4. I will have a look when back from vacations in 10 days.
Title: Have a good holiday
Post by: SleepyJohn on August 26, 2010, 07:10:44 AM
Thanks rosali and have a good holiday
Title: Sticky Notes Plugin
Post by: rosali on September 13, 2010, 12:23:07 AM
Please check new release.
Title: Sticky Notes Plugin
Post by: jriera on September 22, 2010, 06:06:25 PM
New background: http://mail.lere.org/plugins/sticky_notes/skins/default/images/bg_notes.jpg

New icon: http://mail.lere.org/plugins/sticky_notes/skins/default/sticky_notes.png

It's very good. I hope you enjoy it.
Title: Store Notes as IMAP Messages
Post by: dahepe on November 11, 2010, 08:34:11 AM
Hi,

I really like the idea of storing notes together with mails on an IMAP server to make them accessible from everywhere. And thus your plugin seemed to be what was looking for. But as far as I understood the notes are stored in a separate table and not as messages on the IMAP server (Is this correct?).

For me this has several drawbacks as one always has to use the roundcube frontend to view and edit the notes. The notes are not accessible by other applications.

Did you already think of storing the notes as IMAP messages in a special Notes-Folder. Apple's notes App does so and creates Messages like the one below for each note in a folder called "Notes":

Code: [Select]
Subject: Test Note
From: &quot;Daniel XXXXX&quot; <daniel@XXXXX.XX>
X-Universally-Unique-Identifier: 34402265-14EE-4B2F-A7DC-F71C178B1268
Content-Type: text/html;
charset=utf-8
X-Uniform-Type-Identifier: com.apple.mail-note
Message-Id: <C9A1E495-561C-4B58-8846-A3B192EF92D5@XXXXX.XX>
Date: Thu, 11 Nov 2010 14:15:00 +0100
X-Mail-Created-Date: Thu, 11 Nov 2010 14:15:00 +0100
Content-Transfer-Encoding: 7bit
Mime-Version: 1.0 (iPhone Mail 8B117)

Test Note


I know "Only because Apple does something this must not be good". But this has the advantage that the notes are available in every mail application and not only in roundcube. And I don't see any real drawbacks...

Best regards,
Daniel.
Title: Sticky Notes Plugin
Post by: rosali on November 12, 2010, 06:20:15 AM
I can't do that. We need note id, note position x and note position y. I could add this as Xtra headers if the note is created by Roundcube. Notes created by Apple do not have this informations. So, they can't be processed by Roundcube.
Title: Sticky Notes Plugin
Post by: dahepe on November 12, 2010, 06:33:01 AM
Quote from: rosali;31233
I can't do that. We need note id, note position x and note position y. I could add this as Xtra headers if the note is created by Roundcube. Notes created by Apple do not have this informations. So, they can't be processed by Roundcube.


I already imagined that this would be problematic. Perhaps one could use Xtra-Tags for the position as you mentioned and display notes without a position tag on a default location. Like newly created notes. If one creates multiple notes with another application, one would have to arrange these notes but this should not be too inconvenient I think...

Regarding the ID, I think the used UUID in the X-Universally-Unique-Identifier header would make a pretty good ID :-) Of course it is not compatible with the currently used note-ID

Best regards