svdb Posted February 8, 2012 Share Posted February 8, 2012 Hi, I've recently installed the wordpress plugin 'Youtube channel plugin' which is exactly what I need, but it doesn't work. The plugin does display a youtube channel of what one selected video will be displayed in a showcase by default. Then the thumbnails of the other vids in the channel are displayed below and when clicked the page should refresh and play the video that was clicked on. When clicking a thumbnail a variable is set $entry. And this variable is displayed in the url after clicking: /?entry=7-7-ZxhE1wE. this code is the code that's in the youtube url of that video. Somehow it keeps playing the default video. This is where I think the problem should be: if ($showcase != ""): if (isset($_GET['entry'])) { $iframe_src = 'http://www.youtube.com/v/' . $_GET['entry'] . '?version=3&f=videos&app=youtube_gdata&autoplay=1'; } else { $iframe_src = 'http://www.youtube.com/v/' . $showcase . '?version=3&f=videos&app=youtube_gdata&autoplay=1'; } $showcase_output = "<iframe height='" . $showcase_height . "' width='". $showcase_width . "' src='" . $iframe_src . "'></iframe>"; endif; It doesnt GET the entry unless this variable is displayed in the url. Any ideas? Link to comment Share on other sites More sharing options...
thescientist Posted February 8, 2012 Share Posted February 8, 2012 that's how GET works. GET parameters are passed through a query string in the url. Are you checking that $_GET['entry'] is passing a value correctly? or am I missing something in your question? Link to comment Share on other sites More sharing options...
svdb Posted February 8, 2012 Author Share Posted February 8, 2012 Yes, the values are correctly passed corresponding to the clicked thumbnail. It seems as if the IF is always 'false' so it always continues to ELSE... Link to comment Share on other sites More sharing options...
thescientist Posted February 8, 2012 Share Posted February 8, 2012 are you it is the correct member? can you post us what an example URL would be that you are trying to get to work with this script? Link to comment Share on other sites More sharing options...
svdb Posted February 8, 2012 Author Share Posted February 8, 2012 Here is the url where I'm trying to get it work: http://tinyurl.com/8yrgldm Link to comment Share on other sites More sharing options...
thescientist Posted February 8, 2012 Share Posted February 8, 2012 did you look at an example of the URL? http://www.hostv.nl/?page_id=147?entry=oieHJE3HSq4 you have two question marks. NVP's (name value pairs need to separated by &'s. i.e. http://www.hostv.nl/?page_id=147&entry=oieHJE3HSq4 Link to comment Share on other sites More sharing options...
svdb Posted February 8, 2012 Author Share Posted February 8, 2012 Oke, that was easy. Works perfectly now. Thanks a lot! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.