This module allows users to put various different people in specific groups or lists or circles. These circles are absolutely private. No one in a circle can see who else is in the circle. People you add to circles have no idea what you’ve named the circle/list, or how many other people are in it.

It has the following features:

• Create a new circle.
• Drag-in a user into the circle.
• Drag-out a user from the circle.
• Edit an existing circle.
• Delete an existing circle.
• Adding new users in the Public area.
• On click display of users per circle.
• Transfer of users from one circle to another.
• Drag-in of multiple users into the circle.
• Search & sort users.
• Mouse over display of circle details & its members.
• View profile of one selected user.
• On click display of mutual friends between the logged-in user & each member.

Module Dependencies:

Jquery_update
• Image (core module)
Flag_friend

Sandbox: http://drupal.org/sandbox/harsh/1431342
Drupal 7

Comments

phoenix’s picture

Status: Needs review » Needs work

Hi tush@r

Thanks for your module. I guess people building community sites will love this kind of module.

I did a review and saw the following problems:
- Could you start by adding the git command to get your code. This will make it easier for reviewers:
git clone http://git.drupal.org/sandbox/harsh/1431342.git social_circle
- You are working on the master branch. This is not good drupal practice. You should create a feature branch. The master branch must only contain a README.txt to refer developers to the feature branches. Check the info here
- You made a social_circle folder in your repository, that is not necessary. When using the git clone command above I end up having a social_circle folder with a social_circle folder in it.
- Also try to add some more information on you project page. The Tips for a great project page page is a good read and will show you how to do it.
- I am using an automated script to check for drupal coding standards. You can find it here: http://ventral.org/pareview/httpgitdrupalorgsandboxharsh1431342git
Please visit the page, it gives you a list of errors to fix (too extensive to post here).

When you have fixed the errors you can change the status again to "needs review".

harsh77’s picture

Status: Needs work » Needs review
Issue tags: +Social Community, +social networking
StatusFileSize
new62.11 KB

Hi phoenix,

Thanks for reviewing my module & providing some helpful tips to further improve my module. I have adopted those changes in the current version of the newly created `feature` branch.

Robertas’s picture

Status: Needs review » Needs work

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.

harsh77’s picture

Status: Needs work » Needs review

Hi Robertas,

After phoenix's review, the whole code was moved to the "feature" branch. the "master" branch only contains the Readme.txt file. You can also take a clone of this module & see yourself.

harsh77’s picture

Issue summary: View changes

Page description has been updated.

atul.bhosale’s picture

Status: Needs review » Needs work
StatusFileSize
new1.04 MB

It appears you are working in the "feature" 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

Quick manual review:

  1. Arrange CSS properties in alphabetical order see Drupal CSS Coding Standards
  2. Remove Thumbs.db file from following folder
    images
    images\ie6
    images\img_inquisitor
  3. To include external JS (jquery.livequery.min.js, jquery.corner.js, jquery.colorbox-min.js .... ) use Libraries API module
    which will i) enable multiple modules to use the same library, ii) simplify upgrades to the library code itself, and iii) avoid any potential issues with multiple versions of the same 3rd party library being installed by different modules
  4. Rather than using $(document).ready() in your JavScript you should possibly employ Drupal's native method using Drupal.behaviors
  5. In social_circle.install instead of t() use get_t() to ensure translations don't break at install time. You can see system.install for reference
  6. Collect module path in a variable and use that variable value instead of calling drupal_get_path() 7-8 times in function show_social_circle from social_circle.module file

Automated review

http://ventral.org/pareview/httpgitdrupalorgsandboxharsh1431342git-feature

You can configure editor to avoid following error

  • Spaces must be used to indent lines; tabs are not allowed
  • Whitespace found at end of line

eclipse is very useful for above both
win version
windows->Preference->General->Editors->Text Editors => Displayed tab width and Insert spaces for tabs
windows->Preference->PHP->Editor->Save Actions => Remove trailing whitespace

harsh77’s picture

Priority: Normal » Major
Status: Needs work » Needs review

Hi Atul,

Thanks a ton for such helpful feedback. I have worked on the review points & corrected them all, as recommended. I have now created a version specific branch of this module, removed thumbs file from above stated directories, associated libraries module with my module & also accomplished other specified tasks.

soncco’s picture

Status: Needs review » Needs work

Hi tush@ar, I found some coding standards issues, please check http://ventral.org/pareview/httpgitdrupalorgsandboxharsh1431342git-7x-1x

Personal review:

  1. Remove scripts/jquery.ui.js, this file is included in Drupal core (7.x).
  2. Remove translation files, this are added via localization.drupal.org.
  3. In social_circle.info remove line 12 ,,version = "7.x-1.0" ’’ it's will be added by the deploy-system. => #881720: Remove "version = VERSION" from .info
harsh77’s picture

Status: Needs work » Needs review

Hi soncco,

Thanks a lot for taking out time & doing the review. I have made the changes specified in this review. As far as removing the jquery.ui.js file is concerned, i cannot remove it coz of the reason that even after using the jquery_update module, Jquery ui got updated to version 1.8.11. But i need minimum 1.8.14 version of the same for the drag-gable feature to work. hence, i have to include it.

harsh77’s picture

Issue summary: View changes

IE issue resolved

novalnet’s picture

Status: Needs review » Needs work

Hi,

Manual Review:

1. Use ":" instead of "{" for foreach in all your tpl files.
ex : foreach ($mid as $mem_id) { in mutual-friends.tpl.php
2.Use t() for titles in social_circle.module file.
3.Add coment for parameters in social_circle.module line 287 & 288.
4.It seems you are concadenating expressions inside preg_match() in social_circle.module line 320.Concadenation is not required here,use a single string instead.
5.There are so many errors in your code validation.Please PAREVIEW your code and try to get it cleared.

Thanks,

harsh77’s picture

Status: Needs work » Needs review

Hi Novalnet,

Thanks a lot for the doing the review. Earlier, i didn't knew that i can myself test my code at http://ventral.org/pareview ...thanks for highlighting it. I have resolved the above states & mostly all of the pareview issues. I got it as clear as i could from pareview.

greenrover33’s picture

My personal suggestion would be a sub folder named "themes" for als *.tpl.php file.

social_circle_menu(9
"add/circle" 'access callback' => TRUE,
are you shure that realy every one should be able to access this menu items.
Should you not better let the site admin choose.
And if i not completly miss understud the fact that you need $user->uid in social_circle_add_submit().
I would also say that you at least need the "registerd user" permissions.

define('PATH_TO_MODULE', drupal_get_path('module', 'social_circle'));
define('PATH_TO_LIBRARIES', 'sites/all/libraries/');
Constans should be prefixed with underline and module name, to avoid collusions with other modules.

$obj->removemember($_GET['mid'], $_GET['gid']);
With drupal 7 we have prepared statements, because of this it is secure.
But for persistant code use: (INT), check_plain(), filter_xss()

if (isset($_GET['uid']) and isset($_GET['gid'])) {
use "&&" insted of "and"

function social_circle_form_alter(&$form, &$form_state, $form_id) {
if ($form_id == 'user_register_form') {
Use "social_circle_form_user_register_form_alter(&$form, &$form_state, $form_id) {"
to save performance.
http://api.drupal.org/api/drupal/modules!system!system.api.php/function/...

social_circle_validate_firstname_lastname()
Sufix methode with _validate( to let users see fast what for this methode is.

social_circle_schema()
You should prefix you table names with module name.
"user_group" could be used from another module.

Why you add "firstname" and "lastname" to drupal "user" table?
Have a look at http://your.drupal/admin/config/people/accounts/fields

multipleDiv.class
Define you methodes as public / private / protected

$out .= '

';
$out .= '

';
user drupal_add_js() drupal_add_css()

Dont use alert() in javascript for error messages.
Better theem it like http://api.drupal.org/api/drupal/includes!theme.inc/function/theme_statu...

harsh77’s picture

Hi greenrover33,

Thank you for doing the review & also for recommending few useful changes. Most of the suggested changes have been implemented.

I added first name & last name to the user table because i want to store it as additional details belonging to a user. Doing it the way suggested by you, would create 4 new tables in the database and increasing database size, also pulling back one complete content type record would involve hitting 50 different tables in case of 50 or more fields, etc. .
I have read few posts regarding the creation of 2 new table for every new field, which i don't think is the right way, although i am open for suggestions of doing it in the correct way.

I cannot theme error messages as drupal status messages due to the fact that no existing drupal methods are called on that page. Hence, i used java script validation.

imDhaval’s picture

i m waiting for this module, plz realease it soon

klausi’s picture

Assigned: Unassigned » klausi
klausi’s picture

Assigned: klausi » Unassigned
Priority: Major » Normal
Status: Needs review » Needs work

There is still a master branch, make sure to set the correct default branch: http://drupal.org/node/1659588 . Then remove the master branch, see also step 6 and 7 in http://drupal.org/node/1127732
Review of the 7.x-1.x branch:

  • Remove all .DS_Store files from your repository.

This automated report was generated with PAReview.sh, your friendly project application review script. You can also use the online version to check your project. You have to get a review bonus to get a review from me.

manual review:

  1. jquery-ui.js and other javascript files appears to be 3rd party code. 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, which you may want to re-read, to be sure you're not violating other terms. The Libraries API module is a recommended method for adding 3rd party dependencies without directly including the code on Drupal.org.
  2. social_circle_schema(): all database tables should be prefixed with your module's name to avoid name clashes with others.
  3. social_circle_init(): why do you need your CSS on every single page request? Same for the JS, only add it if it is actually needed.
  4. social_circle_menu(): Using user_is_logged_in() is access callback might not be a good idea, because then you can't hide that feature from authenticated users. Better use standard permissions that can be assigned to user roles.
  5. "require_once 'multipleDiv.class.php';": no need for that, the registry will autoload the class for you.
  6. "public function addnewmembers()": method names should be camle case, see http://drupal.org/node/608152
  7. social_circle_add_submit(): use drupal_write_record() instead of db_insert() or db_update() and you get schema validation for free.
  8. social_circle_add(): javascript should be added with drupal_add_js(). Also elsewhere.

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 :-)

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.

klausi’s picture

Issue summary: View changes

additional features updated.

avpaderno’s picture

Title: Social Circle » [D7] Social Circle
Issue summary: View changes
Issue tags: -user management, -Social Community, -social networking, -Manage users, -circles, -google circle in drupal, -Social circles