![]() |
Random Youtube Video Player
My client has several Youtube Videos that we'd like to display in the left menu bar and have to randomly chosen on each refresh or load of any page.
I tried the AJAX Banner Script, but that just displays one every so many seconds. It's switching before the videos stop. Is this possible? |
Re: Random Youtube Video Player
Can't advise on that but I would suggest not to start the video on page load. Have the plugin there but let the customer to decide if they want to play it or not. If I get to a site which automatically plays video or music or some sort of animation that moves over the screen it makes me leave that site immediately and not come back.
|
Re: Random Youtube Video Player
Steve,
Thanks for the comment. I had no intention of starting the video on load. www.littlepuppiesonline.com The videos show on the right hand side. Like I said using the AJAX just swaps out the Embedded code from YouTube. It's not randomizing the videos. I did read a small tutorial about making an SQL Database to accomplish the randomization of the videos, but I think there should be an easier way. |
Re: Random Youtube Video Player
Quote:
Sorry can't help you with the random load |
Re: Random Youtube Video Player
Not sure how to use smarty plugins but perhaps with some further googling, you'll be able to find out and use the following:\
http://roblogic.net/tech/articles/4 Cheers, Regs. |
Re: Random Youtube Video Player
I did find this, but it appears to be ASP based using an SQL DB. Any thoughts?
http://www.codeproject.com/KB/aspnet/PlayYouTubeVideo.aspx |
Re: Random Youtube Video Player
Quote:
Regs I had a php one before, I'm not so sure it works. Does PHP run inside x-cart as a TPL? |
Re: Random Youtube Video Player
Regs, I found this one as well.
http://www.jakeludington.com/youtube/20070615_how_to_randomize_youtube_videos_with_php. html I got the flash portion to show on the site, but the PHP isn't pulling in the tag on the Video to make it display. |
Re: Random Youtube Video Player
Can you post the relevant portion of the template you are putting the php code in?
As long as your path to the text file is correct and you wrap the php code in {php}{/php} tags in your template, it should work (as my limited understanding allows me to say :)) Once you get that working though, looking into using native smarty language code would be ideal - there should be code to set an array and to pull a random line from it. Cheers, Regs. |
Re: Random Youtube Video Player
Regs,
This guy in another thread talking about PHP in X-Cart figured it out along the lines of what you were saying. Quote:
|
All times are GMT -8. The time now is 10:27 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.