Analog to Social Share Privacy mediaWrapper provides a way to prevent visitors' data being sent to third party websites without their explicit interaction. Wile Social Share Privacy focusses on twitter, facebook and Google+, mediaWrapper addresses embeddable media players.
Project page: http://drupal.org/sandbox/musikpirat/1508144
git: git clone --branch 6.x-0.1-dev musikpirat@git.drupal.org:sandbox/musikpirat/1508144.git mediawrapper
This module is designed for drupal 6 but should be easily ported to drupal 7.
Reviews of other projects:
http://drupal.org/node/1510636#comment-5810212
http://drupal.org/node/1503782#comment-5808022 (Not a very lucky review, but maybe it counts anyway)
http://drupal.org/node/1509670#comment-5806328
http://drupal.org/node/1431790#comment-5817962
http://drupal.org/node/1447120#comment-5818060
http://drupal.org/node/1511560#comment-5818140
New reviews:
http://drupal.org/node/1426386#comment-5842412
http://drupal.org/node/1429208#comment-5842440
http://drupal.org/node/1458858#comment-5842468
Comments
Comment #1
patrickd commentedWelcome!
Issue to fix:
while waiting for an in-depht review of your module you can start out fixing some coding style issues detected by automated tools:
http://ventral.org/pareview/httpgitdrupalorgsandboxmusikpirat1508144git-...
regards
Comment #2
musikpirat commentedBranch -> Should be fixed
README.txt is added
Translation folder is removed
Images moved to images/, .js moved to js/
Just run the ventral-check. Seems there is still a lot do for me. :)
http://ventral.org/pareview/httpgitdrupalorgsandboxmusikpirat1508144git
Comment #3
patrickd commentedNah, that's not so much, just minor things ;)
Comment #4
musikpirat commentedMaybe for you - I'm a java guy. :)
Issues are fixed.
Comment #5
musikpirat commentedFinally I managed to delete the invalid braches in git.
Comment #5.0
musikpirat commentedSwitched from master to a branch
Comment #6
musikpirat commentedDid three reviews. Hope they are good enough. :)
Also did some refactoring at the code to be even more easier to use.
Comment #7
klausiThanks for your reviews, just make sure that you pick applications that did not get a review in a long time.
manual review:
please read <a href="http://foo/bar">this</a> article.": wrong link.Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.
Comment #8
musikpirat commentedHi Klaus,
thanks for your suggestions. Fixed everything - at least I hope so and pushed the module online.
I'm afraid I'll have to wait. My php/drupal knowledge is pretty basic and a in depth review of a module is far beyond my possibilities.
Comment #8.0
musikpirat commentedAdded PAReview infos
Comment #9
musikpirat commentedOk, found some old stuff I could review.
Also did updated the project page. I will link to it as soon as this is an official module. Maintaining documentation at two pages would be a waste of time.
Comment #10
c-logemannHello musikpirat,
I installed the module in a test system and successfully used a youtube video integration protected by your JS.
But because this is a subfolder the icons are not displayed. Your JS is building a path like example.com/sites/all/modules/mediawrapper/images/youtube-icon.png and not example.com/subfolder/sites/all/modules/mediawrapper/images/youtube-icon.png
By the way: What about license of the icons? Are you sure we can host this images on drupal.org? But this is a question for lawyers.
Additionally I found some german text in the JS file.
Comment #11
musikpirat commentedHi Carsten,
the german text in the js are a fallback that comes only to use if you are using the js without drupal.
The images should work now (don't have a drupal installation in a subfolder to test that). As far as I can they, the images are legal to use. I took them either from wikipedia (marked as public domain) or from the projects site where they have been marked as free for use.
I'm afraid, I have to put some more time into the preprare process. If there is a link to a video url _before_ the media that should be wrapped, strange things start to happen...
Comment #12
musikpirat commentedNext round. Added a new module that uses oembed to create thumbnails instead of the default images.
Comment #13
MrMaksimize commentedOops your branch is name 6.x-0.x I think it should be 6.x-1.x
http://drupalcode.org/sandbox/musikpirat/1508144.git/blob/refs/heads/6.x... is very long should be around 80 chars
don't use camelcase for function names. those are only for objective stuff (classes, methods, etc)
function mediaWrapper_doFilter
dont pre-initialize your variables into nulls.
http://drupalcode.org/sandbox/musikpirat/1508144.git/blob/refs/heads/6.x...
^ should probably be a switch statement
if (is_null($url))You can just use the empty() function, since is_null will check for NULL not for an empty value
You also have a .save file committed - haven't seen one of those - is that maybe from your ide?
If so, add it to .gitignore
Also I think you should put mediawrapper_oembed into a separate subfolder
Both module names should not be camelcase
use single quotes, and double only when necessary - http://drupal.org/coding-standards#quotes
http://drupalcode.org/sandbox/musikpirat/1508144.git/blob/refs/heads/6.x...
You have some commented out code around that line ^
Do an overall read through of http://drupal.org/coding-standards and check your code agains that :) Helps a lot w/ review :)
Also make sure you follow the coding standards for documenting your functions - http://drupal.org/node/1354 and document your params for functions
Comment #14
musikpirat commentedHi Maksim,
0.x has been choosen by intent. 1.x will be used as soon as this module is feature complete. :)
Camel cases are removed in function names and file names.
Using switch instead of if.
Variables have to be nullified due to the loop. Before I nullified them, very strange things happened... :) Extracted the code to a separate method.
The outcommented code is kind of "in progress". I'm thinking about to re-enable it to support the oembed_module even without imagecache. I hope this does not affect the review process too much. :)
The parameters are pretty self explaining. If is mandatory to document them to get the module promoted, I'll do so.
Things are commited.
Comment #15
patrickd commentedComment #16
MrMaksimize commentedGotcha. Cool. /me do wonder what interesting things, but purely for an educational sake ;)
Comment #17
patrickd commenteddrupal_get_path('module', 'mediawrapper')in hook_init, but you already know where your module is by doing dirname(__FILE__) instead (works just faster)removed "review bonus" tag, you can add it again after you've done 3 more reviews, remember to pick old ones first
thanks
regards
Comment #18
patrickd commentedComment #19
musikpirat commentedTo be honest, this is getting a little bit annoying. Most code I have is copied either from tutorials from d.o or from existing modules. Why are new modules handled that strict and once you are accepted, nobody cares anymore?
Anyway, I wanna get my module an official one, so I'll go on...
1) I thaught credits were meant for patches and such. I'll try to add more specific comments, bust most of the time I'm just fixing things, that are peanuts.
2) done
3) dirname(__FILE__) returns a path relative to /. This works for adding the js, but is useless for the images, since I need a path relative to the document root. Anyway I reduced it to a single call instead of two.
4) Drupal.settings.basePath contains the basepath - but I need the url where the images are stored.
5) Done.
6) I'm ok with both, so I replaced the names
7) One again, taken straight from a tutorial: http://drupal.org/node/206761 -> Fixed
8) Moved cleanup code from installer to uninstaller
9) Fixed.
10) Once again something copied from another module... Removed.
Comment #20
patrickd commentedhmm, I'm sorry for that, corrected the documentation you mentioned. (making everyone able to edit wiki pages is both, blessing and curse)
This whole process is about making sure you can write good secure code, we DO care what your doing afterwards, but we hope you take the lessons learned with you so we don't have care too much ;)
looks fine for me now
// btw, rather then relying on any wiki page you should always have a look at api.drupal.org and look how core does things (because it's [most of the time] right and not editable without beeing checked before)
Comment #21
musikpirat commentedYeah, keeping everything in place can be quite troublesome if everybody is allowed to participate. Thanks for correcting the documentation - didn't even think about doing it myself. :)
Btw: I like the idea of the community process in general. I learned a lot about drupal and php and it is indeed important, that here is some control about officially released modules.
// thanks for having a look on the code again. :) I read some time in the API, but there are often comments too... ;)
Comment #21.0
musikpirat commentedAdded three more reviews
Comment #22
musikpirat commentedThree new reviews done.
Comment #23
klausimanual review:
Although the last point could be considered a security blocker for this approval, I'm not that strict today as I can see that you are highly motivated and you'll fix that ASAP anyway :-)
Thanks for your contribution, musikpirat! 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 #24
musikpirat commentedHi Klaus,
interesting. If I enable notices, I get some by other modules, but nothing from mine. Anyway, I prefixed the array stuff with @, so there will be no notice. Think this is ok, due to the empty check afterwards.
Thanks all for reviewing and the hints how to improve the module!
Comment #25.0
(not verified) commentedAdded three new reviews