any new update. I need it.

Comments

robloach’s picture

Title: version for drupal 7? » Port Flowplayer to Drupal 7
Category: support » task
Priority: Normal » Major
Issue tags: +D7CX

If someone puts something together, I'd be more than happy to commit it. Haven't had any time available myself lately.

krak’s picture

subscribe

bibo’s picture

subscribe

hypertext200’s picture

sub

hypertext200’s picture

Keep in touch with this repo and I will contribute back here once completed https://github.com/heidisoft/Flowplayer-API

hypertext200’s picture

Status: Active » Fixed

Almost everything has been updated on the https://github.com/heidisoft/Flowplayer-API. Please grab the code and merge with 7.x-1.x branch

bibo’s picture

Status: Fixed » Needs work

@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:

/**
 * Implementation of hook_theme().
 */
function flowplayer_theme() {
  return array(
    'flowplayer' => array(
      'variables' => array(
          'config' => array(),
          'id' => 'flowplayer',
          'attributes' => array(),
      ),
    ),
  );
}

The old function is identical apart from:
'config' => NULL,

Also, I added this is_array check in theme_flowplayer():

  // Avoiding potential fatal error
  if(is_array($attributes)){
	// Prepare the attributes, passing in the flowplayer class.
  	if (isset($attributes['class'])) {
   	 $attributes['class'] .= ' flowplayer';
  	} else {
    	$attributes['class'] = 'flowplayer';
  	}
  $attributes = drupal_attributes($attributes);
  }

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.

geek-merlin’s picture

sub

hypertext200’s picture

@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.

hypertext200’s picture

Status: Needs work » Needs review
artt’s picture

sub

robloach’s picture

@heshan.lk, would you like co-maintainership of the module to get the Drupal 7 version up and running?

hypertext200’s picture

oki, grant me access to git or pull from the github and push to d.o. git, either way will work :). Thanks

robloach’s picture

Assigned: Unassigned » hypertext200
Status: Needs review » Reviewed & tested by the community

Yay! You rule :-) .

hypertext200’s picture

Tnks :).

hypertext200’s picture

Status: Reviewed & tested by the community » Closed (fixed)

Push initial working D7 compatible version to the repo

Anonymous’s picture

Status: Closed (fixed) » Active

These changes don't appear to be in the latest dev version on Drupal.org... Can d.o be updated with the latest code please?

Anonymous’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev

(changing version)