Overview

This module, based on Youtube APIs, provides the possibility to create Video galleries, using Youtube Playlists. In the playlist are showed video thumbnails, titles, duration and views for every video

Features

  • Create a block for every youtube video or videogallery
  • Embed single Youtube videos
  • Embed Youtube playlists
  • Show thumbnails, titles, duration and views for every video of the playlist, near the video
    . With a click the video of the playlist can be loaded and played in the main video
  • Configure the max number of videos of the playlist showed in the youtube_player playlist
  • Autoplay can be configured
  • Loop of single videos or entire playlists can be configured
  • Player dimensions can be set
  • Max title length can be set. If the title of the song in the playlist exceed this value it will be truncated
  • Jcarousel can be enabled to guarantee better scrolling of the playlists for mobile devices
  • Requirements

    Recommended modules

    Similar projects

    The best module used to embed YouTube videos in Drupal websites is Media: YouTube. The biggest difference between this one and our player is the implementation of playlists.

    Some differences with Media: YouTube

      Media: YouTube Weblitz Youtube Player
    Visibility CCK based Block based
    Support playlists no yes
    Show playlists with thumbs, title and duration no yes
    Loop video playlists no yes
    jCarousel scrolling playlist support no yes

    From this module you can set:

    • The autostart of video
    • If the playlist should loop
    • The number of characters of the video title
    • Video dimensions
    • jCarousel support for mobile devices

    We choose jCarousel module to guarantee a good scroll of the playlist video in the playlist <div> even in the mobile devices (instead the "overflow:auto" standard taken from YouTube website).

    A basic css stylesheet has been developed (youtube_player.css in the root directory). From this you can modify dimensions and colors of all the <div> involved; this is for both desktop and mobile version.

    Multiblock module has been implemented to generate different blocks, with different configurations.

    Please read the README.TXT for more informations on module installation.

    Here you can see a youtube module in action.

    Project URL: http://drupal.org/sandbox/weblitz/1315814

    GIT Repository: git clone --branch master weblitz@git.drupal.org:sandbox/weblitz/1315814.git youtube_player

    Drupal version : 6.x

Comments

klausi’s picture

Status: Needs review » Needs work

libraries folder: 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.

weblitz’s picture

Thank you klausi...I deleted the directory as you suggest: I'm developing a new version compliant with lib policies and when it will be ready on git, I'll post a new message.

weblitz’s picture

Status: Needs work » Needs review

I committed a version without external libraries inclusion in module. Now the module uses 'libraries' module and explains in the README file how to install all necessary libraries.

weblitz’s picture

The new committed version has a lot of new features:
1) Validation on block configuration form
2) New looping functionality
3) Playlist GData retrival of playlist with more than 50 videos (with repeating paginated calls)

doitDave’s picture

Status: Needs work » Needs review
StatusFileSize
new13.02 KB

Hi,

Automated review (Please keep in mind that this is primarily a high level check that does not replace but, after all, eases the review process. There is no guarantee that no other issues could show up in a more in-depth manual follow-up review.)

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:

  • 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/youtube_player.module:
     +10: [normal] String concatenation should be formatted with a space separating the operators (dot .) and the surrounding terms
     +27: [minor] Comment should be read "Implements hook_foo()."
     +36: [normal] String concatenation should be formatted with a space separating the operators (dot .) and the surrounding terms
    (...most entries removed; see attachment...)
     +302: [normal] Menu item titles and descriptions should NOT be enclosed within t().
     +312: [minor] indent secondary line of comment one space 
     +312: [minor] Format should be * Implements hook_foo().
     +313: [minor] indent secondary line of comment one space 
    
    Status Messages:
     Coder found 1 projects, 1 files, 43 normal warnings, 4 minor warnings, 0 warnings were flagged to be ignored
    
  • Lines in README.txt should not exceed 80 characters, see the guidelines for in-project documentation.
  • Remove LICENSE.txt, it will be added by drupal.org packaging automatically.
  • @file doc block is missing in the module file, see http://drupal.org/node/1354#files .
  • Comments: there should be a space after "//", see http://drupal.org/node/1354#inline
    youtube_player.module:33:  //TODO: dynamic forms
    youtube_player.module:214://validation block configuration
    youtube_player.module:228://numeric fields
    youtube_player.module:260:  //youtube fields
    
  • Comments should be on a separate line before the code line, see http://drupal.org/node/1354#inline
    ./youtube_player.module:14:} // function css_block_editor_help
    ./youtube_player.module:23:} // function youtube_player_perm()
    ./youtube_player.module:212:} // function youtube_player_block
    
  • ./youtube_player.install: all functions should have doxygen doc blocks, see http://drupal.org/node/1354#functions
    
    function youtube_player_install() {
    --
    
    function youtube_player_uninstall() {
    
  • ./includes/views/mobile.inc: all functions should have doxygen doc blocks, see http://drupal.org/node/1354#functions
     
    function printplaylistparam' . $multi_id . '(playlistIndex,videoids,videoindexes){
    
  • ./includes/utils/playlist.inc: all functions should have doxygen doc blocks, see http://drupal.org/node/1354#functions
    
    function printvideoarray($playlistlistfeed, $playlistid, $yt, $multi_id, $playlistmaxvideos) {
    
  • ./youtube_player.module: all functions should have doxygen doc blocks, see http://drupal.org/node/1354#functions
    
    function youtube_player_help($path, $arg) {
    --
    
    function _youtube_player_validate($form, &$form_state) {
    --
    
    function youtube_player_admin() {
    --
    
    function youtube_player_menu() {
    --
    
    function create_content($block, $multi_id) {
    
  • ./includes/utils/playlist.inc: all functions should be prefixed with your module/theme name to avoid name clashes. See http://drupal.org/node/318#naming
    function getplaylistvideos($playlistlistfeed, $playlistid, $yt, $playlistmaxvideos) {
    function getfirstvideoid($playlistlistfeed, $playlistid, $yt) {
    function printvideoarray($playlistlistfeed, $playlistid, $yt, $multi_id, $playlistmaxvideos) {
    function printplaylistlistfeed($playlistlistfeed, $playlistid, $showplaylistcontents, $ismobiledevice, $isjcarouselenabled, $yt, $maxtitlelength, $multi_id, $playlistmaxvideos) {
    function printplaylistlistentry($playlistid, $playlistlistentry, $showplaylistcontents = FALSE, $ismobiledevice, $isjcarouselenabled, $yt, $maxtitlelength, $multi_id, $playlistmaxvideos) {
    function printvideoentry($playlistid, $videoentry, $ismobiledevice, $isjcarouselenabled, $maxtitlelength, $multi_id) {
    function formatduration($seconds) {
    function formatvideotitle($title, $maxlength) {
    
  • ./youtube_player.module: all functions should be prefixed with your module/theme name to avoid name clashes. See http://drupal.org/node/318#naming
    function create_content($block, $multi_id) {
    
  • ./includes/utils/Mobile_Detect.inc: The description on the line after the @param/@return documentation is either missing or not formatted correctly. See http://drupal.org/node/1354#functions
    60-	 */
    74-	 */
    
  • ./youtube_player.module: The description on the line after the @param/@return documentation is either missing or not formatted correctly. See http://drupal.org/node/1354#functions
    20- */
    31- */
    
  • There should be a space before and after operators like ==, ===, && and ||. See http://drupal.org/node/318#controlstruct
    includes/utils/playlist.inc:13:       if ($playlistid==$playlistlistentry->playlistId->text) {
    includes/utils/playlist.inc:63:    if ($playlistid==$playlistlistentry->playlistId->text) {
    
  • Bad line endings were found, always use unix style terminators. See http://drupal.org/coding-standards#indenting
    ./youtube_player.css:                       ASCII C program text, with CRLF line terminators
    ./skins/youtube_player/skin.css:            ASCII text, with CRLF line terminators
    ./youtube_player.info:                      ASCII text, with CRLF line terminators
    includes/views/mobile.inc
    includes/views/browser.inc
    includes/utils/Mobile_Detect.inc
    includes/utils/playlist.inc
    skins/youtube_player/skin.css
    youtube_player.css
    youtube_player.info
    youtube_player.install
    youtube_player.module
    
  • There should be no space after the opening "(" of an array, see http://drupal.org/node/318#array
    youtube_player.module:50:  '#options' => array( 0 => t('No'), 1 => t('Yes')),
    youtube_player.module:70:    '#options' => array( 0 => t('No'), 1 => t('Yes')),
    youtube_player.module:80:    '#options' => array( 0 => t('No'), 1 => t('Yes')),
    youtube_player.module:170:  '#options' => array( 0 => t('No'), 1 => t('Yes')),
    
  • Assignments should have a space before and after the operator, see http://drupal.org/node/318#operators
    ./includes/views/mobile.inc:42:    for(i=0;i<videoindexes.length;i++){
    ./includes/views/mobile.inc:55:  for(i=0;i<videoindexes.length;i++){
    
  • Classes and Interfaces should use UpperCamel naming. See http://drupal.org/node/608152
    ./includes/utils/Mobile_Detect.inc:7:class Mobile_Detect
    
  • All text files should end in a single newline (\n). See http://drupal.org/node/318#indenting
    ./youtube_player.css ./youtube_player.install ./skins/youtube_player/skin.css ./README.txt ./includes/views/mobile.inc ./includes/views/browser.inc ./includes/utils/Mobile_Detect.inc ./includes/utils/playlist.inc ./LICENSE.txt ./youtube_player.module ./youtube_player.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.

Edit: Manual review:

  • You should really clarify about similar modules as duplication is a big issue on d.o. If your module offers something yet unimplemented, please first check whether you should raise an issue towards one of the existing projects. Or, if your project totally differs from the others, please clarify the differences. Don't feel discouraged; your initiative is really appreciated! Anyhow, there are many ways to contribute to Drupal :)
  • HTH, dave

doitDave’s picture

Status: Needs review » Needs work
weblitz’s picture

I tried to resolve all issues raised by doitDave.
I commit all modifications in a new branch called "6.x-2.x".
I also test with success using pareview.sh in my local ubuntu server.
I modify also the description of the project to explain that playlist creation is unimplemented in other similar projects.

doitDave’s picture

Status: Needs review » Needs work

I modify also the description of the project to explain that playlist creation is unimplemented in other similar projects.

Did I miss something? I cannot find this anywhere, at least not in the sense it is meant to be. It would _really_ be a good idea to have section like "The modules foo and bar do something similar, but the notable difference is $difference". Just switch roles into a site builder who has done a module search and needs to decide. If you find that there is only one (but nevertheless important) point missing in already existing modules, you should

  • either raise an issue ("feature request") and include your proposed additions in a patch,
  • or start a project that extends an existing module (as, in most cases, there are many possibilities to hook into their flow),
  • or even contact the maintainers and apply as a co-maintainer. This, in many cases (and IMHPO!) is the most worthwile way in such cases.

Nevertheless it may be that all these suggestions are not appropriate here, but in that case you should _really_ do more clarification on that.

No offense!
dave

weblitz’s picture

hi Dave

Thanks for the reply.

We have developed this module from scratch for a society, but we like to share it with the community, because we think it could be quite interesting. Obviously the best module for embedding youtube videos was the media module with the media:youtube module. The problem for this module is that It cannot detect the code for a playlist, ONLY for single youtube videos (even if a patch has been submitted, I cannot make it work for playlist - http://drupal.org/node/177207 )

The goal of our module is to create a complete videogallery from a youtube playlist

The differences between media:youtube and our player are:

- media:youtube is CCK based. Youtube player generates a block. Multiple blocks can be created using multiblock module.

- media:youtube does not support playlist code. Youtube player supports playlists. So a playlist can be embedded in the block.

Other important features, implemented in the block configuration, are:

- The starting video of the playlist can be choosed
- You can decide how many videos of that playlist are showed
- You can choose if the video of the playlist is played as a single video or the playlist is looped.
- MOST IMPORTANT: the playlist itself can be showed as a column near the video div and the videos can be played from the playlist like in the standard youtube website.
- In the playlist thumbnails, title of the video and duration can be showed
- To fit best in a mobile scenario, a custom jcarousel skin has been developed to scroll the videos in mobile devices. Automatical user agent for mobile is implemented.
- Some other options like colors of text, background, truncation of the title, ... have been implemented.

I think this module is quite different from media module and can be interesting for the community to make real video galleries using youtube playlists. you can see an example in this website -> http://test.energyprod.it/tv

Thanks,

Best regards,

Michelangelo Roberti

doitDave’s picture

Hi,

thank you for the clarification. It would be really important to add all this information to your project page and also to the issue description here. Maybe you want to check with http://drupal.org/node/997024 for some tips regarding your project description.

Also, don't forget to set your status back to needs review.

Cheers!

doitDave’s picture

Issue summary: View changes

define git clone

weblitz’s picture

Issue summary: View changes

Added a more detailed description of this module

weblitz’s picture

Issue summary: View changes

New more detailed description

weblitz’s picture

Status: Needs work » Needs review

I modified the informations on this issue page and Project page as suggested on http://growingventuresolutions.com/blog/module-owners-how-make-your-modu...

weblitz’s picture

Should I do something more now to publish the module?

patrickd’s picture

Status: Needs review » Needs work
weblitz’s picture

Status: Needs work » Needs review

I solved formatting issues as raising from http://ventral.org/pareview/httpgitdrupalorgsandboxweblitz1315814git.

Thank you patrickd!!!

weblitz’s picture

What's the next step?

weblitz’s picture

is there something else to do?

weblitz’s picture

How can I publish this module?????

patrickd’s picture

Sorry for the delay. Please be patient and wait for an in-depht review. As there came lots of new application through the holidays and we have only few people reviewing (I'm currently quite busy with my studies) this will take some time.

Please think about helping by reviewing other applications.

Also note that it's best practice to review applications with the oldest "last update" status first, so it's quite contraproductive to bump your issue periodically.

regards

jjclint’s picture

@weblitz

I'm extremely interested in your module but I'm running on D7 I think that with the shift from D6 to D7 this should really be ported.

Also this patch for media youtube 6.x is a possible (though a bit limited) solution for playing whole youtube playlists on Drupal 6: http://drupal.org/node/675324

themebrain’s picture

klausi’s picture

Status: Needs review » Needs work

@themebrain: please do not paste the full output of automated tools as this will just clutter the application issue. Better add it as attachment instead.

themebrain’s picture

StatusFileSize
new32.5 KB

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 6.x-2.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.

There're some issues are listed in attachment, please resolve them

weblitz’s picture

@jjclint
Now we are focusing on publishing D6 version, the next step is to port to D7. For this reason I can't tell you when we'll work on D7. Sorry and thank you for your interest.

weblitz’s picture

Status: Needs work » Needs review

@ themebrain

I solved formatting issues from Pareview.sh

Thank you!!!

klausi’s picture

Status: Needs review » Needs work
StatusFileSize
new3.83 KB

Sorry for the delay, but you have not listed any reviews of other project applications in your issue summary as strongly recommended here: http://drupal.org/node/1011698

Review of the 6.x-2.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:

  1. youtube_player_install(): empty function, so remove it. Same for youtube_player_init().
  2. youtube_player_admin(): doc block: hook_admin() does not exist? See http://drupal.org/node/1354#forms
  3. youtube_player_menu(): "do not include documentation of the parameters and return values -- this should be in the hook definition documentation, not in the hook implementation documentation." See http://drupal.org/node/1354#hookimpl
  4. "'access arguments' => array('access administration pages'),": The administration menu callback should probably use "administer site configuration" - which implies the user can change something - rather than "access administration pages" which is about viewing but not changing configurations. Or you could of course provide your own permission.
  5. .settings folder: this looks like an IDE configuration thing, remove that from your repository.
  6. "@license http://www.opensource.org/licenses/mit-license.php The MIT License": all code on drupal.org is GPL, so remove that license hint. Or is this a library copied from some external source?
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

more detailed description