Forums / Templates, Stylesheets, Page Layout / Flash Mp3 in a Blank Sidebox

Flash Mp3 in a Blank Sidebox

Locked

Views: 6,821

Results 1 to 20 of 24
This thread is locked. New replies are disabled.
9 Oct 2007, 8:39 PM
#1
davidandrews avatar

davidandrews

Zen Follower

Join Date:
Apr 2006
Posts:
108
Plugin Contributions:
0

Flash Mp3 in a Blank Sidebox

HI Folks, Not been here a while so now trying out 1.37 and loving it!

OK, my question is this: using the blank sidebox module is it possible to get a flash mp3 player in the sidebox?

I installed the Blank Sidebox contribution and got it working on its own, but I can't get a flash mp3 player working, but when I try pulling the code, it just looks blank

So in blank_sidebox_defines.php which is this:

<?php /** * blank sidebox definitions - text for inclusion in a new blank sidebox * * @package templateSystem * @copyright 2007 Kuroi Web Design * @copyright Portions Copyright 2003-2007 Zen Cart Development Team * @license <http://www.zen-cart.com/license/2_0.txt> GNU Public License V2.0 * @version $Id: blank_sidebox.php 2007-05-26 kuroi $ */ define('BOX_HEADING_BLANK_SIDEBOX', 'Blank Sidebox Header'); define('TEXT_BLANK_SIDEBOX', 'Replace this text with your HTML content.'); ?>

eg,

I try this:

<?php /** * blank sidebox definitions - text for inclusion in a new blank sidebox * * @package templateSystem * @copyright 2007 Kuroi Web Design * @copyright Portions Copyright 2003-2007 Zen Cart Development Team * @license <http://www.zen-cart.com/license/2_0.txt> GNU Public License V2.0 * @version $Id: blank_sidebox.php 2007-05-26 kuroi $ */ define('BOX_HEADING_BLANK_SIDEBOX', 'Blank Sidebox Header'); define('TEXT_BLANK_SIDEBOX', '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="130" height="141"> <param name="movie" value="test.swf"><param name="quality" value="high"> <embed src="test.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="130" height="141"></embed> </object>'); ?>

and I have a .swf and an .xml file to put into the directory, which I do as well

Any idea on why its a no show, OR is it not even possible to do this or is there an easier solution to get a nice Flash Mp3 player in a sidebox?

Thanks for any solutions

Samantha Andrews

9 Oct 2007, 10:34 PM
#2
crazycucumber avatar

crazycucumber

Zen Follower

Join Date:
Jan 2006
Posts:
403
Plugin Contributions:
0

Re: Flash Mp3 in a Blank Sidebox

Hi ,

Think your editing the wrong file there :-

Take a look at the tpl_blank_sidebox.php

you may have called is something different, where the blank bit is but it will be in the templates/ sideboxes dir.

that is where you add the content for your sidebox , the defines is just for the header text ect.

Various Zen cart sites !

10 Oct 2007, 6:53 AM
#3
davidandrews avatar

davidandrews

Zen Follower

Join Date:
Apr 2006
Posts:
108
Plugin Contributions:
0

Re: Flash Mp3 in a Blank Sidebox

Hey Crazy Cucumber
Thats a lot better

The swf now shows but doesn't load the xml file ?

is xml not allowed within the sidebox?

Thanks loads

Samantha x

10 Oct 2007, 8:29 AM
#4
crazycucumber avatar

crazycucumber

Zen Follower

Join Date:
Jan 2006
Posts:
403
Plugin Contributions:
0

Re: Flash Mp3 in a Blank Sidebox

davidandrews:

Hey Crazy Cucumber
Thats a lot better

The swf now shows but doesn't load the xml file ?

is xml not allowed within the sidebox?

Thanks loads

Samantha x

glad i got you in the right direction , there is no reason I know of that it wont load , maybe some paths are wrong , but your on the limit of my knowledge there .Flash and XML are not my strong points.
Sorry

Various Zen cart sites !

15 Oct 2007, 6:03 AM
#5
davidandrews avatar

davidandrews

Zen Follower

Join Date:
Apr 2006
Posts:
108
Plugin Contributions:
0

Re: Flash Mp3 in a Blank Sidebox

Ok got it working
All files just needed to be in the root dir (the swf and the xml)

This is a great contrib

I now have a working Virtual iPhone in my box!

Thanks loads

19 Oct 2007, 7:22 PM
#6
hrm avatar

hrm

New Zenner

Join Date:
Oct 2005
Posts:
95
Plugin Contributions:
0

Re: Flash Mp3 in a Blank Sidebox

We were thinking about trying to implement something similar, but we were wondering if the player/sidebox would get reloaded and the music interrupted each time a new page is loaded. Is that an issue?

Heather
Results! Why, man, I have gotten a lot of results.
I know several thousand things that won't work.
----Thomas Edison

20 Oct 2007, 10:24 AM
#7
hifipj avatar

hifipj

New Zenner

Join Date:
Oct 2007
Posts:
43
Plugin Contributions:
0

Re: Flash Mp3 in a Blank Sidebox

This is SO AWESOME!!!!

Wanted to do this on my site but had no idea where to start... thanks for posting this thread and getting me working on it.

I have a site that sells HD videos, for download and on disc, and I wanted to have an embedded flash player to show some sample videos. Long story short, I ended up going with an embedded player that's free (goes in root directory, along with your .flv file) from here:

http://www.jeroenwijering.com/?item=JW_FLV_Player

and used the empty sideboxes addon to embed the code for the player. Took some fiddling to get the player to be the right size and show my videos in the right 16:9 aspect ratio with no black space on the sides, top or bottom, but now it's working great.
If anyone needs the code to do the same thing, reply and I can post it up here.

Site:

http://candid-hd.com/catalog/

Cheers!

Patrick

20 Oct 2007, 10:40 AM
#8
hifipj avatar

hifipj

New Zenner

Join Date:
Oct 2007
Posts:
43
Plugin Contributions:
0

Re: Flash Mp3 in a Blank Sidebox

Made me think of some ENHANCEMENTS.... :)

First, is there any program to automatically "rotate" flv videos the window brings up so that at different times the player will load different clips.

I suppose it could also be a function in the php code in that sidebox, to have a list of different files to play and randomly choose one on each page load (like how 'featured items' changes every time you reload the page) ... but I have no idea how to do that.

20 Oct 2007, 12:50 PM
#9
misty avatar

misty

Inactive

Join Date:
Apr 2004
Location:
UK
Posts:
5,752
Plugin Contributions:
1

Re: Flash Mp3 in a Blank Sidebox

If anyone needs the code to do the same thing, reply and I can post it up here.
Could you post code please? TIA

Dezina ZenCart Templates
Please do not PM for support queries..Post in forums..help others

20 Oct 2007, 4:22 PM
#10
hifipj avatar

hifipj

New Zenner

Join Date:
Oct 2007
Posts:
43
Plugin Contributions:
0

Re: Flash Mp3 in a Blank Sidebox

No problem, so many have helped me here I am glad if I can help out others...

First download and install the "Empty Sidebox" add-on from the d/l section of this site.

Second, download that little .js flash player from here:

http://www.jeroenwijering.com/?item=JW_FLV_Player

Extract the contents of the zip,

And copy this file to your site's root directory:

flvplayer.swf

Use FTP to copy your .flv flash video file to the site's root directory.

Then put in code based on this model for your tpl_blank_sidebox.php file, which is located in

\includes\templates\template_default\sideboxes

directory.

Replace yoursite.com with your site name, and sample.flv with your .flv file name, also adjust size as needed (I made it to fit nicely in the sideboxes of my Cherry Zen template, which are 150px wide).

<?php /** * blank sidebox - allows a blank sidebox to be added to your site * * @package templateSystem * @copyright 2007 Kuroi Web Design * @copyright Portions Copyright 2003-2007 Zen Cart Development Team * @license <http://www.zen-cart.com/license/2_0.txt> GNU Public License V2.0 * @version $Id: blank_sidebox.php 2007-05-26 kuroi $ */ $content = ''; $content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent">'; // Replace the text and HTML tags between the apostophes on lines 19 and 20. // Use as many or as few lines using this model as you need for your custom content. // If you have a multilingual site define your text in the languages/YOUR_LANGUAGE/extra_definitions/blank_sidebox_defines.php and include it as shown in line 19. // If your site is monolingual, you can put the text right here as shown on line 20 (and nobody will know!) $content .= '<p>' . TEXT_BLANK_SIDEBOX . '</p>'; $content .= '<object width="140" height="99" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/ shockwave/cabs/flash/swflash.cab#version=8,0,0,0"> <param name="flashvars" value="file=http://www.yoursite.com/sample.flv" /> <param name="movie" value="http://www.yoursite.com/flvplayer.swf" /> <embed src="http://www.yoursite.com/flvplayer.swf" width="140" height="99" bgcolor="#FFFFFF" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="file=http://www.yoursite.com/sample.flv" /> </object>'; $content .= '</div>'; ?>

And that should do it!

If anyone can tell me how to have it call a different .flv file on each reload, or at different times or days, so the videos rotate, that would be great.

Cheers,
Patrick

21 Oct 2007, 5:47 AM
#11
misty avatar

misty

Inactive

Join Date:
Apr 2004
Location:
UK
Posts:
5,752
Plugin Contributions:
1

Re: Flash Mp3 in a Blank Sidebox

Thank You Patrick

Dezina ZenCart Templates
Please do not PM for support queries..Post in forums..help others

18 Nov 2007, 7:27 PM
#12
jonjay avatar

jonjay

New Zenner

Join Date:
Nov 2007
Location:
Sheboygan
Posts:
4
Plugin Contributions:
0

Re: Flash Mp3 in a Blank Sidebox

hifipj:

No problem, so many have helped me here I am glad if I can help out others...

First download and install the "Empty Sidebox" add-on from the d/l section of this site.

Second, download that little .js flash player from here:

http://www.jeroenwijering.com/?item=JW_FLV_Player

Extract the contents of the zip,

And copy this file to your site's root directory:

flvplayer.swf

Use FTP to copy your .flv flash video file to the site's root directory.

Then put in code based on this model for your tpl_blank_sidebox.php file, which is located in

\includes\templates\template_default\sideboxes

directory.

Replace yoursite.com with your site name, and sample.flv with your .flv file name, also adjust size as needed (I made it to fit nicely in the sideboxes of my Cherry Zen template, which are 150px wide).

<?php /** * blank sidebox - allows a blank sidebox to be added to your site * * @package templateSystem * @copyright 2007 Kuroi Web Design * @copyright Portions Copyright 2003-2007 Zen Cart Development Team * @license <http://www.zen-cart.com/license/2_0.txt> GNU Public License V2.0 * @version $Id: blank_sidebox.php 2007-05-26 kuroi $ */ $content = ''; $content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent">'; // Replace the text and HTML tags between the apostophes on lines 19 and 20. // Use as many or as few lines using this model as you need for your custom content. // If you have a multilingual site define your text in the languages/YOUR_LANGUAGE/extra_definitions/blank_sidebox_defines.php and include it as shown in line 19. // If your site is monolingual, you can put the text right here as shown on line 20 (and nobody will know!) $content .= '<p>' . TEXT_BLANK_SIDEBOX . '</p>'; $content .= '<object width="140" height="99" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/ shockwave/cabs/flash/swflash.cab#version=8,0,0,0"> <param name="flashvars" value="file=http://www.yoursite.com/sample.flv" /> <param name="movie" value="http://www.yoursite.com/flvplayer.swf" /> <embed src="http://www.yoursite.com/flvplayer.swf" width="140" height="99" bgcolor="#FFFFFF" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="file=http://www.yoursite.com/sample.flv" /> </object>'; $content .= '</div>'; ?>

And that should do it!

If anyone can tell me how to have it call a different .flv file on each reload, or at different times or days, so the videos rotate, that would be great.

Cheers,
Patrick

I got this working in firefox, looks ggod, but it won't work or show on Microsoft Internet Explorer 7. What am I doing wrong, it's so cool and would like it to work on all.

Here's my web site: https://www.wisconsinairsoftwars.com

Thanks
Jonathan
Owner of WAW

5 Jan 2008, 2:22 AM
#13
alhakeem2001 avatar

alhakeem2001

Zen Follower

Join Date:
Nov 2007
Posts:
434
Plugin Contributions:
1

Re: Flash Mp3 in a Blank Sidebox

First download and install the "Empty Sidebox" add-on from the d/l section of this site.
what does that mean, and where from exactly to download that Empty Sidebox ?:no:

7 Jan 2008, 7:14 AM
#15
alhakeem2001 avatar

alhakeem2001

Zen Follower

Join Date:
Nov 2007
Posts:
434
Plugin Contributions:
1

Re: Flash Mp3 in a Blank Sidebox

crazycucumber:

Hi ,

Think your editing the wrong file there :-

Take a look at the tpl_blank_sidebox.php

you may have called is something different, where the blank bit is but it will be in the templates/ sideboxes dir.

that is where you add the content for your sidebox , the defines is just for the header text ect.

Hi Crazy,

I did what you said for for my test ZC but nothing shows in yet, the code that embaded is :

<script type="text/javascript"> var so = new SWFObject("http://www.arab-broker.com/oriental2/media/playerMultipleMenuPackage/sampleEmbedCode.html", "mymovie", "295", "200", "7", "#FFFFFF"); so.addVariable("autoPlay","no") so.addVariable("playlistPath","playlist.xml") so.write("flashPlayer"); </script>

I'm using a Bi-lingual website as for the Arabic language the content of the blank sidebox is gone and in the English version it shows this : TEXT_BLANK_SIDEBOX

Should I add the link for the flash player where it says : ** so.write("flashPlayer");And should I add the path for the xml file where it says : so.addVariable("playlistPath","playlist.xml")and if so where exactly, in ("playlistPath" or "playlist.xml") ?**

the link for the test website:
http://www.arab-broker.com/oriental2/index.php?main_page=index&language=en

what did I do wrong here ?

7 Jan 2008, 7:13 PM
#16
hifipj avatar

hifipj

New Zenner

Join Date:
Oct 2007
Posts:
43
Plugin Contributions:
0

Re: Flash Mp3 in a Blank Sidebox

Just an update here...

If you are using this feature and your site has SSL, you will need to change all references in the code to https:// rather than just http://.

Regards,
Patrick

7 Jan 2008, 7:36 PM
#17
alhakeem2001 avatar

alhakeem2001

Zen Follower

Join Date:
Nov 2007
Posts:
434
Plugin Contributions:
1

Re: Flash Mp3 in a Blank Sidebox

I'm not sure if I'm using the SSL feature or not, but even the https:// didn't work with me !!:frusty:

8 Jan 2008, 7:38 AM
#18
misty avatar

misty

Inactive

Join Date:
Apr 2004
Location:
UK
Posts:
5,752
Plugin Contributions:
1

Re: Flash Mp3 in a Blank Sidebox

You have to make sure paths to flash player files are
correct........
i.e. bottom right sidebox at
http://www.dezinashop.com/demo/
For some reason, IE7 does not show sidebox header,
but Firefox and Safari do.

Dezina ZenCart Templates
Please do not PM for support queries..Post in forums..help others

8 Jan 2008, 7:55 AM
#20
misty avatar

misty

Inactive

Join Date:
Apr 2004
Location:
UK
Posts:
5,752
Plugin Contributions:
1

Re: Flash Mp3 in a Blank Sidebox

I'm sure about my flash player path 100%
Paths to ALL flash player files has to be correct, not just
swf file..

Dezina ZenCart Templates
Please do not PM for support queries..Post in forums..help others