Download & Extend

language path prefix in player path when use lightvideo[]

Project:Lightbox2
Version:6.x-1.11
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:needs review

Issue Summary

Hi,

I just had an issue with the path prefix in a translated site I made. The problem was that the path to the player file was '/en/sites/all/themes/themename/player.swf', but it had to be '/sites/all/themes/themename/player.swf'.

The problem is in the url function that creates the path to the player that prepends the language prefix to the path. While it is a fixed path, set by the user, or the base path, my believe is that the url function is not needed here.

When I removed it, it all worked fine again.

I've included my patchfile to this post.

AttachmentSize
lightbox2.module.patch708 bytes

Comments

#1

This patch has error. It should be
$js_settings['flvPlayer'] = $base_url."/".check_plain(trim(variable_get('lightbox2_flv_player_path', 'flvplayer.swf'), '/'));
instead of
$js_settings['flvPlayer'] = check_plain(trim(variable_get('lightbox2_flv_player_path', 'flvplayer.swf'), '/'));

#2

patch fix the problem for me. :D

update: Sorry, it work only in front page.. :-P
I have change the patch and now works for all urls:

global $base_url, $base_path;
$js_settings['flvPlayer'] = $base_url.$base_path.check_plain(trim(variable_get('lightbox2_flv_player_path', 'flvplayer.swf'), '/'));

#3

Thank you, works perfectly.

#4

Thanks, the solution from lonespy works for us.

#5

Status:active» needs review

Neither of the above worked for me with a multisite path-based install. Made a minor change and the attached patch sorted the issue for me.

AttachmentSize
Lightbox2-Fix_for_video_player_path_prefix-1005296-5.patch 628 bytes
nobody click here