Forum OpenACS Development: Extra parameters don't work

Posted by Eduardo Santos on
Hi everybody,

I'm trying to follow your instructions to put a flash video in my page, but the extra parameters for the video, such as height and width don't work. It doesn't matter how I change these parameters the video allways has the same height and width. This is the code I put in XoWiki to include the videos:

[[swf:invesalius2_video07_segmentacao_stl.swf|InVesalius 2.0|-width 620 -height 465]]

It shows mw the following error message:

Error during processing of options: during '::2433187::link height'

Looking at the code, I've realized that in the file /xowiki/tcl/link-procs.tcl, it forces the width:

::xowiki::Link::swf instproc render_found {href label} {
::xo::Page requireJS /resources/xowiki/swfobject.js
my instvar package_id name
#set link [$package_id pretty_link -absolute true -siteurl http://localhost:8003 $name]/download.swf
foreach {width height bgcolor version} {320 240 #999999 7} break

Is it impossible to change these parameters?

Posted by Gustaf Neumann on
the passing of values for height and width for the swf-files works both in the oacs-5-3 version and in the version in cvs-head.

There must be something else wrong. concerning the error message with height: are you sure, you have no "invisible markup" (such as spans etc. introduced via cut&paste) around the "-height"?

concerning setting the value:
the line, you are highlighting is the line setting the default values. the line below this (not cited) sets the provided values.

the height is passed to "new SWFObject(...,$height,...)". You should check the generated HTML source, whether it is inserted correctly at that place. btw, not every swf file honors the width and height parameters.

hope this helps.

Posted by Eduardo Santos on
Thank you very much Gustaf. As always, you are absolutely right. I didn't think about the generated HTML code, but there was an span tag, as you suggested. This tag was making it impossible for XoWiki to get the right values.

At least I can understand a little bit more about XoTCL now. Thank you for your help again.

Posted by Gustaf Neumann on
my guess was due to the fact that i was caught earlier by a similar problem; the insertion of such tags is partly a problem of the rich text editor.

in the current head version, the error message will be easier to spot.