HI,

I'm using SWFtools+ swfobject+Wijering Player on drupal 5.9. My site has the i18n module actived.Before active this module, those 3 components goes well but after I active i18n I can't see the Wijering Player. Now jquery code is this:

$(document).ready(function(){ $('.swfobject').each(function(i){ params = Drupal.parseJson($(this).attr('swftools')); var so = new SWFObject(params['src'], '', params['width'], params['height'], params['version'], params['bgcolor']); for (p in params) { so.addParam(p, params[p]); } so.addVariable('flashvars', '&'+ params['flashvars']); so.write(this.id); }); });

...where is the code that charge the player? On the administration, drupal tell me that the direction of the Wijering Player is ok, so, on '/media/swf/handling' I don't see the "missing" message on "Default player for .flv files" in "Flash Media Player - Jeroen Wijering" section.

The embed code is this:

""

If I try to see the flv (http://localhost/drupal5/files/Enjuto Mojamuto - El peor dia de mi vida.flv) on firefox I can download this file but not the player (/drupal5/es/sites/all/modules/swftools/shared/flash_media_player/mediaplayer.swf). I don't know if the problem is the jquery missing code,the 'es' that has the player link. or a non implementation of the player or swftools with multilanguages. ¿Someone can help me?

Thanks a million. Regards. aitor

Comments

aitiba’s picture

Hi,

I think that this could be a issue.

Steps to repeat:
- install drupal 5.9 or 5.10. I try with both.
- clear url active
- i18n active with two languages (es/eu)
- cck+filefield+jquey_media active to upload files to the server
- swftools+swfobjects+Wijering Player to charge the player when I upload a swf file
- create new CCK with the file field

Expected Results:
- After charge the CCK with the file field as a swf file the Wijering Player would be appear.

Actual Results:
- After charge the CCK with the file field as a swf file the Wijering Player doesnt appear.

The code:
jquery:

    <script type="text/javascript">
      $(document).ready(function(){
      $('.swfobject').each(function(i){
      params = Drupal.parseJson($(this).attr('swftools'));
	    var so = new SWFObject(params['src'], '', params['width'], params['height'], params['version'], params['bgcolor']);
      for (p in params) {
        so.addParam(p, params[p]);
      }
      so.addVariable('flashvars', '&'+ params['flashvars']);
      so.write(this.id);
         });
     });
   </script>
   <script type="text/javascript">
   if (Drupal.jsEnabled) {
     $(document).ready(function() {
     $.fn.media.defaults.flvPlayer = '/drupal5/es/sites/all/modules/swftools/shared/flash_media_player/mediaplayer.swf';
     $.fn.media.defaults.mp3Player = '/drupal5/es/mediaplayer.swf';
     $('a.media, .filefield-item a').media();
   });  
}
</script>

embed HTML code:
<embed height="400" width="400" flashvars="file=http://localhost/drupal5/files/Enjuto Mojamuto - El peor dia de mi vida.flv" autoplay="false" bgcolor="#ffffff" pluginspage="http://www.adobe.com/go/getflashplayer" type="application/x-shockwave-flash" src="/drupal5/es/sites/all/modules/swftools/shared/flash_media_player/mediaplayer.swf?file=http://localhost/drupal5/files/Enjuto Mojamuto - El peor dia de mi vida.flv" style="display: block;"/>

If I go with the navigator to the player url with the $lang, drupal desn't find me the player but without the $lang yes. I try with the firebug deleting this "es" ($lang) and the player appear and goes well.

Thanks a million. Regards. aitor

Stuart Greenfield’s picture

Title: Problem with Wijering Player and multi-leguage side » Problem with Wijering Player and multi-language site
Assigned: Unassigned » Stuart Greenfield
Status: Active » Postponed

I haven't ever really explored the i18n module/features so will need to investigate this. At the moment I'm busy trying to get the main part of SWF Tools released as an official version 6, so I'm going to put this one on hold for the moment.

Thinking out loud, I wonder if you could use a rewrite rule in .htaccess to strip out the language part, pending a "proper" fix?

aitiba’s picture

Hi,

First of all thanks for the rapid reply.

I don't think that I could fix this problem with a .htaccess rule. This rule would be something like this:

RewriteRule ^/drupal5/es/sites/all/modules/swftools/shared/flash_media_player/mediaplayer.swf$ /drupal5/sites/all/modules/swftools/shared/flash_media_player/mediaplayer.swf [R=301,L]

... but I put this line on my .htaccess but the embed player source continues equal. ¿What I'm doing wrong?

Would be marvellous to have multilingual support for swftools on d6.

Thanks a million. Regards. aitor

aitiba’s picture

Hi Stuart,

I fix the problem with swftools and i18n with a rule on my mod_rewrite. One per languaje that I have on the side. They would be like this:

redirect 301 /eu/sites/all/modules/swftools/shared/flash_media_player/mediaplayer.swf http://ddonosti.aitoribanez.com/sites/all/modules/swftools/shared/flash_media_player/mediaplayer.swf

Thanks for the time and help. Would be great to have multilingual support for this module on d6!

Thanks a million. Regards. aitor

Stuart Greenfield’s picture

Thinking about this some more, you can set the player path on the file handling settings of SWF Tools.

So, could you set the player path to /sites/all/modules/swftools/shared on that page, and does it then start working without needing a rewrite rule?

aitiba’s picture

I don't know why if you change the default path of the player, swftools doesn't find the player. So, I see the "MISSING" text on JavaScript Embedding for the Jeroen Wigering flash player and swfobjects. I try with "/sites/all/modules/swftools/shared" but I see the same text for both.

Stuart Greenfield’s picture

Status: Postponed » Active

Hmmm, I tried this locally and I can't get it to work either!

I haven't done any work on this part of SWF Tools, it is just as it has always been. I tried making this change on SWF Tools 6 as that generates a status report, and it reports all the files as missing, but they are in the location that I want to use!

So, we have a new bug!

Changing status to active as this is a current feature that doesn't work as expected.

Stuart Greenfield’s picture

Try the path sites/all/modules/swftools/shared (i.e. no leading slash).

If it still doesn't work, view the source code for a page that isn't playing, and then post the content of the mark up that is trying to produce the code - that will give a clue as to where the module is trying to look!

Anonymous’s picture

Is this still an issue? It seams it's active so... I'll try to add some more info, as this is an issue I allways go into when I create a drupal site. Believe me I have done so quite a few times with the same results. i18n and swftools are not in synch.

So... Default flash player path: "" (or null string, as I didn't put any thing). Result:

swfobject.embedSWF("http://localhost/DRUPAL_WEB/pt-PT/sites/default/modules/swftools/shared/swftools_test_file.swf", "swfobject2-id-12423103341", "150", "150", "7", "", { "width": "150", "height": "150" }, { "swliveconnect": "true", "play": "true", "loop": "true", "menu": "false", "quality": "autohigh", "scale": "exactfit", "align": "default", "salign": "tl", "wmode": "transparent", "bgcolor": "#FFFFFF", "version": "7", "allowfullscreen": "true", "allowscriptaccess": "sameDomain", "height": 150, "width": 150, "base": "http://localhost/DRUPAL_WEB/pt-PT/system/files/", "src": "http://localhost/DRUPAL_WEB/pt-PT/sites/default/modules/swftools/shared/swftools_test_file.swf" }, { "id": "swf12423103341" });

So... definetly an issue! The problems are in bold! Very easy to understand isn't it? The filesystem is not changed by language prefix or sufix or whatever they call... so, it's relatively easy to point this problem. Good, clean and easy code should be easy to fix.

Now... Default flash player path: "sites/all/modules/swftools/shared" (the Stuart Greenfield - September 9, 2008 - 07:42 Topic)

SWFObject 2 - JavaScript is active and working (from firebug: /DRUPAL_WEB/sites/all/modules/swftools/shared/swfobject2/swfobject.js?s )

The bug is in the status swftools (the exemple swf is not in the path it finds [bare in mind *DRUPAL_WEB* is now nrprod]:

swfobject.embedSWF("http://localhost/drupal/pt-PT/sites/all/modules/swftools/shared/swftools_test_file.swf", "swftools-1261438763", "150", "150", "7", "", { "width": "150", "height": "150" }, { "swliveconnect": "default", "play": "true", "loop": "true", "menu": "false", "quality": "autohigh", "scale": "showall", "align": "l", "salign": "tl", "wmode": "opaque", "bgcolor": "#FFFFFF", "version": "7", "allowfullscreen": "true", "allowscriptaccess": "sameDomain", "height": 150, "width": 150, "base": "http://localhost/drupal/sites/default/files/", "src": "http://localhost/drupal/pt-PT/sites/all/modules/swftools/shared/swftools_test_file.swf" }, { "id": "swfobject2-swftools-1261438763" });

Thanks for the attention,
NR

ron williams’s picture

Status: Active » Closed (won't fix)

5.x-1.x is no longer supported, so I have marked as closed.