This module grabs comments for the page from Facebook, caches them and puts it permanently to the website. The goal is to benefit from the SEO effect of the comments which usually included to the website through an iframe.

You need to download Facebook-SDK from https://github.com/facebook/php-sdk and put the library to sites/all/libraries directory. Rename the library name to fb-sdk.

http://drupal.org/sandbox/clicktrend/1354512

git clone --branch master clicktrend@git.drupal.org:sandbox/clicktrend/1354512.git facebook_comment_cache

It is for Drupal 7!

Comments

patrickd’s picture

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.
Review of the master branch:

  • Lines in README.txt should not exceed 80 characters, see the guidelines for in-project documentation.
  • Remove "version" from the info file, it will be added by drupal.org packaging automatically.
  • Remove "project" from the info file, it will be added by drupal.org packaging automatically.
  • All text files should end in a single newline (\n). See http://drupal.org/node/318#indenting
    ./facebook_comment_cache.info
    

This automated report was generated with PAReview.sh, your friendly project application review script. Go and review some other project applications, so we can get back to yours sooner.

Source: http://ventral.org/pareview - PAReview.sh online service

patrickd’s picture

Status: Needs review » Needs work
tsubasa’s picture

Status: Needs work » Needs review

Module corrected and needs review again.

patrickd’s picture

Status: Needs review » Needs work

Review of the 7.x-1.x branch:

  • Run coder to check your style, some issues were found (please check the Drupal coding standards):
    Severity minor, Drupal Commenting Standards, Internationalization, Drupal Security Checks, Drupal SQL Standards, Drupal Coding Standards
    
    sites/all/modules/pareview_temp/test_candidate/facebook_comment_cache.module:
     +6: [minor] Missing parenthesis after function name
     +19: [normal] else statements should begin on a new line
    
    Status Messages:
     Coder found 1 projects, 1 files, 1 normal warnings, 1 minor warnings, 0 warnings were flagged to be ignored
    
  • Drupal Code Sniffer has found some code style issues (please check the Drupal coding standards):
    
    FILE: .../all/modules/pareview_temp/test_candidate/facebook_comment_cache.module
    --------------------------------------------------------------------------------
    FOUND 34 ERROR(S) AND 1 WARNING(S) AFFECTING 18 LINE(S)
    --------------------------------------------------------------------------------
      2 | ERROR   | Missing file doc comment
      6 | WARNING | Format should be * Implements hook_foo().
     10 | ERROR   | Whitespace found at end of line
     11 | ERROR   | No space before comment text; expected "// Generate absolute
        |         | URL of node" but found "//Generate absolute URL of node"
     11 | ERROR   | Inline comments must end in  full-stops, exclamation marks, or
        |         | question marks
     12 | ERROR   | Concat operator must be surrounded by spaces
     12 | ERROR   | There must be a single space before an operator statement
     12 | ERROR   | A whitespace must prefix the item assignment operator =>
     12 | ERROR   | A whitespace must follow to the item assignemtn operator =>
     13 | ERROR   | Whitespace found at end of line
     14 | ERROR   | No space before comment text; expected "// Generate cache key"
        |         | but found "//Generate cache key"
     14 | ERROR   | Inline comments must end in  full-stops, exclamation marks, or
        |         | question marks
     15 | ERROR   | Concat operator must be surrounded by spaces
     17 | ERROR   | Line indented incorrectly; expected 2 spaces, found 4
     19 | ERROR   | Line indented incorrectly; expected 2 spaces, found 4
     21 | ERROR   | "require_once" is a statement not a function; no parentheses
        |         | are required
     21 | ERROR   | Concat operator must be surrounded by spaces
     24 | ERROR   | There must be a single space before an operator statement
     24 | ERROR   | A whitespace must prefix the item assignment operator =>
     24 | ERROR   | A whitespace must follow to the item assignemtn operator =>
     25 | ERROR   | There must be a single space before an operator statement
     25 | ERROR   | A whitespace must prefix the item assignment operator =>
     25 | ERROR   | A whitespace must follow to the item assignemtn operator =>
     28 | ERROR   | No space before comment text; expected "// Get token" but found
        |         | "//Get token"
     28 | ERROR   | Inline comments must end in  full-stops, exclamation marks, or
        |         | question marks
     31 | ERROR   | No space before comment text; expected "// Grab all comments
        |         | without ordering" but found "//Grab all comments without
        |         | ordering"
     31 | ERROR   | Inline comments must end in  full-stops, exclamation marks, or
        |         | question marks
     32 | ERROR   | Concat operator must be surrounded by spaces
     32 | ERROR   | Concat operator must be surrounded by spaces
     32 | ERROR   | Concat operator must be surrounded by spaces
     32 | ERROR   | Concat operator must be surrounded by spaces
     34 | ERROR   | No space before comment text; expected "// Grap the comments
        |         | with cURL" but found "//Grap the comments with cURL"
     34 | ERROR   | Inline comments must end in  full-stops, exclamation marks, or
        |         | question marks
     45 | ERROR   | No space before comment text; expected "// Cache for 12 hours"
        |         | but found "//Cache for 12 hours"
     45 | ERROR   | Inline comments must end in  full-stops, exclamation marks, or
        |         | question marks
    --------------------------------------------------------------------------------
    
  • All text files should end in a single newline (\n). See http://drupal.org/node/318#indenting
    ./README.txt
    

This automated report was generated with PAReview.sh, your friendly project application review script. Go and review some other project applications, so we can get back to yours sooner.

Source: http://ventral.org/pareview - PAReview.sh online service

patrickd’s picture

Status: Needs work » Needs review

Switched back to needs review, so in-depth reviews won't be blocked by coding standart issues.

tsubasa’s picture

Status: Needs review » Needs work

Module corrected and needs review again.

tsubasa’s picture

Status: Needs work » Needs review

Needs review.

barnettech’s picture

Status: Needs review » Needs work

Hello,

I noticed the master branch still has files in it other than the README.txt file:

Here are some instructions: http://drupal.org/node/1127732

I also see in the 7.x branch your .gitignore file got committed. I would remove that file.

At the top of your .module file the doxygen is incomplete:
you have

/**
    * @file
    */

Here is the reference on how this should look: http://drupal.org/node/1354#files

tsubasa’s picture

Status: Needs work » Needs review

Updates made. Check again please!

jygastaud’s picture

Hi,

Du to automated review, it appears that your code still have issues.

Please check them at: http://ventral.org/pareview/httpgitdrupalorgsandboxclicktrend1354512git

tsubasa’s picture

Thanks, I've checked them again and I hope it's correct now.

Please check again.

jygastaud’s picture

Hi,

Manual review:

README.txt

  • "Aktivate module" should be "Activate module"

.info

  • Line 32 in .module require_once libraries_get_path('fb-sdk') . "/src/facebook.php";
    You use libraries API which is great. However you should define the librarie module with someting like dependencies[] = libraries

config.inc.example

  • Why did you not made an admin config form instead of use file which is less useful?
  • Blank endline is missing.

.module

  • You should move into an admin form the settup of cache_set time.
  • I don't understand what could mean name variable as $ch use in .module.

I thought your module doesn't meet requierements to get a full project acces (see this post for more information: At least 120 lines and 5 functions) but your project can be still be promoted manualy by git admin as a single project.

c-logemann’s picture

Status: Needs review » Needs work

@tsubasa: Peareview is clean at this moment, but please answer on comment of jygastaud.

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

Installation instruction for Facebook SDK added