follow
unfollow

Added follow and unfollow feature to node, taxonomy and user page so that they
track the statistics of user following particular content.

This module provide configuration for setting particular node, taxonomy and user
so that follow and unfollow feature get enable for them.

This module also provide email template configuration for sending mail for
following and unfollowing content.

This module also provide views integration.

Requirements
------------
This module requires the following modules:

* views (https://www.drupal.org/project/views)

Installing
----------

* Install as you would normally install a contributed Drupal module. See:
https://drupal.org/documentation/install/modules-themes/modules-7 for
further information.

CONFIGURATION
-------------
* Configure Follow & Unfollow in Administration » configuration » Follow &
Unfollow:

- Configure Content types.

Select content types that need to be used for module feature.

- Configure Taxonomy

Select Taxonomy that need to be used for module feature.

- Configure User

Select user that need to be used for module feature.
Follow below screenshot
content setting

- Configure Follow and unfollow email template.

Provide configuration for setting email template having subject and body
field on it.
Follow below screenshot
Email Template setting

Similar / related modules
-------------------------
Flag (https://www.drupal.org/project/flag)

Git:
git clone --branch 7.x-1.x https://git.drupal.org/sandbox/ajayNimbolkar/2805589.git follow_unfollow
cd follow_unfollow

Project link
https://www.drupal.org/sandbox/ajaynimbolkar/2805589

Comments

ajayNimbolkar created an issue. See original summary.

ajaynimbolkar’s picture

Issue summary: View changes
ajaynimbolkar’s picture

Title: [d7] Follow Unfollow » [D7] Follow Unfollow
PA robot’s picture

Multiple Applications
It appears that there have been multiple project applications opened under your username:

Project 1: https://www.drupal.org/node/2805591

Project 2: https://www.drupal.org/node/2756909

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.

PA robot’s picture

Issue summary: View changes

Fixed the git clone URL in the issue summary for non-maintainer users.

We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)

Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).

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

jack_ry’s picture

Git default branch is not set

arun ak’s picture

Assigned: ajaynimbolkar » Unassigned
Status: Active » Needs review

Please don't assign the project application issue to yourself if you want other people to review it. Please see this page about assigning ownership to issues.

ajaynimbolkar’s picture

Hi jack_ry and Arun,

I have updated git default branch.

Thanks,
Ajay

pankajsachdeva’s picture

Assigned: Unassigned » pankajsachdeva

I am testing this application.

ajaynimbolkar’s picture

Hi Pankajsachdev,

Please provide your testing bug if any.

Thanks,
AJAY

PA robot’s picture

Status: Needs review » Needs work

Timeout when invoking pareview.sh for https://git.drupal.org/sandbox/ajayNimbolkar/2805589.git at http://pareview.sh/pareview/httpsgitdrupalorgsandboxajayNimbolkar2805589git

Do you have any third-party files committed? 3rd party code is not generally allowed on Drupal.org and should be deleted. This policy is described in the getting involved handbook. It also appears in the terms and conditions you agreed to when you signed up for Git access.

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

ajaynimbolkar’s picture

Hi,

I haven't used any third-party File.

Thanks,
Ajay

ajaynimbolkar’s picture

Status: Needs work » Needs review
pankajsachdeva’s picture

Assigned: pankajsachdeva » Unassigned
visabhishek’s picture

Status: Needs review » Needs work
Issue tags: +PAreview: security

Hi ajayNimbolkar,

Please make sure all used variables should removed on hook_uninstall().

Some examples are

variable_get('follow_unfollow_subject_of_follow');
variable_get('follow_unfollow_body_of_follow');
variable_get('follow_unfollow_subject_of_unfollow');
variable_get('follow_unfollow_body_of_unfollow');
variable_get('follow_unfollow_user');
variable_get('follow_unfollow_vocabulary_type');

Security issue:
1) You really should sanitize/validate the arg() value while passing in
follow_unfollow_check_block_visibility($param) function or before using it.

Ex code :

<?php
    $nid = $param['1'];
    $node = node_load($nid);
?>
<?php
$tid = $param['2'];
 $taxonomy = taxonomy_term_load($tid);
?>

2) You should implement a proper access callback permission instead of "'access arguments' => TRUE,"

  $items['admin/config/follow-unfollow'] = array(
    'title' => 'Follow & Unfollow',
    'description' => 'Configure Follow & Unfollow Feature.',
    'position' => 'left',
    'weight' => -20,
    'page callback' => 'system_admin_menu_block_page',
    'access arguments' => TRUE,
    'file' => 'system.admin.inc',
    'file path' => drupal_get_path('module', 'system'),
  );
  $items['admin/config/follow-unfollow/setting'] = array(
    'title' => 'Follow & Unfollow Settings',
    'description' => 'follow & unfollow features for content',
    'page callback' => 'drupal_get_form',
    'page arguments' => array('follow_unfollow_admin_setting_form'),
    'access arguments' => TRUE,
    'file' => 'forms/follow_unfollow.admin.inc',
    'type' => MENU_NORMAL_ITEM,
  );
ajaynimbolkar’s picture

Hi visabhishek,

Thanks for replay.

I have done all changes.

Thanks,
Ajay

ajaynimbolkar’s picture

Status: Needs work » Needs review
Issue tags: -PAreview: security
arun ak’s picture

Issue tags: +PAreview: security

If added, please don't remove the security tag, we keep that for statistics and to show examples of security problems.

ajaynimbolkar’s picture

Hi Arun Ak,

Thanks for replay.

I will keep in mind that.

Thanks for your suggestion.

harsh.behl’s picture

Status: Needs review » Needs work

Hi Ajay,

After configuring content type & taxonomy. I can see the Follow unfollow form appears on selected nodes. But when I hit follow button, I get this notice in status reports: Notice: Trying to get property of non-object in follow_unfollow_form() (line 133 of /var/www/html/drupal-dev/sites/all/modules/follow_unfollow/follow_unfollow.module).

ajaynimbolkar’s picture

Status: Needs work » Needs review

Hi Pen,

Thanks for replay,

I have done all changes suggested.

Thanks,
Ajay Nimbolkar

fadonascimento’s picture

Automated Review

No issues, just a kindly recommendation:
https://pareview.sh/node/766

Manual Review

Individual user account
[Yes: Follows] the guidelines for individual user accounts.
No duplication
[No] module duplication and/or fragmentation.
Master Branch
[Yes] the guidelines for master branch.
Licensing
[Yes] the licensing requirements.
3rd party assets/code
[Yes: Follows] the guidelines for 3rd party assets/code.
README.txt/README.md
[Yes: Follows] the guidelines for in-project documentation and/or the README Template.
Code long/complex enough for review
[Yes: Follows] the guidelines for project length and complexity.

Just a recomendation:

You don't need pass variable "NULL" to variable_get function, the function already receive the value by default:

variable_get('follow_unfollow_body_of_unfollow', NULL)
variable_get('follow_unfollow_subject_of_unfollow', NULL)
variable_get('follow_unfollow_body_of_follow', NULL)

as below

variable_get('follow_unfollow_body_of_unfollow')
variable_get('follow_unfollow_subject_of_unfollow')
variable_get('follow_unfollow_body_of_follow')

Check more about it: https://api.drupal.org/api/drupal/includes%21bootstrap.inc/function/vari...

It's possible to pass any default values:
You can change this:

 '#default_value' => !empty(variable_get('follow_unfollow_content_type')) ? variable_get('follow_unfollow_content_type') : array(),

For just this:

variable_get('follow_unfollow_content_type', array())

The views module is listed as requirement in project description, You should add as dependency in module.info, like:
dependencies[] = views

You should use "text_format" instead of "textarea" or add the option "'#wysiwyg' => TRUE," to able use ckeditor when available in forms about email templates.

visabhishek’s picture

@fadonascimento : Looks like you forgot to change the status. Is this now RTBC after your review or are there application blockers left and this should be "needs work"?

fadonascimento’s picture

Hi @visabhishek

I think just recommendations, nothing block, I will update to RTBC, thanks!

fadonascimento’s picture

Status: Needs review » Reviewed & tested by the community
ajaynimbolkar’s picture

Hi fadonascimento ,

Thanks For replay.

I have incorporated changes suggested.

Thanks,
Ajay Nimbolkar

ajaynimbolkar’s picture

Priority: Normal » Major
fadonascimento’s picture

Sounds good @ajayNimbolkar, keep pushing =D

visabhishek’s picture

Status: Reviewed & tested by the community » Closed (won't fix)

Hi ajayNimbolkar,

Your account already granted as '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.

So You can directly promote your sandbox project.