With Hidden Author module you can post anymous nodes by having the right permissions. Once you post anonymously other users may not see your ursername because of this awesome module.
Imagine that you are very popular in a Forum XYZ. And you've just seen a movie that you didn't like and you want to create a forum topic cursing about that movie. But you do not want that other users see your posts. But if anonymizer module is enabled and the proper permissions are configured correctly, you may check a button which says "Post anonymously". And you will see that your post is anonymous. And people will not see your username in forum topic.

Core: Drupal 7
Project Page: http://drupal.org/sandbox/edutrul/1623422
Git: git clone http://git.drupal.org/sandbox/edutrul/1623422.git hidden_author

Manual reviews of other projects:
none yet.

Comments

develcuy’s picture

Project: Drupal.org security advisory coverage applications » Hidden author (anonymizer)
Version: » 6.x-2.x-dev
Component: module » Code

This module conflicts with Hidden Author because they use the same namespace in the source code.

I'm moving this issue to the queue of that module, need feedback from @RoboPhred.

edutrul’s picture

Yeah It would be awesome, but I still waiting for @RoboPhred's answer. Look at this issue http://drupal.org/node/1613372.

develcuy’s picture

Status: Needs review » Needs work

Just remembered that @edutrul has tried to reach @RoboPhred 2 months ago: #1613372: I have created a sandbox for anonymizer module.

@edutrul, please rename your module so it uses a different namespace, perhaps to "hidden_author"?

develcuy’s picture

Project: Hidden author (anonymizer) » Drupal.org security advisory coverage applications
Version: 6.x-2.x-dev »
Component: Code » module
edutrul’s picture

Sounds great. I will change it.

edutrul’s picture

@develcuy I have changed the anonymizer module's name to hidden_author.

develcuy’s picture

@edutrul, check the coding standards using the module coder, and also make sure to document the functions along with its parameters using doxygen.

cordoval’s picture

Assigned: Unassigned » cordoval
Priority: Normal » Critical
Status: Needs work » Patch (to be ported)
StatusFileSize
new560 bytes

just a simple refactor to show phpperu community contributing to this great module with @edutrul 's help

we will post the video of this session at http://www.craftitonline.com/2012/09/phpperu-drupal-module-pair-programm...

you guys rock

klausi’s picture

Title: Anonymizer module » Post anonymously
Priority: Critical » Normal
Status: Patch (to be ported) » Needs work

Please post patches directly to the issue queue of the module. Not critical yet, see http://drupal.org/node/539608

@edutrul: please get a review bonus first. Then try to fix issues raised by automated review tools: http://ventral.org/pareview/httpgitdrupalorgsandboxedutrul1623422git

edutrul’s picture

I have fixed the issues that ventral raised and merge the changes that cordoval mentioned.
http://ventral.org/pareview/httpgitdrupalorgsandboxedutrul1623422git-7x-1x
Blessings

edutrul’s picture

Status: Needs work » Needs review
pere orga’s picture

hidden_author.admin.inc:
IMHO the function hidden_author_get_content_type() should be renamed to hidden_author_get_content_types()
#title and #description should be better written. Also, the description should end with a dot.

hidden_author.info:
description has quotes. They are not needed for single line values.

hidden_author.install:
In line 12 you should use the full name of the module, 'Hidden Author' instead of 'hidden_author'.

hidden_author.module:
I don't think you need to check the existence of README.txt. If you check it, you could print a message like "README.txt file not found" if the file is not found.
lines 142, 143, 161, 183, 184, 192: You should use the full name of the module, 'Hidden Author' instead of 'hidden_author' or 'hidden author'.

README.txt:
Please use the full name of the module everywhere.

pere orga’s picture

Status: Needs review » Needs work
edutrul’s picture

Status: Needs work » Needs review

Thanks netol

I have made thoses changes that you mentioned.
Best Regards

gnucifer’s picture

Status: Needs review » Needs work

Sorry, but I think the implementation is fundamentally flawed. To rely on preprocessors and theme-functions to hide the content author is fragile, besides it does not work when displaying content with other modules like views, solr etc. Besides, a view with an content author exposed filter could easily reveal the real author.

My suggestion would be to really set the author of the node to "anonymous", and use http://api.drupal.org/api/drupal/modules!node!node.api.php/function/hook... to provide the actual author access. This should (hopefully) work, and is a much more robust and secure solution.

edutrul’s picture

Thanks for your feedback.

I will evaluate it!

gnucifer’s picture

Sounds good! Feel free to ask if you're having troubles.

klausi’s picture

Status: Needs work » Closed (won't fix)

Closing due to lack of activity. Feel free to reopen if you are still working on this application.

If you reopen this please keep in mind that we are currently quite busy with all the project applications and I can only review projects with a review bonus. Please help me reviewing and I'll take a look at your project right away :-)

edutrul’s picture

Assigned: cordoval » edutrul
Status: Closed (won't fix) » Needs review
Issue tags: +dlatino

We fixed hidden author implementation with @develCuy and @langelhc
Please check this out

likebtn’s picture

Consider justifying tabs and indent in order to keep code well formatted. For example, in hidden_author.module on line 18:

      $form['anonymous'] = array(
        '#type' => 'checkbox',
        '#title' => t('Post anonymously'),
        '#weight' => $weight,
        '#default_value' => hidden_author_get_author_id('node', $form['#node']) ? TRUE : FALSE,
      );

change to:

      $form['anonymous'] = array(
        '#type'          => 'checkbox',
        '#title'         => t('Post anonymously'),
        '#weight'        => $weight,
        '#default_value' => hidden_author_get_author_id('node', $form['#node']) ? TRUE : FALSE,
      );
edutrul’s picture

Hi likebtn,

Thanks for the reply!

But I guided from the array example in drupal coding standards

Note that if the line declaring an array spans longer than 80 characters (often the case with form and menu declarations), each element should be broken into its own line, and indented one level:

<?php
$form['title'] = array(
  '#type' => 'textfield',
  '#title' => t('Title'),
  '#size' => 60,
  '#maxlength' => 128,
  '#description' => t('The title of your node.'),
);
?>

Note the comma at the end of the last array element; This is not a typo! It helps prevent parsing errors if another element is placed at the end of the list later.

Check array section

http://drupal.org/coding-standards

Again thanks!

edutrul’s picture

Issue summary: View changes

Change project title

drebroff’s picture

Status: Needs review » Needs work

Hello,

Code standards seems ok.
But I have a problem with code execution.
PHP Fatal error: Call to undefined function lfp() in /var/lib/openshift/515701765004461345000098/app-root/data/sites/all/modules/for_review/hidden_author/hidden_author.module on line 114

What is that function lfp()? Where did you get it? It is not in php, drupal or defined in your module code.

Thats it. Thank you.

edutrul’s picture

Title: Post anonymously » Hidden Author
Status: Needs work » Needs review

Thanks @aliaric

Deleted debugging function. That function was for debugging purpose, which comes in this module http://drupal.org/project/lgp

Your testing helped me (Y) good job.

Greetings

PA robot’s picture

Status: Needs review » Closed (duplicate)
Multiple Applications
It appears that there have been multiple project applications opened under your username:

Project 1: http://drupal.org/node/1983706

Project 2: http://drupal.org/node/1751752

As successful completion of the project application process results in the applicant being granted the 'Create Full Projects' permission, there is no need to take multiple applications through the process. Once the first application has been successfully approved, then the applicant can promote other projects without review. Because of this, posting multiple applications is not necessary, and results in additional workload for reviewers ... which in turn results in longer wait times for everyone in the queue. With this in mind, your secondary applications have been marked as 'closed(duplicate)', with only one application left open (chosen at random).

If you prefer that we proceed through this review process with a different application than the one which was left open, then feel free to close the 'open' application as a duplicate, and re-open one of the project applications which had been closed.

I'm a robot and this is an automated message from Project Applications Scraper.

edutrul’s picture

Status: Closed (duplicate) » Needs review

Ok PA robot

I've changed status of single user mode module to closed(as duplicate) -> http://drupal.org/node/1983706#comment-7369826

Changed hidden author module status to needs review.

edutrul’s picture

Title: Hidden Author » [D7] Hidden Author
edutrul’s picture

Issue summary: View changes

Updated issue summary.

edutrul’s picture

Issue summary: View changes

Added Review Bonus

klausi’s picture

I removed the review links from the issue summary, they did not contain any review? Make sure to read through the source code of other projects and read http://drupal.org/node/1975228 again.

And don't forget to add the "PAReview: review bonus" tag as indicated in http://drupal.org/node/1975228 once you did actual reviews, otherwise you won't show up on my high priority list.

erez111’s picture

Status: Needs review » Needs work

Hi,

Here are few comments:

.module -
1. At hook_menu(), you can remove property "file path", since it is the default file path.
2. Callback functions should be in a different file.
3. You execute manually, hook functions. Although, those are functions, I think you shouldn't call hook functions manually, but to call a third function from both your function and your hook function.

edutrul’s picture

Hi buddies,

Ok klausi, I'll do it.
Thanks :)
--

erez111:

Cool feedback, here's my response:

1. At hook_menu(), you can remove property "file path", since it is the default file path.

Yeah, you are right(already pushed). hook_menu: "file path": The path to the directory containing the file specified in "file". This defaults to the path to the module implementing the hook.

2. Callback functions should be in a different file.

I only have a pair of callbacks.

3. You execute manually, hook functions. Although, those are functions, I think you shouldn't call hook functions manually, but to call a third function from both your function and your hook function.

That'd be great but I did this since I wanted to reuse. Is there a drupal Page that says something about no to call hooks as function? if so, please let me know.

Thanks for your feedback

edutrul’s picture

Status: Needs work » Needs review

Hi buddies,

Ok klausi, I'll do it.
Thanks :)
--

erez111:

Cool feedback, here's my response:

1. At hook_menu(), you can remove property "file path", since it is the default file path.

Yeah, you are right(already pushed). hook_menu: "file path": The path to the directory containing the file specified in "file". This defaults to the path to the module implementing the hook.

2. Callback functions should be in a different file.

I only have a pair of callbacks.

3. You execute manually, hook functions. Although, those are functions, I think you shouldn't call hook functions manually, but to call a third function from both your function and your hook function.

That'd be great but I did this since I wanted to reuse. Is there a drupal Page that says something about no to call hooks as function? if so, please let me know.

Thanks for your feedback

pagolo’s picture

Hi edutrul,
I reviewed your module. It seems to work fine, but I noticed that the preview page should be more realistic. Now it follows the current database configuration, not the user input. In other words, if I edit a node that isn't anonymized, when I click "preview", I see the username, also if "Post anonymously" checkbox is selected.

Cheers

seworthi’s picture

StatusFileSize
new1.37 KB

It appears you are working in the "master" branch in git. You should really be working in a version specific branch. The most direct documentation on this is Moving from a master branch to a version branch. For additional resources please see the documentation about release naming conventions and creating a branch in git.

An automated review of your project has found some issues with your code; As coding standards make sure projects are coded in a consistent style we please you to have a look at the report and try to fix them. Anyway, note that issues found are possibly false positives and fixing all issues is not a requirement for getting through the application process.
http://ventral.org/pareview/httpgitdrupalorgsandboxedutrul1623422git

I have provided a patch to improve flow of the "hidden_author_get_author_id()" function.

I did not install this module, but did a code review. It looks good except for above patch.

federiko_’s picture

Status: Needs review » Needs work
StatusFileSize
new25.87 KB

.install :
- on line 21 > 'The boundle node type' should be replaced by 'The bundle node type'

.module :
- on line 155 : you should write help text of settings form "this is some help text for Hidden Author module"
- It's very subjective point of view but I would have named config path "admin/config/content/hidden_author" instead of "admin/config/content/hidden_author-rules".

Suggestions :
- You could theme a little bit checkbox with css to put a little space between fields (see attached files). Or maybe the best would be to put the checkbox in authoring informations tab but I'm not sure how to do that

edutrul’s picture

Thank you for all your replies, I will be working on your suggestions as soon as possible.

edutrul’s picture

Thanks buddies

@pagolo:

Cool. Thanks for that detail! Currently I am still investigating about this. If you got any news please don't hesitate to send me a message. Thanks again.

@seworthi:

Thanks for your patch, I already applied it.
I deleted master branch also.

@federiko_:

Thanks!! I did what you mentioned! But I think styles for the checkbox "hidden author" field will be applyed by themers when installing the module.

Thanks again buddies!
Happy codding!

PA robot’s picture

Status: Needs work » Closed (won't fix)

Closing due to lack of activity. Feel free to reopen if you are still working on this application (see also the project application workflow).

I'm a robot and this is an automated message from Project Applications Scraper.

PA robot’s picture

Issue summary: View changes

removed links that did not contain any reviews.

avpaderno’s picture

Assigned: edutrul » Unassigned
Issue summary: View changes
Issue tags: -dlatino