The module I have written allows you to a JW Player to a page using an input filter.
You can put players with different configurations on the page by choosing a different value for the filter.
You can add new 'Profiles', which the module detects, and adds the flash configuration variables to the player based on the ones specified by the profile.
The reason I created this module was because I wanted a way of adding media files to a page very easily, and a configurable input format seemed to be the perfect idea.
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | player.zip | 32.73 KB | kpbowler |
| #3 | player.zip | 81.98 KB | kpbowler |
| #2 | player.zip | 81.99 KB | kpbowler |
| #1 | player.zip | 82.09 KB | kpbowler |
Comments
Comment #1
kpbowler commentedThe included zip file includes all the source for the Player Module.
I have gone through all the source this morning and attempted to make it conform to the Drupal Coding Standards. Would appreciate someone with more Drupal experience looking over the code and letting me know if it is ready to be included in the Contrib repository or if it needs work. I am comitted to the future of this module, so would like to know where to go next.
Thanks.
Kev.
Comment #2
kpbowler commentedSorry, I hadn't finished editing the .info file in the previous post.
This new file has the correct information in it.
Comment #3
kpbowler commentedOk, Ive just ran the code through the code-style.pl script, and cleaned up as many of the issues as possible.
The ones that are left are all issues with either a regular expression that needs to check form the presence of upper case text, or are encased in strings which output javascript. These string must have uppercase letters in them for the javascript function names (swfobject.embedSWF for example).
Comment #4
avpadernoComment #5
avpadernoIn Drupal, only the first word is capital case; the other words are lower case.
There is no need to set Drupal variables to a default value.
Descriptions should not be passed to
t()anymore; here there is another error too.Constants defined from the module must respect the namespace; here there is another error too.
Comment #6
kpbowler commentedOk, thank you for the feedback. I'll fix the issues above and re-submit.
One question though, is point three and error? Can I set Drupal variables here or not? Is there a rule over variable_set practice?
Thank you for your time.
Kev.
Comment #7
avpadernoThe second paramenter of
variable_get()is the value returned by the function when the Drupal variable has not been already set (in other words, it's the default value for the Drupal variable). It's perfectly useless to set a Drupal variable to its default value whenvariable_get()accepts a value that is used as default value.Comment #8
kpbowler commentedOk, that make sense. Thanks! Working on it now.
Kev.
Comment #9
kpbowler commentedNew improved version:
Removed links to non - GPL files
Sorted out capitalization and spelling errors
Removed defaults for variable_sets
Removed t() form all descriptions
Cleaned up the use of $_SERVER by adding a function to check and clean the variable (uses drupal_valid_http_host and check_plain)
Added a License
Ran all files through code-style.pl - only errors are in strings to create Javascript
Hopefully this version is a bit better.
Thanks,
Kev.
Comment #10
avpadernoRemember to change the status, when you upload new code.
Comment #11
avpadernoIt should .
The error message is not useful.
If the error is not caused by input given by the user, then the error message should be avoided.
Comment #12
avpadernoThere have not been replies from the OP in the past 7 days. I am marking this report as .
Comment #13
avpaderno