Thanks in advance for your review!!

Actually for a client I need the feature of embeding youtube videos in nodes + uploading videos directly to youtube from drupal. I searched for available modules but did not find any. Then I accomplished the task using a couple of modules mentioned below.

  • Media
  • Media_youtube
  • Media_derivatives
  • Media_derivatives_youtube
  • youtube_derivatives_formatter

So I thought of creating a module for youtube integration. This module uploads videos directly to youtube. No server load, becouse the file is directly moved to youtube and drupal just stores the 11 character youtube story id.

-- About --

This is a D7 module

A module to embed and upload videos to youtube from drupal. Provides a youtube cck field which can be used with youtube URL or uploading a video directly to youtube.


1. Adding Zend-Google Gdata library :
Firstly, you will need to download the latest version Zend Gdata library from ""
Once downloaded you need to add a folder ("Zend_Gdata") in sites/all/libraries. So the complete path to the folder will be sites/all/libraries/Zend_Gdata
Now extract Zend_Gdata library and navigate to Zend_Gdata-X.XX > library. You will find a folder named "Zend". Copy it and paste in sites/all/libraries/Zend_Gdata

2. Installing and configuring the module
Install as usual, Download the module and paste it in sites/all/modules.
Activate the module in admin/modules.
Navigate to admin/config. In the right side block find "Youtube Engine Settings". Click on the link.
Fill the form. Your google email id and password.
To Obtain the youtube developer key goto "visit" and register a product. Then Copy the developer key and paste in the form and save it.

3. Adding the youtube field.
Goto "admin/structure/types" and select manage fields in any content type.
Create a new CCk field. Select Field type as "youtube".
Click on save settings do not change any settings other than required field setting, Multifield is currently not supported.

-- Project Page --

-- Git --
git clone --recursive --branch 7.x-1.x youtube_video_uploader
cd youtube_video_uploader



first of all there are quite a few issues to sort out such as indentation, whitespace.

You can find them all here:

Here you can check source code whether it meets drupal coding standards or not, and advise you what to change in your code. You can repeat review after your commits, and can fix those errors.

Status:Needs review» Needs work

Manual Review:

1) There is no hook_uninstall to remove your custom variables from database like: youtube_engine_email... , youtube_engine_password.. present in your module file.

2) Use variable_del() to remove custom variables & prefix variable name wuth your module name i.e. "youtube_video_uploader_engine _email" etc.

3) Do not use files[] in .info file to add you module & install file. They are for adding class files.

Status:Needs work» Needs review
new34.75 KB

Hi osscube,

Thank you for spending your valuable time to review my code. Actually I have used coder module to review the code but It seems that is better than any. I have done everything you suggested, will you please review the code again.

Thank you.

Status:Needs review» Needs work

Hi sunnyuff,

It seems that Media youtube provides very similar functionality. Could you describe how your module differs?
We prefer collaboration over competition, therefore we want to prevent having duplicating modules on If the differences between these modules are not too fundamental for patching the existing one, we would love to see you joining forces and concentrate all power on enhancing one module.
If the existing module is abandoned, please think about taking it over instead of creating a new one.

Automated review:

please get a review bonus first. Then try to fix issues raised by automated review tools and set this back to "needs review".

Status:Needs work» Needs review

Hi anwar_max,

Thank you very much for your effort. Here under, you will find the differences and reasons why "Youtube Video Uploader" is more lightweight, provides clean interface etc as compared to other modules currently available.

1. The main difference between any other module currently available (including Media youtube ) and "Youtube Video Uploader" in my opinion is that the focus of this module is to provide a clean interface for uploading videos directly to Youtube and fomatters to display them. It uses the Zend Gdata library to communicate to the Youtube API and implements the "browser upload method" so the video file never hits the Drupal file system. Drupal just stores the unique 11 character Youtube story ID. It saves two most valuable resources in web technologies i,e. "storage and bandwidth". Media module does not provides the functionality to upload videos to Youtube instead it just provides the ability to embed Youtube videos.

3. As I mentioned, in my first comment to replicate the functionality this module provides, I had to use a couple of modules viz.

  1. Media
  2. Media_youtube
  3. Media_derivatives
  4. Media_derivatives_youtube
  5. youtube_derivatives_formatter

After all of the complex configurations combining the five modules and fixing the internal bugs finally I was able to upload videos to youtube but my site became slow. All of my videos are placed in drupal file system, means videos are first uploaded in drupal then in youtube. That is why I thought of creating this module.

DRUPAL COMMUNITY : Please share your thoughts and suggestions, it really helps.

Status:Needs review» Needs work

Hello sunnyuff,

Great module idea, I've started thinking of doing something similar for soundcloud.
Is their not the possibility of integration with Media and the Media integrated youtube modules?
And by the way the git command in the issue isn't the one for non maintainers,
Go to your sandboxes version control select non-maintainer and show and then use the code with straightforward
Automated Review:

There are only some minor issues here:

Manual Review:

1. Firstly you need to change master branch to a version specific branch, more about that here:

2. The User Password input should be encrypted and a normal password field.

3. Calling the Youtube Video Uploader Youtube Engine in configuration seems bad practice you should stick to the name of the module for the sake of UX and call it Youtube Video Uploader settings.

4. It is probably worth changing some variable names like $yt to something more self explanatory.

5. Remove the youtube_video_uploader_install() function as it is empty and not being used.

Hello fr3shw3b,

Thank you for the review. Your comment really helped. I have implemented almost all of your suggestions, please check.

  1. Version Specific Branch : Done
  2. User Password : Done(*)
  3. Youtube Video Uploader Youtube Engine (name change) : Done
  4. Variables names : Done
  5. Function install : Done

But I have not encrypted the password. I have checked many contributed modules and for third Party services they are just using textfield/password for saving passwords. Some people are using "base64" but since I have to send the password to Youtube APIs, I cannot use MD5 (one-way hash algorithm). Again, it doesn't matter if it's Base64 encoded or triple-DES 168-bit encryption - they are reversible, so it is exactly as secure as not encoding it at all.

So, I request you to please help me with this, if possible.

NOTE : (Integration with media) Not required, becouse media module is a module which provides framework for handling media and files But here we are just integrating Youtube with Drupal without any videos hitting Drupal. As I already mentioned in my comments, this module just stores 11 charcter Youtube Story id, i,e no media is associated with Drupal. So in this case, integration this simple and lightweight module with a framework like media module provides will unnecessarily increase the server load, user configurations etc. for people who just wants youtube as their video hosting provider.


Sunny Jhunjhunwala.

Status:Needs work» Needs review

Sorry, I forgot to change the status of the issue to "needs review".

Status:Needs review» Needs work


I understand about password encryption and that the media module servers a different purpose.

- On line 377 with the $http_client variable you want to format it so the code is inline with the function being called.

- Where you use require_once a few times for library files couldn't you use the libraries load function as oppose to getting the library path and then setting the include path and requiring each script once?

- The story id naming convention could be changed to developer id to be more self explanatory if i'm following the code correctly.

- You could also seperate the module file to break it down and reduce the size by using include files. You would put all functions to do with admin settings and the form functions for the multi-step upload form in one, possibly all theme/page output pages in another and anything else you might find is worth putting in it's own include for the greater clarity and structure. I'd then best advise to put all these includes in an includes folder.

Category:support» task

Changed category to task.
read here:

Hi fr3shw3b ,

Thank you for the comment. Let me tell you what i did this time.

1. On line 377 -- DONE.
2. require_once -- Firstly, i tried to use libraries load only, but Zend library internally could not load some of the files, then i used libraries_get_path.
3. story id is the id of the video uploaded to youtube. Its a 11 character long unique video id. Many Youtube discussions mention it as story id so, I have also used story id.
4. break it down and reduce the size by using include files : Great suggestion, -- DONE.

Your comments really helped, the module looks in a quite decent structure now.
I have many modifications and features in pipeline, I will keep adding new features as required.

Thank you.

Note : I did not understand your last comment.

Status:Needs work» Needs review

Sorry, I forgot to change the status of the issue to "needs review" again.

Status:Needs review» Postponed (maintainer needs more info)

I didn't think to look before, taking your word for it but this already exists for Drupal 6.
This particular module's status is seeking a new maintainer so it is best if you overtake that module if it is possible and integrate your needs for Drupal 7 into that. It would be bad to have to modules with the same name even if they were for different version of Drupal as they do the same thing and it's best if it's all integrated into one thing as you may know the as a community we are into collaboration over competition.

The maintainer specifically states

If you are interested in maintaining this module as an alternative to the Media module in Drupal 7, please contact me.

Sorry about not picking up on this earlier.

Status:Postponed (maintainer needs more info)» Closed (won't fix)

Closing due to lack of activity. Feel free to reopen if you are still working on this application.

I'm a robot and this is an automated message from Project Applications Scraper.

Issue summary:View changes

changed branch specific 7.x

Category:Task» Support request
Issue summary:View changes
Status:Closed (won't fix)» Needs review

Hi All,

Last time I created this module because I needed something similar for a client project, and after a year I am here again.

I think we should make this module available for the community, today I searched for all available options for youtube video field and I did not find anything. Also, the functionality of both adding a youtube url or a video upload directly to youtube is not seen in any of those.

If we see the time, its almost a year I waited for, if nothing is coming from the old module creators, I think its a justifiable reason to make this one available for the community.

I reopened this only because I got comments from people asking about its release date ? I do not have any answers, I like the community to answer on it.


Sunny J.

Category:Support request» Task
Status:Needs review» Postponed (maintainer needs more info)

Project applications are tasks.

Could you answer the question from comment #13 first?

Module duplication and fragmentation is a huge problem on and we prefer collaboration over competition. Please open an issue in the video_upload issue queue to discuss what you need. You should also get in contact with the maintainer(s) to offer your help to move the project forward. If you cannot reach the maintainer(s) please follow the abandoned project process.

If that fails for whatever reason please get back to us and set this back to "needs review".

Status:Postponed (maintainer needs more info)» Needs review

Hi klausi,

Thanks for the quick reply. I respect the community and I myself do not like module duplication. I have contracted the maintainers of video_upload before, they told me that they are trying to port the drupal 6 version of their module to drupal 7, and they need coders who can do it. But they do not want my module to be used as a D7 version of video_upload. And if you see there is no activity from their side within last couple of years.

Last time only I tried to combine my code with their but their version is too complicated and needs a lot of work to be done, I do not mind to place this module as a D7 version of video_upload if the maintainers are okie with it, but I seriously cannot start coding from begining to make their module compatible with D7.


Sunny J.

Hi Guys,
I wish, if i can get a release on Christmas or new year, please review and suggest me the next step.


243   $username = t(variable_get('youtube_video_uploader_engine_email', ''));
244   $password = t(variable_get('youtube_video_uploader_engine_password', ''));
245   $developer_key = t(variable_get('youtube_video_uploader_engine_dev_key', ''));

Why are you passing this trough t() ?

262     youtube_get_video_status($story_id);

Should this be a call to youtube_video_uploader_get_video_status(), if so will this keep calling itself until it succeeds? If so there should be some kind of failsafe preventing it from and indefinite loop.

  10 module_load_include('inc', 'youtube_video_uploader', 'youtube_video_uploader.admin');

Instead of loading this file every time. Consider loading it with a file property in the hook_menu()

access administration vs. administer site configuration
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.

Hi sunnyuff,

Some suggestions for your module:

There are many strings all over the code that should be translatable via the t() function.

There is likely typo in 'Videblog' (youtube_video_uploader.module line 188). It should probably read 'Videoblog'.

The word 'youtube', when appearing in human-readable strings, should probably be capitalized as in 'YouTube'.

It seems that the 'Implements hook_...' comment was deleted in some functions. This would make it more difficult for maintainers to understand your code.

Hi xqus and Alexxikon,

Thank you for testing and providing your feedback.

@xqus :

1. unnecessary t(), by mistake, fixed.
2. youtube_video_uploader_get_video_status - that is not in use currently, removed the unused code, fixed.
3. Instead of loading this file every time. Consider loading it with a file property in the hook_menu() -- great suggestion, fixed.
4. access administration vs. administer site configuration -- fixed.

@Alexxikon :

1. Added t() where necessary.
2. typo in 'Videblog', fixed all youtube categories.
3. The word 'youtube', fixed with YouTube.
4. Code cleanup and added code signatures.

sorry guys got lil busy due to office work, so was not able to update as planned.

Status:Needs review» Needs work

I'm still seeing a lot of things that could be cleaned up from PAReview:

It looks like you are still using t() functions in hook menu and have some unused variables declared.

Also, it looks like you might still have the master branch. You probably want to remove this, so PAReview (as mentioned in comment #6

Status:Needs work» Needs review

Hello zhuber,

PAReview, code clean-up done. Now the default branch is 7.x-1.x

Thanks for the review.

Hello Team,

Please let me know the next steps,


Hi sunnyyuff, I had issues with Chrome Version 32.0.1700.102 (latest) accepting Youtube response to "youtube_uploader/nexturl" menu link after the video was uploaded. I was getting "No 'Access-Control-Allow-Origin'" headers error

I understand in yu.js line 87 you wrap the json response in submitToYoutube method with a success callback, though im not sure why this was throwing an error as it seems like it should work.

I got around this by downloading and enabling CORS module and updated the config to accept YouTube request to "youtube_uploader/nexturl".

Hi PrineShazar,

I am so sorry that you faced so much trouble, I have checked the module with a few available options with me, details below.

MAC OS X (10.9.1)

Chrome Version 32.0.1700.107
Safari Version 7.0.1 (9537.73.11)
Firefox v 27.0

I did not faced any problem in my initial check, i am checking this in detail. In the meantime, if you have any more info on that please fell free to post.
Btw, very clever decision of using CORS module.

Hi PrineShazar,

I have tested the module in many environment including windows 7, Mac OS and Ubuntu. I am not able to reproduce the issue. If you are still facing the issue please let me know.

Status:Needs review» Needs work

PAReview is still reporting issues in this module. Please have them fixed before manual reviews.

Note: these are not application Blockers

Status:Needs work» Needs review

new114.92 KB

Hello Sunny,
the module seems to be solving my problem but I got the following error in 1st step
I have followed the configuration steps properly.

Thanks a lot for your assistance.
You were right, the problem was with the credential. Now it is working perfectly fine for me.

This Module is really lightweight and solved my purpose. I am using it in the next version of
I highly recommend this module to someone who wants to upload videos directly to youtube transparently.

Priority:Normal» Major

Hi Guys,

Its now a long time I am waiting for publish of this module, people are contacting me on fb and mail for support, please respond about the next step.



Priority:Major» Normal

Hi sunnyuff,

I feel your pain. Have been in the applications queue for over a year now myself. If you need some comfort, I found those comments about the review process: Seems we are not the only ones stuck.

It's a small thing, but could you correct the git command at the top to reflect the new branch 7.x-1.x? It just speeds things up for reviewers.

It should be
git clone --recursive --branch 7.x-1.x youtube_video_uploader
git clone --recursive --branch 7.x youtube_video_uploader

Once I installed the Zend folder in sites/all/libraries and enabled the module everything worked like it described.

You still got three pareview errors that should be easy to fix.

Good luck with your project.

Status:Needs review» Reviewed & tested by the community

I forgot to change the status when posting my last comment.

Issue summary:View changes

Hi Nsuit,

Thanks for the update, I forgot to update the copy when I updated to new branch.

All pareview errors are only for indentation, the Readme one is for more than 80 character, but that was a url and i was adding it inside quotes, so i removed the quotes and its fixed.

But whatever i do for the other its ask me the vise-versa. Please check two screen-shots i attached.

1. Screen Shot 2014-04-13 at 12.34.18.png
2. Screen Shot 2014-04-13 at 12.33.53.png