| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Random Youtube Video Player | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() 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?
__________________
X-Cart 4.3 Joomla Among other things ![]() |
|||||||
#2
|
|||||||||
|
|||||||||
![]() 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.
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
#3
|
|||||||
|
|||||||
![]() 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.
__________________
X-Cart 4.3 Joomla Among other things ![]() |
|||||||
#4
|
|||||||||
|
|||||||||
![]() Quote:
![]() Sorry can't help you with the random load
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
#5
|
|||||||
|
|||||||
![]() 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.
__________________
x-cart 4.2.3 & 4.6.0 |
|||||||
#6
|
|||||||
|
|||||||
![]() 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
__________________
X-Cart 4.3 Joomla Among other things ![]() |
|||||||
#7
|
|||||||
|
|||||||
![]() Quote:
Regs I had a php one before, I'm not so sure it works. Does PHP run inside x-cart as a TPL?
__________________
X-Cart 4.3 Joomla Among other things ![]() |
|||||||
#8
|
|||||||
|
|||||||
![]() 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.
__________________
X-Cart 4.3 Joomla Among other things ![]() |
|||||||
#9
|
|||||||
|
|||||||
![]() 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.
__________________
x-cart 4.2.3 & 4.6.0 |
|||||||
#10
|
|||||||
|
|||||||
![]() Regs,
This guy in another thread talking about PHP in X-Cart figured it out along the lines of what you were saying. Quote:
__________________
X-Cart 4.3 Joomla Among other things ![]() |
|||||||
|
|||
X-Cart forums © 2001-2020
|