In my Homepage i have in Top a Div Tag to hold a Flash File swf...
OK i will make this
In my Page i will make a Tab like "Flash Header" In this Tab i have a Media Pickup where i can select the Flash File from my Media Galerie
And when i insert a Flash File with the Media Picker and Save then must the Flash File insert in my Div Container where i have make at the top of the Page.. and shows...
Can i make this in Umbraco so ????
Also my Customer goes to a Page and goes to a Tab Flash Header and select a Flash File from the Media Galerie and save this.... Then the Flash File is show correct on my Homepage ... in my DIV Tag ???
This is one way to do it. In this example you will write out your div-tag in the XSLT also.
And remember to adjust the width and height, so it matches the sizes that you use in your site. Also remember to change the alias to whatever your flash-field is called.
If you have any more questions to the above code, don't hesitate to ask again :)
I have a Homepage with a Flash Placeholder on the Top of the Page Must i have a separate Placeholder or is correct when i only have a Div Tag in my Masterpage for hold my Flash Banner ???
All my Flash Banners on top always have the same Width and Height .... On each of my Page i must Load a other Flash Banner (.swf File)
I have my Banners make with a Tool hes generate the swf File and each swf File have a XML File in Background with the Path of the Images wehere Load in this SWF..
OK i will on each Page a Toolbar Button, and when i click on this then can i Insert the Flash File from my Media Galery with a Media Picker... and then the Flash must play on this Page at the Top in my Flash DIV Tag..
I've packaged an updated version of that script, which now uses standard media type and the new version of swfobject. You should find that much easier to install and use.
I have insert the Macro in my Masterpage Flash Content Placeholder and set the Parameters Widt and Height and set the Video ID to the Name of my DIV Tag "flashLayer" where i will insert the Flash File ??
Then i go to Settings /Document Types and make a new Tab in my Textpage. In this insert a new Property: Name: Flash BAnner Alias: FlashBanner Type: Media Picker Tab: Flash Banner
Then i go to a Page and go to the Tab Flash Banner an select a Flash File with the Media Picker and save this..
Then i start my Page and show in the Source Code The var path = ""; is Emty ????
Is this the correct Way ??? My Code becomes not the File Name of my Flash File where i set in the Media Picker
Ok but i have only one Editor Field for my Content !!
my Flash Banner is in a separate Content Place Holder ...
I will the flash File not show in my Content Section, i will the Flash File show in a DIV Tag "flashLayer" at the top of my Page My Content is separtate ...
I have now insert your xslt Code above in my InsertFlashFile.xslt
I become now a Error by saving the File
Error occured
System.Xml.Xsl.XslLoadException: 'xsl:if' kann kein untergeordnetes Element
des 'xsl:stylesheet'-Elements sein. Fehler bei
D:\InetPub\wwwroot\www.almrausch.at\Umbraco\xslt\633913042719540000_temp.xslt(16,1).
bei System.Xml.Xsl.XslCompiledTransform.LoadInternal(Object stylesheet,
XsltSettings settings, XmlResolver stylesheetResolver) bei
System.Xml.Xsl.XslCompiledTransform.Load(XmlReader stylesheet, XsltSettings
settings, XmlResolver stylesheetResolver) bei
umbraco.presentation.webservices.codeEditorSave.SaveXslt(String fileName, String
oldName, String fileContents, Boolean ignoreDebugging)
I think its better when i give you a account from my Demo Site to show the Problem... I a very Newbie with Umbraco :-)
Very true, I should really test before posting! But where's the learning value in that eh ;-)
For reference, here's working xslt for a flash file chosen via a mediapicker on the page on which it is to be displayed. (also using hardcoded height etc for speed)
<div id="flashLayer"> <p><a href="http://www.macromedia.com/go/getflashplayer">Get the Flash Player</a> to see this content.</p> </div> <script type="text/javascript" src="/scripts/swfobject.js"></script> <script type="text/javascript"> <![CDATA[
var path = "]]><xsl:value-of select="$videopath" /><![CDATA["; var videowidth = "]]><xsl:value-of select="$videowidth" /><![CDATA["; var videoheight = "]]><xsl:value-of select="$videoheight" /><![CDATA["; var flashvars = {}; var attributes = {}; var params = { wmode: "transparent", allowfullscreen: "true", allscriptaccess: "always" };
Insert Flash File
Hello,
In my Homepage i have in Top a Div Tag to hold a Flash File swf...
OK i will make this
In my Page i will make a Tab like "Flash Header"
In this Tab i have a Media Pickup where i can select the Flash File from my Media Galerie
And when i insert a Flash File with the Media Picker and Save then must the Flash File insert in my
Div Container where i have make at the top of the Page.. and shows...
Can i make this in Umbraco so ????
Also my Customer goes to a Page and goes to a Tab Flash Header and select a Flash File from the Media Galerie
and save this....
Then the Flash File is show correct on my Homepage ... in my DIV Tag ???
You can make this with XSLT.
First of all you make your XSLT-macro and includes it in the template you want the flash to be vissible in.
Then in the XSLT you can write this:
This is one way to do it. In this example you will write out your div-tag in the XSLT also.
And remember to adjust the width and height, so it matches the sizes that you use in your site. Also remember to change the alias to whatever your flash-field is called.
If you have any more questions to the above code, don't hesitate to ask again :)
/Kim Andersen
Hi Kim,
I have found this Topic
http://our.umbraco.org/forum/using/ui-questions/2913-Inserting-flash-by-end-users
I have test it.. but its not work... i very new with umbraco :-)
Did you remember the swfObject.js?? :)
Yes i have copy the swfobject.js in my Root/scripts Folder
I have download the newest Version of swfscript ..
Is this a Problem ? must i use a older Version ?
I have copy the swfobject Version 2.2 under Root/Scripts
OK here my Thing
I have a Homepage with a Flash Placeholder on the Top of the Page
Must i have a separate Placeholder or is correct when i only have a Div Tag in my Masterpage for
hold my Flash Banner ???
All my Flash Banners on top always have the same Width and Height ....
On each of my Page i must Load a other Flash Banner (.swf File)
I have my Banners make with a Tool hes generate the swf File and each swf File have
a XML File in Background with the Path of the Images wehere Load in this SWF..
OK i will on each Page a Toolbar Button, and when i click on this
then can i Insert the Flash File from my Media Galery with a Media Picker...
and then the Flash must play on this Page at the Top in my Flash DIV Tag..
Hi there
If you're using the solution from http://our.umbraco.org/forum/using/ui-questions/2913-Inserting-flash-by-end-users?p=0#comment9539 then it uses swfobject 1.5 and the latest version won't work without a little bit of tweaking.
Hope this helps,
Dan
Hi Dandyrayne,
Is this a Problem when i use Version 1.5 ?
It is not better when i use the newest Version ???
Yeh maybe, but at the end of the day all it does is insert a flash file on a page and 1.5 seems to do that without any problem.
I should update that code to use the new version though
Thanks,
Ok then i wait of the new Code for the Version 2.2
Thanks
I have test at this time with Version 1.5.1
When i show in my Source Code the Path to my SWF File is alway emty
I become alway this in my Source ?
I have make a new Tab in my Document Type and Insert a MediaPicker ?
Howdy
I've packaged an updated version of that script, which now uses standard media type and the new version of swfobject. You should find that much easier to install and use.
http://our.umbraco.org/projects/insert-flash-file
Dan
Hi Dandrayne,
Ok i have Installed your File...
I have insert the Macro in my Masterpage Flash Content Placeholder
and set the Parameters Widt and Height and set the Video ID to the Name of my DIV Tag
"flashLayer" where i will insert the Flash File ??
Then i go to Settings /Document Types and make a new Tab in my Textpage.
In this insert a new Property:
Name: Flash BAnner
Alias: FlashBanner
Type: Media Picker
Tab: Flash Banner
Then i go to a Page and go to the Tab Flash Banner an select a Flash File with the Media Picker
and save this..
Then i start my Page and show in the Source Code
The var path = ""; is Emty ????
Is this the correct Way ???
My Code becomes not the File Name of my Flash File where i set in the Media Picker
What am I doing wrong
ooh, let's see.
And that's it. You don't need to add any new fields to a document type using this macro
Hi,
Ok but i have only one Editor Field for my Content !!
my Flash Banner is in a separate Content Place Holder ...
I will the flash File not show in my Content Section, i will the Flash File show in a DIV Tag "flashLayer"
at the top of my Page
My Content is separtate ...
Ahh ok, the package won't work for you then.
You could use the same xslt as a starting point, and depending on how you're setting the flash file the variables will change
Dan
I have now insert your xslt Code above in my InsertFlashFile.xslt
I become now a Error by saving the File
Error occured
System.Xml.Xsl.XslLoadException: 'xsl:if' kann kein untergeordnetes Element des 'xsl:stylesheet'-Elements sein. Fehler bei D:\InetPub\wwwroot\www.almrausch.at\Umbraco\xslt\633913042719540000_temp.xslt(16,1).
bei System.Xml.Xsl.XslCompiledTransform.LoadInternal(Object stylesheet, XsltSettings settings, XmlResolver stylesheetResolver)
bei System.Xml.Xsl.XslCompiledTransform.Load(XmlReader stylesheet, XsltSettings settings, XmlResolver stylesheetResolver)
bei umbraco.presentation.webservices.codeEditorSave.SaveXslt(String fileName, String oldName, String fileContents, Boolean ignoreDebugging)
I think its better when i give you a account from my Demo Site
to show the Problem... I a very Newbie with Umbraco :-)
What you think?
Err ok, if it gets your issue sorted!
Mail me at
dan [at] geckonm [dot] com
xsl:if cannot be a child of xsl:stylesheet, it has to be in a template.
OK i have send you an Email with the Data
Thanks
or inside the variable
Very true, I should really test before posting! But where's the learning value in that eh ;-)
For reference, here's working xslt for a flash file chosen via a mediapicker on the page on which it is to be displayed. (also using hardcoded height etc for speed)
Hi,
It works perfect !! Thanks
Can i with my Technik you have insert make the following ?
In my Tab "Flash Banner" where i set the Flashfile with the MediaPicker
ad a Textfield wher i can set a Parameter for my Flash File ???
This is so: I must send a Flash Parameter to my Flashfile when Load this
Like so: AlbumID="1"
My FlashFile wait for a Variable to Load the right Album
Thanks
Hi Wachter
You need to look at the "flashvars" part of swfobject, your vars will probably go here
is working on a reply...