• Resolved gerben-van-eijk

    (@gerben-van-eijk)


    Hello there,

    I am using the proplayer plugin to show video files from various players such as youtube and vimeo. the plugin works great when I add it in a post.

    However I have some of my own videos aswel for which I’d like to generate pages. I have everything set up for it, as in I can retrieve the url data from a database ready to be inserted wherever it needs to go.

    The problem is that I can’t seem to call the ProPlayer through php. On the website for the ProPlayer plugin the author said it had to be done like this:

    <?php
    		$player = new ProPlayer();
    		$player->buildPlayer("[pro-player]urlforvideo[/pro-player]");
    		?>

    However, when I use that it doesn’t do a thing, when I check the source it’s like it doesn’t generate any html or javascript whatsoever.

    Does anyone know what I’d need to add or change to make it work?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter gerben-van-eijk

    (@gerben-van-eijk)

    Shameless bump.. anyone?

    you should tell that to the main owner in his site.

    http://isagoksu.com/proplayer-wordpress-plugin/

    Thread Starter gerben-van-eijk

    (@gerben-van-eijk)

    Well I did, but I´ve not received an answer yet and until then I am quite stuck.. so I just figured I´d broaden the search for an answer a bit and ask it on here aswel.

    @gerben, I’m pretty busy in these days. Very quick answer to ur q is:

    buildPlayer is a function that parses the array of entries. Instead you should use addPlayerCode method to return something back. But I’ve never tried with that way. So I’m not sure. Just try and let us know please.

    Thanks,
    Isa

    Thread Starter gerben-van-eijk

    (@gerben-van-eijk)

    Thanks for the reply Isa, I will play around with it and see if I can get it to work.

    As to you being pretty busy, being busy usually means things are going well, so keep it up!

    Thread Starter gerben-van-eijk

    (@gerben-van-eijk)

    Okay I’ve got it working.
    It didn’t work right of the bat so I did some debugging with echo’s in the proplayer.php file to see how far it was getting. But it turns out that for some reason unknown to me at least. it is not actually returning the return from the addPlayerCode function.

    So what I did to solve it is simply echo what it returns which was the $content.

    so just above the
    return $content; I wrote echo $content;
    The problem it then gave is that if I put a video in a post like you normally would, it would show up twice, but I simply fixed that with an if statement to only use the echo when you are on one of the gallery pages and if you’re not on the gallery page it will simply use the return.

    Gerben van Eijk,

    Can you please paste the whole code that calls the function to pro-player from outside of the content (php). Whatever I do, nothing works. I tried everything, plus I am new to PHP. Thank you in advance. My e-mail is igordesigns@gmail.com.

    Thanks,
    Igor M
    igordesigns@gmail.com

    @prodigy2m, just look at the new version. There is a new feature that supports shortcode use.

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘[plugin: ProPlayer] calling player through PHP’ is closed to new replies.