Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

pass a php variable with the video name


hi
I am trying to include the JWPlayer into a Joomla article which I pass a PHP variable to.

The var is correctly displayed in the article,
but I am not able to correctly trigger the plugin.

I would like to have that page displaying dynamic videos according to the var I am passing.


Can you suggest me how to do that?

The code I am using it is not working.

Thanks

11 Community Answers

JW Player

User  
0 rated :

Does something like this work?
bc.. title: "<?php echo $var; ?>"

JW Player

User  
0 rated :

I will try to post more details.

This is the Joomla page in which I want to display videos:
http://www.dummysite.com/index.php?option=com_content&view=article&id=94&videopassato=video1.mp4

The var $videopassato is correctly received by the page.
Indeed if I use the PHP print command I see it.

In the Joomla article (with DirectPHP plugin enabled) I use this code

[code]
<?php
$jinput = JFactory::getApplication()->input;
$foo = $jinput->get('videopassato');
$foo2 = "{jwplayer}http://www.dummysite.com/images/fabrik/videos/".$foo"{/jwplayer}";
print $foo2;
?>
[/code]


Unfortunately in the generated page sources this is what I see.
As you notice the video file name is not present in the code JWPlayer plugin generates.

Can you tell me what I am missing ??


[code]
<span class="jwbox">
<a href="#">Click to watch the player in a Pop-Up</a>
<span class="jwbox_hidden">
<span class="jwbox_content"><span id='jwplayerplg94idb61a37fc775ecf63ee558f31302bfb47pop'>You must have <a href="http://get.adobe.com/flashplayer">the Adobe Flash Player</a> installed to view this player. </span>
<script type='text/javascript'>
jwplayer('jwplayerplg94idb61a37fc775ecf63ee558f31302bfb47pop').setup({
'file': 'http://www.dummysite.com/images/fabrik/videos/',
'primary': 'flash',
'height': '270',
'width': '480',
'wmode': 'opaque',
'skin': 'vapor',
'listbar': {
'size': '180',
'position': 'none'
},
'captions': {
},
'related': {
},
'sharing': {
'link': 'http://www.dummysite.com/index.php?option=com_content&view=article&id=94&videopassato=video1.mp4',
'heading': 'Condividi',
'code': '%3Ciframe src%3D%22http%3A%2F%2Fwww.dummysite.com%2Fmedia%2Fjwadvanced%2Fembed%2Fplg94idb61a37fc775ecf63ee558f31302bfb47.html%22 width%3D%22480%22 height%3D%22270%22 frameborder%3D%220%22 scrolling%3D%22auto%22 allowFullScreen%3E%3C%2Fiframe%3E'
}
});

</script>

</span>
</span>
</span>
[/code]

Ethan Feldman

JW Player Support Agent  
0 rated :

You can do that, but then you need to set the player’s type variable to mp4.

JW Player

User  
0 rated :

sorry, can you please be more specific?
I 've already tried to add a "&type=mp4 to the string passed

and even tried with an FLV video.

no luck.

is the code and procedure I'm using correct?
I really need help to solve this issue asap. it's driving me crazy

please ethan , tell me more.

JW Player

User  
0 rated :

I hope someone of the support staff will be able help me.
being a paid extension, I can't ask on the most popular joomla websites.

JW Player

User  
0 rated :

dear ethan I have already searched before posting. and already tried the option you are suggesting
please be more specific!

Ethan Feldman

JW Player Support Agent  
0 rated :

Can you provide a link to where you are running this?

JW Player

User  
0 rated :

yes of course
I can give you link, admin credentials etc.
can you give me an email where to forward this info?

Ethan Feldman

JW Player Support Agent  
0 rated :

Sure – http://www.jwplayer.com/contact-us/

JW Player

User  
0 rated :

I have sent you the details you asked for.
Looking forward to receiving your reply / help.
Thanks

Ethan Feldman

JW Player Support Agent  
0 rated :

Thanks

This question has received the maximum number of answers.