My name is Vlad Rosca and I am a software developer for Zitec - a Romanian software company.
- http://www.zitec.com/outsourcing-software-romania.html
One of the company's long term projects is VideoPublishing which provides online video publishing solutions for businesses, publishers, video professionals and website owners.
- see http://videopublishing.com/ for more details
Currently I am working on a new Drupal project that requires VideoPublishing integration. As a result I wrote a module to accomplish this task and i would like to contribute it.
The module provides all the basic features we need so far:
1. Global Settings Page - where admins can set
- a default video player (select)
- content types that leverage videopublishing functionality (checkboxes)
- other minor settings (show videos in teasers-on/off, video weight, toggle display of video information)
2. Node specific settings
- select video player
- upload video to videopublishing.com (or provide a video id - video ids are provided by videopublishing.com)
Future development plans:
- videopublishing CCK field
- more extensive mapping of the videopublishing API
| Comment | File | Size | Author |
|---|---|---|---|
| #17 | videopublishing.zip | 10 KB | VladRM |
| #15 | videopublishing.zip | 10.04 KB | VladRM |
| #14 | videopublishing.zip | 9.29 KB | VladRM |
| #12 | videopublishing.zip | 32.24 KB | VladRM |
| #9 | videopublishing.zip | 32.27 KB | VladRM |
Comments
Comment #1
VladRM commentedHi,
I attached the videopublishing module in zip format.
EDIT: Please use the upload attached to the next comment instead. I made the mistake of uploading the dev version, not the stable one.
Comment #2
VladRM commentedPlease ignore the previous upload and use the one attached to this comment.
Comment #3
avpadernoThat line should be removed from the file.
hook_init()is called only on pages that are not cached; depending on the case, this could cause some problems, especially if the code always needs the code present in the included files.See the Drupal coding standards to understand how a module code should be written.
If the code is not doing anything when
$opis equal topresave, then there is no need to write that code.Schema description should not be passed to
t().If you are using feature specific of PHP5, then you should declare the dependency of the module from PHP5, as Drupal 6 still support PHP4.
If it doesn't do anything, why is the ELSE-statement present?
The name of the functions are not the one defined from the module.
It would be better to use
variable_get('videopublishing_content_types', ''); I am not sureexplode()is able to handleNULL.The options used in a form field should present to the user a translatable string.
Use the correct placeholders.
Comment #4
avpadernoFor the previous point #3, the code doesn't use the correct indentation.
Comment #5
VladRM commentedHello,
Thank you for the feedback.
2. hook_init()
- it did cause some problems so i added:
to the hook_nodeapi where the files were required but not included.
Should I completely remove the hook_init() and move the module_load_include(s) to the hook_nodeapi and wherever else they might be needed?
8. "The name of the functions are not the one defined from the module."
I'm not sure I understand. The functions mentioned above are defined in videopublishing_forms.inc.
----
The other issues are resolved.
I attached a new version of the module (added functionality and fixed the issues above).
Comment #6
avpadernohook_init()), then the functions are not found.Comment #7
VladRM commentedI removed hook_init() and used:
in videopublishing.module instead.
Sorry but I don't understand point 3. from your previous comment (#6). I reread http://drupal.org/coding-standards but did not find anything about 'which functions should be used from the module'.
Comment #8
avpadernorequire_once()is relative to Drupal root directory; therefore the files are not found as they are in the module directory.It should be better to use
module_load_include().To notice that the coding standards are not only a book page. At the bottom of the first page you find the links to the child pages; one of the those child pages reports which functions should be used (the page says ).
Comment #9
VladRM commentedHello,
1. I used module_load_include() instead of require_once().
2. Replaced the string functions with the drupal wrappers.
--
3. Replaced some tabs with spaces.
Comment #10
VladRM commentedStatus->Needs review
Comment #11
avpadernoThe first argument of
t()should be a literal string; differently, the string will not be added in the translation template, and who translates the module would be able to translate that string. Using the Drupal translation system it is not possible to translate dynamically generated strings (if they don't uset()placeholders).The indentation character is not correct.
The code is not formatted as suggested by the coding standards.
Comment #12
VladRM commentedHello,
I addressed the issues in your previous comment (and a few others I noticed regarding coding standards) but I have a few questions:
@5. Why should I remove the content of the VideoPublising directory?
- it includes the Videopublishing API
The code in videopublishing_api.inc is only a (drupal - videopublishing api) bridge
@4. I used module_load_include() instead. Was this the issue or did I miss the point?
Comment #13
avpadernoThe library is available from a third-party site; in that case, it should not included in Drupal.org CVS.
Also, files from other projects should not be committed in Drupal.org CVS; if you would create (in example) a jQuery plugin, you should probably make it available from a different server.
Comment #14
VladRM commentedThank you for the info.
I removed the contents of the VideoPublishing subdirectory and added a README.txt file to help users with the install process.
Comment #15
VladRM commentedModule Update:
- videopublishing.info file: changed php = 5 to php = 5.1.2
- videopublishing_api.inc bootstrap (users no longer need the VideoPublishing/config directory or the bootstrap.php file)
- the configuration options were moved to the admin/settings/videopublishing page
- videopublishing_forms.inc modified to accomodate the new config options + a new feature:
- the users may choose between a select list and an autocomplete field for Video ID selection
- README.txt file - small changes to installation instructions and php requirements
Comment #16
avpadernoDrupal modules normally use
drupal_get_path().Thank you for your contribution! I am going to update your account.
These are some recommended readings to help with excellent maintainership:
You can find more contributors chatting on the IRC #drupal-contribute channel. So, come hang out and stay involved.
Thank you, 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.
I thank all the dedicated reviewers as well.
Comment #17
VladRM commented1. Indeed, I replaced it with:
2. I removed the VideoPublishing directory and added the necessary instructions for the users in the README.txt file. Should I add a generic (empty maybe) README.txt file in the VideoPublishing subdirectory so that CVS will add it (and not treat it as an empty directory)?
3. Done
---
4. Bugfix + replaced some tabs with spaces (found them in the .install file)
Thank you very much for your help! I really appreciate it.
Comment #19
mariusilie commentedany updates on this module? I submitted some issues on this project. Also, are there any plans on extending this module? because right now it doesn't uses the full API of the videopublishing.com
Comment #20
avpaderno