Rewrite the module

tobiasb - May 21, 2009 - 19:23
Project:User Comment
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:needs review
Description

the modul has many bugs, so I reviewed and solved this.

see the patch.

#1

tobiasb - May 21, 2009 - 19:24
AttachmentSize
usercomment_rewrite_469478.patch 30.1 KB

#2

tobiasb - May 22, 2009 - 11:04
Category:task» bug report
AttachmentSize
usercomment_rewrite_469478-1.patch 30.01 KB

#3

ianchan - May 25, 2009 - 17:47

Any chance you would consider backporting for Drupal 5.x? We really need a module like this.

#4

vertazzar - May 30, 2009 - 09:23

fix the module ffs :/ the current version doesn't works at all...

#5

tobiasb - May 30, 2009 - 09:34
Version:6.x-1.0-beta1» 6.x-1.x-dev

The Patch is for 6 dev.

#6

vertazzar - May 31, 2009 - 00:16

can you paste fixed code without - + i dont have command line and stuff :/

#7

tobiasb - May 31, 2009 - 08:08

ok,

AttachmentSize
usercomment-6.x-dev.zip 12.64 KB

#8

vertazzar - May 31, 2009 - 14:56

ok I'm gonna try it now,

#9

dicreat - June 7, 2009 - 16:48

On profile edit page users don't see 'Skip blog approvals' even this users have ability to create blog entry.
I think it’s because blog module use 'create blog entries' permission instead 'create blog content' and verification in usercomment.module at line 230 is never pass:
if (user_access('create '. $node->type .' content', $account)) {

I was change this line to:
if (user_access('create '. $node->type .' content', $account) || user_access('create '. $node->type .' entries', $account)) {
Its work for me, but I'm not sure that is the best solution.

#10

sandino - June 29, 2009 - 00:13

First, thanks to Razorraser for this very helpful module!

Also, thanks to dicreat for the patch - it works for me too!

#11

plan9 - June 29, 2009 - 10:45

Would be great to have a 5.x version

#12

vertazzar - June 29, 2009 - 12:40

yea the patch works perfectly, the module should be updated with this

#13

sandino - July 1, 2009 - 18:07

I just noticed that common registered users cannot post comments in forum without approval :(

#14

vertazzar - July 1, 2009 - 19:20

you need to check permissions.. you need to enable the permission who allows all users to post without approval,

#15

sandino - July 2, 2009 - 20:23

vertazzar, I have no such options in user profile on my site, except user #1

can anyone patch this like dicreat in #9 ?

#17

sandino - July 3, 2009 - 00:49

when I select this last checkbox for any role, even for administrator with all permissions I constantly get this message:

'An illegal choice has been detected. Please contact the site administrator.'

But thanks for taking attention!

#18

abaddon - August 7, 2009 - 22:38

sandino, see this fix for your error http://drupal.org/node/543276 .. i had it too, let me know how it works out

#19

tobiasb - August 8, 2009 - 16:59

Ok, a new version. Now it is works with forum/blog Module and I remove ' from the permission. Please use the update.php script.

1 patch for the beta,
1 patch for the dev version
and a patched version.

AttachmentSize
usercommentD6beta.patch 31.55 KB
usercommentD6dev.patch 31.55 KB
usercomment-6.x-dev.zip 12.64 KB

#20

vertazzar - August 8, 2009 - 19:17

thank you!

#21

SLUH - August 12, 2009 - 07:11

Razorraser, can you upload patched beta-version. And what is different dev from beta?

#22

tobiasb - August 12, 2009 - 08:45

You can use http://drupal.org/files/issues/usercomment-6.x-dev_0.zip.

You are right, there is no different.

but the updated date

dev:
Last updated: January 31, 2009 - 01:22
beta:
Last updated: May 15, 2009 - 17:21

and this
usercomment.module /* $Id: usercomment.module,v 1.5.2.6 2009/04/22 14:16:22 gwen Exp $ */

is in dev and beta. is this magic?

#23

SLUH - August 12, 2009 - 13:41

Another small question - is it possible to hide comment title? May it be a feature of next version of user comment?

#24

tobiasb - August 12, 2009 - 17:14

Not in the module. copy comment.tpl.php from modules/comment/comment.tpl.php and remove there the title.

#25

Brumisek - August 13, 2009 - 10:32

Hi, this module is great and EXACTLY what we need. But for 5.x please too!!!

#26

tobiasb - August 13, 2009 - 14:22

#27

Igal - October 29, 2009 - 08:34

I give permission to node owner to delete comments and it is works, but the site admin(uid 1) don't have a permission to delete the comment.
I receive this error message:
Access denied
You are not authorized to access this page.

Edit:
After checking the module code it is clear now. The function usercomment_access_check() return FALSE for admin because he have 'administer comments' permission and can use the regular delete link

#28

Deciphered - November 4, 2009 - 03:55

tobiasb,

Due to the fact that the module developer doesn't appear to have any love for this module, and you have done such great work here, have you considered appealing to become the maintainer?

The process is simple, and documented here: http://drupal.org/node/251466

Let me know if you have any thoughts or need any help.

Cheers,
Deciphered.

#29

resynthesize - November 7, 2009 - 17:02

Subscribing

#30

vertazzar - November 8, 2009 - 07:54

I'm using this module for long time, and it is really useful for community-type websites

#31

DrakeRemory - November 10, 2009 - 20:06

I did some more rewrite. I used hook_menu_alter to change the access callback for comment/delete. This way we don't have the additional path usercomment/delete. I also changed usercomment/approve to comment/approve.

AttachmentSize
usercomment.zip 17.67 KB
 
 

Drupal is a registered trademark of Dries Buytaert.