Private Profile Notes


(Benjamin Kampmann) #1

As described here already, I created a little plugin to easily store and retrieve private notes on a per-profile system. Let me show it to you in action:

With add open:

And after posting a private note to self:

staff-shared notes

Aside from private notes only for oneself, staff members can also tick a check-box to put the note into the shared “staff”-bucket. Those notes then show up for all staff members, like the following:

You can find the [plugin on github][1]. Here are the install instructions from the Readme:

README

This simple plugin adds private profile notes functionality to the discourse forum system.

Details

This neat little plugin adds the possibility for any user to leave private, personal notes on another persons profile allowing them to read them later. Only the user, who created the note can view them.

On top, Staff can decide to share the note with the rest of staff. In which case other staff will see what that person noted on it. This works on a per-note-bases and doesn’t inhibit any staff person to still have their own personal notes.

Installation

Just two easy steps. From your main discourse do:

cd plugins
git clone https://github.com/ligthyear/discourse-plugin-profile-notes.git   # clone the repo here
cd ..
RAILS_ENV=production rake assets:precompile 

Then restart your discourse and enjoy the fun on ever /user/*/activity-page.

Changelog:

  • 2014-02-18
    • way improved UI. If you had a version before this one run in development, make sure to clear your cache (rm -rf DISCOURSE/tmp/cache/*)
    • Bugfix: as staff all notes were shared with staff. Now only when actually selected.
  • 2014-02-17
    • initial version

TODO:

(in order of importance)

  • Notes can’t be deleted atm
  • Notes should support markdown, too

Authors:

Benjamin Kampmann <me @ create-build-execute . com>

License (BSD):

Copyright © 2014, Benjamin Kampmann
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  1. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
[1]: GitHub - gnunicorn/discourse-plugin-profile-notes: add and share notes on profile pages of discourse instances


Profile Comments
Display name(s) other than username?
A stack of internal comments for users - would cover lots of use-cases
(Mittineague) #2

Sorry to bump, but I thought others might be interested in alternate styling. I’ve added these CSS rules to a userscript and they work for me. YMMV

div[class="note staff"] {
 white-space: pre;
 overflow: auto;
 max-height: 300px;
 }
div[class="note staff"] p {
 margin: 0;
 }
div[class="note staff"] span.timestamp {
 float: left;
 margin: 0 1em 0 0;
 }
div[class="note staff"] span.shared {
 float: left;
 margin: 0 1em 0 0;
 }
div[class="note staff"] button[class="btn edit-note"] {
 float: left;
 margin: 0;
 }

#3

Hey @lightyear
We use this plugin extensively (thanks), but unfortunately it no longer works since the latest upgrade (I believe it may be related to Ember changes).

Do you have any plans to fix it?


(Benjamin Kampmann) #4

what exactly is broken? I don’t have it running on latest DC at the moment, so I can’t tell.

Of course I try to fix things fast, but as things change fast between releases, I found it too hard to keep up with that – especially when trying to keep it backwards-compatible. Therefore I advise anyone running plugins to only run on stable and wait a week or two before upgrading so we had time finding bugs and properly fix them for that release.


#5

Hearing you on that!

We’re currently holding off upgrading to production until we get this sorted.

I’ll defer to @santouras for specifics on what’s not working.


(Sam Saffron) #6

@santouras I have seen this working at sitepoint. Are you using the official release of a fork?


(cpradio) #7

Fairly certain it is a fork, and we combine these two plugins


Edit: Just realized I could verify this by viewing


(Scott Trager) #8

Has this been merged into the main branch yet? If not, which one of those is the working fork?


(cpradio) #9

What I linked to is working. I don’t think it has made its way into Core yet though.


(Scott Trager) #10

So just add both those gits to the app.yml?


(cpradio) #11

Sounds about right. The second one is for when viewing a PM you can press a Save button to save the original post in the PM to a User Note. So it isn’t a requirement to have.


(Michael - DiscourseHosting.com) #12

Is this plugin still working for people?

Asset precompilation yields

. Compiler said: Error: Closing tag `input` (on line 10) did not match last open tag `label` (on line 10).
  (in /var/www/discourse/plugins/discourse-plugin-profile-notes/assets/javascripts/discourse/templates/profile_notes.js.handlebars)/var/www/discourse/vendor/bundle/ruby/2.2.0/gems/barber-0.9.0/lib/barber/precompiler.rb:25:in `rescue in compile'
/var/www/discourse/vendor/bundle/ruby/2.2.0/gems/barber-0.9.0/lib/barber/precompiler.rb:23:in `compile'
/var/www/discourse/vendor/bundle/ruby/2.2.0/gems/barber-0.9.0/lib/barber/precompiler.rb:8:in `compile'
/var/www/discourse/vendor/bundle/ruby/2.2.0/gems/ember-handlebars-template-0.1.5/lib/ember/handlebars/helper.rb:67:in `precompile_ember_handlebars'
/var/www/discourse/vendor/bundle/ruby/2.2.0/gems/ember-handlebars-template-0.1.5/lib/ember/handlebars/templates/sprockets2.rb:42:in `evaluate'
/var/www/discourse/vendor/bundle/ruby/2.2.0/gems/tilt-1.4.1/lib/tilt/template.rb:103:in `render'

(cpradio) #13

Were not on latest, so my guess is it is broken due to the plugin API changes and countless other changes to Discourse over the past several months. :frowning:


(Michael - DiscourseHosting.com) #14

I forgot to mention: I tested the above on 1.4.x, so that’s fairly old already.


(cpradio) #15

Okay, with that in mind, you may want to look at

I can’t promise it doesn’t have some Sitepoint Customizations, but I know we forked it a long time ago to fix a few random issues.


(Jeff Atwood) #16

@eviltrout built an alternate plugin that fills the same role. I suggest we create a topic for the new user staff notes plugin and remove this topic, Robin?


(cpradio) #17

Can he also try and cover if there is any way to migrate the data from this plugin to the one he made (and what, if any differences are between the two)? As moving to this may help us migrate to latest if we didn’t have to spend hours updating our forked version.


(Jeff Atwood) #18

Unlikely as the plugin is substantially different in architecture.


(Robin Ward) #19

Here’s the new topic with for the Staff Notes plugin.

I am not sure if we should delete this one as it has functionality that the Staff Notes does not. In particular it is not restricted to staff like the official plugin is.

In terms of migration @cpradio that might be impossible unless you just want to migrate the staff notes. If that’s the case maybe I can help you with a SQL query to do it.


(cpradio) #20

That would be of the most concern to us (that staff can see what we used in our prior plugin). But we’ll cross that bridge when we get there. I’ll at least let the powers that be know there could be a way for us to clean up some of the plugins we utilize to lessen our own dev requirements.

Thanks!