Hi,
Using the flash node module (that works perfectly fine for me), i want to know if there is any way of displaying the .swf file scaled to a quarter of its size while it is displayed in the teaser.
So displayed full size in the body of the node but a quarter of its size in the teaser.
I've tried working it out tweaking the content templates flash type's teaser but wasnt able to get it right.
Also tried, as they suggest in the flash node's help page, to use the tag method as [flash|scale=0.25] but there was no .swf file in the teaser, only the litteral "[flash|scale=0.25]" in plain text.
Anybody can help?
Comments
Comment #1
Stuart Greenfield commentedAt the moment there isn't an "easy" way to do this as it is not a feature that Flash node has. It might be possible to work around it by using some PHP code to produce different content depending on whether the page is in "teaser" or "full" view, but that might need some trial and error. It would mean enabling PHP input for the node in question. Only thing I'm not sure about is if you can combine PHP and input filters in the same node!
I'll think this over and see if there are any other ways it would be possible...
Note, if using Flash node macros the proper syntax is [flashnode|nid=nnn|scale=0.25] where nnn is the number of the node you want to use. Also, don't forget to activate the Flash node filter for the input formats where you want to use it!
Comment #2
jeanmichel-1 commentedYes, thanks for the info.
Activating the flashnode filter for the input formats, that's a nice tip! totally overlooked from my part.
But another question. You say the proper syntax for the macro is [flashnode|nid=nnn|scale=0.25].
Well, i'll write the macro not in the body of the created flashnode but instead, using the content template module, in the teaser part of any flash content type node.
So every flash node created will automatically have the macro coded in its teaser.
That is where the question arise.
I dont want to set a nid for the macro. i want it to apply the scaling to the node itself!
How should i write the macro then?
thanks a lot!
Comment #3
Stuart Greenfield commentedI never tried the contemplate module before, but I downloaded it and it seems a pretty neat way to fine tune output. Seeing as the content template lets you access PHP then the easiest way to get the effect you want is to customise the node and call the flash node theme function directly.
The example code below would cause flash items to appear at 25% of their regular size and to appear just above the teaser text. Using the content template module alter the flash node teaser template to:
The
print themeline asks flash node to produce the required HTML output. Usingprint thememeans your flash will be rendered using your preferred SWF Tools setting.To prevent the flash appearing twice in teaser view make sure that when you create a flash node you set the display option (under Basic flash node options) to body only. If you don't do this then flash node will automatically add the flash at its full size when viewing a teaser and you'll get the small size followed by the full size.
Try this out and let me know if it works for you!
Comment #4
jeanmichel-1 commentedWell, as simple as that!
Your help is greatly appreciated, thank you. :-)
works perfectly.
I'll learn from that (print theme...)
Comment #5
Stuart Greenfield commentedChanging to fixed as the suggested code worked.
Comment #6
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.