This module provides integration with the LinkedIn Groups API. It extends the functionality of existing LinkedIn Integration module and can be used as a plugin.
It supports the following features:
- Displays 'Latest Discussions' Posts in a Block for the specified Group
- Displays 'Most Popular Discussions' Posts in a Block for the specified Group
Dependencies
This module requires the LinkedIn Integration module.
Refer Readme.txt for more info.
Here's the sandbox link for this project
http://drupal.org/sandbox/chhavik/1379612
Project Reviews :-
http://drupal.org/node/1462094#comment-5730808
http://drupal.org/node/1475706#comment-5730610
http://drupal.org/node/1457206#comment-5730424
http://drupal.org/node/1466154#comment-5747294
http://drupal.org/node/1483744#comment-5740690
http://drupal.org/node/1457206#comment-5747330
http://drupal.org/node/1510564#comment-5815918
http://drupal.org/node/1483744#comment-5815652
http://drupal.org/node/1457206#comment-5815598
http://drupal.org/node/1488328#comment-5840406
http://drupal.org/node/1525062#comment-5849714
http://drupal.org/node/1522456#comment-5849748
http://drupal.org/node/1536182#comment-5879870
http://drupal.org/node/1535548#comment-5879932
http://drupal.org/node/1525062#comment-5875426
| Comment | File | Size | Author |
|---|---|---|---|
| #28 | drupalcs-result.txt | 746 bytes | klausi |
| #20 | drupalcs-result.txt | 989 bytes | klausi |
Comments
Comment #1
patrickd commentedwelcome
There are still files other than README.txt in the master branch, make sure to remove them. See also step 5 in http://drupal.org/node/1127732
Review of the 7.x-1.x branch:
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. Go and review some other project applications, so we can get back to yours sooner.
If you got any questions on this please ask!
I found stuff like
drupal_get_path('module', 'linkedin_group_posts')in your .tpl file. Rather than using such functions in a tpl you should create a preprocess function to generate these values ready-to-use. This makes theming your module more flexible and much easier to understand for themers with limited PHP knowledge.Your checking the existance of the oauth library in
hook_init()meaning that it will be done on every page request, maybe you rather put that on the status report page (See hook_requirements)Also you add your css file here, is it really necessary to add it on any page? I don't think so, you should rather add it when it's really needed.
Your using hook_form_alter() but you could also use hook_form_FORM_ID_alter(), looks better ;)
Woooohaa, could you add some comments here ? ^^ (generally more comments wont hurt your module ;) )
regards
Comment #2
chhavik commentedpatrickd,
I have corrected code sniffer issues and incorporated all the suggestions given by you in this module. Please review the updated branch.
Here's the repeated review generated by pareview.sh http://ventral.org/pareview/httpgitdrupalorgsandboxchhavik1379612git
Regards.
Comment #3
chhavik commentedComment #4
chhavik commentedComment #5
jthorson commentedIt appears that there have been multiple project applications opened under your username:
CCK Combo: http://drupal.org/node/1161214
LinkedIn Group Posts: http://drupal.org/node/1379794
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, I have marked your secondary applications as 'closed(duplicate)', and left one application open (chosen at random).
If you prefer that we proceed through this review process with a different application than the one I that I have left open, then please feel free to close the 'open' application as a duplicate, and re-open one of the other project applications which I had closed.
Thanks in advance for your patience and understanding!
Comment #6
chhavik commented@jthorson
I have closed the other application CCK Combo: http://drupal.org/node/1161214 and i would like this one to be reviewed.
Thanks.
Comment #7
barnettech commentedIn http://drupal.org/node/1127732 it says when cleaning up the master branch to do:
echo See major version branches.> README.txtAlso when I checkout your code I'm only seeing the master and when I type
git branchI don't see the other branches. This could be my error? I will check with some folks.Comment #8
barnettech commentedpareview didn't show any errors which is great. I've changed it to needs work just so you know to change the readme as I've noted above. I'll load up the module to take a look.
Comment #9
chhavik commented@barnettech
I have made the changes in Readme file as suggested by you. You can type below commands to load the module files:-
git branch -a (It will list all branches under this repository)
git checkout 7.x-1.x
or you can use the below command to clone 7.x branch.
git clone --branch 7.x-1.x http://git.drupal.org/sandbox/chhavik/1379612.git linkedin_group_posts
Thanks.
Comment #10
barnettech commentedI installed it locally, was ready to go and then saw for the linkedin api you need an external url for your site. So I set it up again on a url I have available, and as soon as I point to the Oauth.php file the site gives me a white screen and says this when I run drush status:
Error: Cannot redeclare class OAuthException in
/var/www/cfannon_babson_trunk/docroot/sites/all/modules/contrib/linkedin_group_posts/OAuth.php, line 8
I know this is due to an error with the linkedin module and not yours, but I cannot do further testing without this resolved, I get a white screen of death. Do you have a solution for this? If you do I will continue to do the review. If I have a bunch more time, I will work on the problem with the fact that the LinkedIn module doesn't namespace all functions it uses, submit a bug to the author, etc., or whatever I find appropriate. I'm sure the OAuth.php functions should be declared as a library to prevent these conflicts, since multiple modules use OAuth.
I would suggest you make it so your module does not suffer from such namespacing problems by working with the author of the linkedin module or crafting your module to not depend on this being resolved to work.
If I'm missing something and you have the fix for this let me know thanks!
Here is the link to the libraries API: http://drupal.org/project/libraries
Comment #11
chhavik commented@barnettech
I tried it again locally, didn't get any errors. These are the steps i followed :-
1) Enable OAuth and LinkedIn modules except LinkedIn group posts module.
2) Go to LinkedIn Integration config page. admin/config/services/linkedin
3) Set Library path as 'sites/all/modules/oauth/lib/OAuth.php'
4) Enter API Key and Secret Key which you obtained by requesting.
5) Enable LinkedIn group posts module . Edit your account 'user/1/edit' and click on LinkedIn tab to
authorize your drupal account with linkedin.
6) Go back to admin/config/services/linkedin page and fill in the LInkedIn Group posts details. You can refer Readme file for more info.
7) Enter Group Id- '65688' or it can be any public group.
8) Enter Oauth Token and Oauth secret keys from 'linkedin_token' table.
9) Save your configurations and go to Block page. There you can find the Group posts blocks.
Thanks.
Comment #12
barnettech commentedYes I know it probably works for you, but because the OAuth.php file doesn't use namespacing, and other contributions on drupal.org do not obey the rules in namespacing their modules I cannot install your module without sorting through that big problem. The OAuth.php library should probably be using the library api.
Comment #13
jthorson commentedJust a guess, but given that the LinkedIn Integration project reports 451 sites using it, I suspect that the conflict most likely has something to do with the particular review environment, and not the LinkedIn Integration module itself.
Comment #14
chhavik commentedHi,
I have set up a test demo site and there you can have a look at the functionality. On the home page, you can see the LinkedIn Group Posts blocks.
http://d7testing.codespry.com/
Username/password : visitor/visitor
Once you login, click on 'LinkedIn Settings' link on the left sidebar to check the required settings.
Thanks.
Comment #15
barnettech commentedI took a look at the test site you setup. It looks very nice. At some point I will try to find time to identify why the linkedin module will not load for me, I'm sure there are many others in the same boat, and this will be helpful.
So I ran an automated review:
Review of the 7.x-1.x branch:
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. Get a review bonus and we will come back to your application sooner.
Source: http://ventral.org/pareview - PAReview.sh online service
I'm on vacation this week and will do a few reviews occasionally this week.
Doing a bit of manual review I see:
84 /**
85 * Callback function to generate block content.
86 *
87 * @param type $order_type
88 * Whether the post type is 'Latest' or 'Popular'
89 */
there is no return value doxygen documentation in this block? That doesn't look right to me.
Those helper functions in linkedin_group_posts.module also might be called out by the admins here for lack of documentation? And using curl instead of drupal_http_request() got me a comment in my module: http://drupal.org/node/1328366#comment-5490924
Comment #16
chhavik commentedI have fixed the pareview issues. Added a return value to the function mentioned by you. I have used those helper functions and curl instead of drupal_http_request on the lines of main 'LinkedIn Integration' module.
Let me know in case i need to make any other changes.
Thanks.
Comment #17
ishanmahajan commentedThe demo site looks good!
@barnettech can you list down the steps that you followed to install the linkedin module? I followed the README of linkedin module and was able to get both the modules running on my local system.
I don't think using cURL is a problem here. I think having a cURL test in the hook_requirements should be enough.
@chhavik I can see the blocks and the module is working.
But there are a few usability issues:
* The README.txt does not clearly list the steps to configure this module.
* You don't mention how one can obtain the OAuth token and OAuth secret. We can do that by using the Linkedin profile integration module.
* Why does the user need to open the linkedin_token table and fetch the OAuth token and secret values? This is a serious usability issue.
* I suggest you have these values pre-populated in the form and let the users enter only the group id and the number of posts settings.
Comment #18
chhavik commented@ishanmahajan
1) I made changes to the Readme file. Added clear steps to configure this module and how one can obtain OAuth token and OAuth secret keys.
2) Improved the module's usability by adding pre-populated form values.
Comment #19
ishanmahajan commented@barnettech were you able to get the linkedin integration module running? I see 474 sites using it. Guessing that it could be an issue with your testing environment.
@chhavik the module is much easier to use now.
PAReview gives no errors. Went through the code and found nothing of note . Marking it RTBC.
Comment #20
klausiReview of the 7.x-1.x branch:
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. Get a review bonus and we will come back to your application sooner.
manual review:
Comment #21
chhavik commented@klausi,
1) Pareview issues have been fixed. Block subject has been wrapped in t() function.
2) Added hook_requirements for curl library and xml_parser_create.
3) My module is dependent on OAuth module or OAuth PHP Library but its been taken care in the main linkedin module. That is why i used oauth classes by just mentioning dependency on linkedin module.
Thanks.
Comment #22
chhavik commentedComment #23
chhavik commentedComment #24
chhavik commentedComment #25
patrickd commentedHi,
Sorry for the delay,
as there are currently many applications in queue we need more reviewers,
so think about getting a review bonus and we will come back to your application sooner.
Comment #26
chhavik commentedHi, i have reviewed the below applications and thus adding a bonus tag to my application.
Comment #27
chhavik commentedComment #28
klausiReview of the 7.x-1.x branch:
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. Get a review bonus and we will come back to your application sooner.
manual review:
Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.
Comment #29
chhavik commentedComment #30
chhavik commentedReviewed below applications, thus adding bonus tag :-
Comment #31
klausiPlease add your review links to the issue summary. Please set the status accordingly if you have reviewed an application ("needs work" or "reviewed & tested by the community").
Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.
Comment #32
chhavik commentedHi
Thanks.
Comment #33
chhavik commentedAdding Review bonus tag. Links are specified above in Issue summary.
Comment #34
sankatha commentedReviewed the code base and found the following issues
Comment #35
chhavik commented@sankatha
Made all the changes suggested by you. Thanks for pointing out the 'simplexml_load_string' function, it is quite useful and hence removed the previous function which was converting xml response into an array.
No, i am not using linkedin module only for OAuth library. This module is being developed to be used as a plugin to LinkedIn Integration module.
Regards,
Chhavi
Comment #35.0
chhavik commentedAdded project reviews links.
Comment #36
chhavik commentedAdding review bonus, find reviewed application links in Issue Summary.
Comment #36.0
chhavik commentedAdded reviewed application links.
Comment #37
klausimanual review:
Otherwise this looks nearly ready. Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.
Comment #38
chhavik commented@klausi,
I have fixed the above suggestions pointed by you.
Regards
Comment #38.0
chhavik commentedAdded reviewed links.
Comment #39
chhavik commentedAdding review bonus, find reviewed application links in Issue Summary.
Comment #40
klausiAwesome, thanks for all your hard work! Looks RTBC to me now. Assigning to tim.plunkett as he might have time to finally approve this.
Comment #41
patrickd commentedLet's finish with this.
Comment #42
patrickd commentedYour project page is pretty short, you may have a look at the tips for a great project page. You may merge your README and project page, so both contain general and installation instructions.
Please take more care about your function documentation, "Some internal helper functions..." is not very helpful.
Read the watchdog documentation about the $message string (it must be untranslated) and passed variables. The message severity comes after the variables array!
should be
watchdog('linkedin_group_posts', "No HTTP code was returned", array(), WATCHDOG_ERROR);and
should be:
Note that l() is using same options as url():
print l(t('View all'), "http://www.linkedin.com/groups?gid=$group_id", array('attributes' => array('target' => '_blank')));should be:print l(t('View all'), "http://www.linkedin.com/groups", array('query' => array('gid' => $group_id), 'attributes' => array('target' => '_blank')));After all I'm sure you'll fix these asap, but please take more care about the API documentation.
Therefore, thanks for your contribution and welcome to the community of project contributors on drupal.org!
I've granted you the git vetted user role which will let you promote this to a full project and also create new projects as either sandbox or "full" projects depending on which you feel is best.
Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.
As you continue to work on your module, keep in mind: Commit messages - providing history and credit and Release naming conventions.
Thanks to the dedicated reviewer(s) as well.
Comment #43
chhavik commentedThanks everyone who took time out and reviewed my application. I am very excited to get the git access as now i would be able to contribute back to the community.
Many thanks to Klausi and patrickd for the efforts they put in this whole process. :)
Comment #44.0
(not verified) commentedAdded Reviewed application links.
Comment #45
avpaderno