permission to define visibility of annotation (only few changes needed)

olio - June 13, 2008 - 09:52
Project:Annotate
Version:5.x-1.2
Component:annotate (private)
Category:feature request
Priority:minor
Assigned:clemens.tolboom
Status:closed
Description

Hi Clemens,

I made a few changes to your module in order to hide the visibility settings of the annotation form from users that don't have the right permission.
Reason: I only wanted on small and simple field for annotation entry like the one on XING.
Anyway, if you find it useful, it would be cool if I could convince you to integrate it in the official version... :o)

Only three lines would have to be changed (sorry for not comitting a patch - upto now, I don't know how to handle this cvs thing... I promise to get involved into it as soon as I can.):

line 21 (define another constant):
define( ANNOTATE_SET_ANNOTATION_VISIBILITY, 'set annotation visibility');

line 105 (define additional permission):
return array( ANNOTATE_CREATE_ANNOTATION, ANNOTATE_READ_PUBLISHED_ANNOTATION, ANNOTATE_SET_ANNOTATION_VISIBILITY);

line 213 (check for user permission):
if(user_access(ANNOTATE_SET_ANNOTATION_VISIBILITY)){ ...}

That's all.
Thanks,
oli

#1

clemens.tolboom - June 14, 2008 - 20:09
Assigned to:Anonymous» clemens.tolboom

Great suggestion. But what is XING?

For creating patches you don't need CVS if you have the diff command installed (linux, mac?,bsd,cygwin). See http://drupal.org/patch.

I don't need one for this ... the lines are typed ok ;-)

#2

olio - June 14, 2008 - 20:49

Thanks :o)

I didn't knew that, I really should have a look at this link on drupal.org. I have a mac, and I succeeded to run subversion with svnx (a GUI for subversion). There's even a menu entry 'diff' that I always use before committing changes to the repository. But I haven't got a clue (obviously... ;o) ) about what's happening behind.

You asked what XING is: It's a business community portal ( www.xing.com ), the same kind as 'linkedin' (www.linkedin.com). People can publish their profile there and allows all kind of networking. The idea behind this is "No two people are more than six degrees apart." And on these profile pages you find such an annotation field ('Memo', see on attached image). It's simple and clean, and fits easily in the top/ summary part of the profile page.

Thanks for your help!

AttachmentSize
Profile_with_annotation_field_XING.zip 24.27 KB

#3

clemens.tolboom - August 8, 2008 - 11:21
Version:5.x-1.1» 5.x-1.2
Status:active» fixed

#4

clemens.tolboom - August 8, 2008 - 12:55
Status:fixed» closed
 
 

Drupal is a registered trademark of Dries Buytaert.