@heshan.lk: hey, nice work! Nice timing also, I happen to need the D7 port urgently.
I tested your code from https://github.com/heidisoft/Flowplayer-API , and unfortunately it resulted in fatal error during install: Cannot use assign-op operators with overloaded objects nor string offsets in modulepath/flowplayer/flowplayer.module on line 224
I investigated this a bit, and it seems it's because of the new theme hook system, that is always expecting a single array with the params, instead of multiple arguments. I suppose you did the upgrade with the coder -module, which tries to automatically convert the parameters.
Apparently this needs some manual work, because the first parameter may or may not be an array (config array or a single url string). On line 28 its called like this: theme('flowplayer', 'http://e1h13.simplecdn.net/flowplayer/flowplayer.flv');
..and the theme hook transforms the url into array("h", "h", "h").
I avoided this problem by changing the default theme hook variable values like this:
@bibo, its nice to see that, someone need that urgently and tested, somehow I have missed that theme file. I manually did all changes to the code and not an automated process. Somehow I missed that part as I didn't test with uninstall/install. Fixed that theme function so you can test the module now.
Comments
Comment #1
robloachIf someone puts something together, I'd be more than happy to commit it. Haven't had any time available myself lately.
Comment #2
krak commentedsubscribe
Comment #3
bibo commentedsubscribe
Comment #4
hypertext200sub
Comment #5
hypertext200Keep in touch with this repo and I will contribute back here once completed https://github.com/heidisoft/Flowplayer-API
Comment #6
hypertext200Almost everything has been updated on the https://github.com/heidisoft/Flowplayer-API. Please grab the code and merge with 7.x-1.x branch
Comment #7
bibo commented@heshan.lk: hey, nice work! Nice timing also, I happen to need the D7 port urgently.
I tested your code from https://github.com/heidisoft/Flowplayer-API , and unfortunately it resulted in fatal error during install:
Cannot use assign-op operators with overloaded objects nor string offsets in modulepath/flowplayer/flowplayer.module on line 224I investigated this a bit, and it seems it's because of the new theme hook system, that is always expecting a single array with the params, instead of multiple arguments. I suppose you did the upgrade with the coder -module, which tries to automatically convert the parameters.
Apparently this needs some manual work, because the first parameter may or may not be an array (config array or a single url string). On line 28 its called like this:
theme('flowplayer', 'http://e1h13.simplecdn.net/flowplayer/flowplayer.flv');..and the theme hook transforms the url into array("h", "h", "h").
I avoided this problem by changing the default theme hook variable values like this:
The old function is identical apart from:
'config' => NULL,Also, I added this is_array check in theme_flowplayer():
After that I can enable the module normally, and it's useable. Need to test further though, as the url-only theme call doesnt work yet.
Might be tricky to fix without changing the parameter order, because this string/array/default value confusion happens in the core theme handling.
Comment #8
geek-merlinsub
Comment #9
hypertext200@bibo, its nice to see that, someone need that urgently and tested, somehow I have missed that theme file. I manually did all changes to the code and not an automated process. Somehow I missed that part as I didn't test with uninstall/install. Fixed that theme function so you can test the module now.
Comment #10
hypertext200Comment #11
artt commentedsub
Comment #12
robloach@heshan.lk, would you like co-maintainership of the module to get the Drupal 7 version up and running?
Comment #13
hypertext200oki, grant me access to git or pull from the github and push to d.o. git, either way will work :). Thanks
Comment #14
robloachYay! You rule :-) .
Comment #15
hypertext200Tnks :).
Comment #16
hypertext200Push initial working D7 compatible version to the repo
Comment #17
Anonymous (not verified) commentedThese changes don't appear to be in the latest dev version on Drupal.org... Can d.o be updated with the latest code please?
Comment #18
Anonymous (not verified) commented(changing version)