Index: openacs-4/packages/xowiki/tcl/link-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/link-procs.tcl,v
diff -u -N -r1.40 -r1.41
--- openacs-4/packages/xowiki/tcl/link-procs.tcl 11 Feb 2008 02:16:41 -0000 1.40
+++ openacs-4/packages/xowiki/tcl/link-procs.tcl 25 Feb 2008 11:16:01 -0000 1.41
@@ -194,12 +194,21 @@
}
}
+
+ #
+ # localimage link
+ #
+
Class create ::xowiki::Link::localimage -superclass ::xowiki::Link::image
::xowiki::Link::localimage instproc render {} {
my render_found [my href] [my label]
}
- Class create ::xowiki::Link::file -superclass ::xowiki::Link::image -parameter {
+ #
+ # file link
+ #
+
+ Class create ::xowiki::Link::file -superclass ::xowiki::Link::image -parameter {
width height align pluginspage pluginurl hidden href target
autostart loop volume controls controller mastersound starttime endtime
}
@@ -229,19 +238,30 @@
}
}
+ #
+ # css link
+ #
+
Class create ::xowiki::Link::css -superclass ::xowiki::Link::file -parameter {
}
::xowiki::Link::css instproc render_found {href label} {
::xo::Page requireCSS $href
return ""
}
+
+ #
+ # js link
+ #
Class create ::xowiki::Link::js -superclass ::xowiki::Link::file -parameter {
}
::xowiki::Link::js instproc render_found {href label} {
::xo::Page requireJS $href
return ""
}
+ #
+ # swf link
+ #
Class create ::xowiki::Link::swf -superclass ::xowiki::Link::file -parameter {
width height bgcolor version
quality wmode align salign play loop menu scale
@@ -275,7 +295,99 @@
"
}
+ #
+ # plugin link
+ #
+# Class create ::xowiki::Link::plugin -superclass ::xowiki::Link::file -parameter {
+# classid width height autostart params
+# }
+# ::xowiki::Link::plugin instproc render_found {href label} {
+# my instvar package_id name
+
+# foreach {width height autostart} {320 240 true} break
+# foreach a {classid width height autostart} {if {[my exists $a]} {set $a [my set $a]}}
+# set arguments [list width height autostart]
+
+# set object_params ""
+# if {[my exists params]} {
+# set paramlist [split [my set params] ,]
+# foreach p $paramlist {
+# set pair [split $p =]
+# set param([lindex $pair 0]) [lindex $pair 1]
+# }
+# }
+
+# #my msg [my name]-guess-type=[::xowiki::guesstype [my name]]
+# set mime [::xowiki::guesstype [my name]]
+
+# switch $mime {
+# video/x-ms-wmv {
+# # TODO: using classid will stop firefox loading plugin,
+# # without classid IE asks user to allow addon
+# # also possible: application/x-mplayer2
+# if {![my exists classid]} {set classid "CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6"}
+# foreach f $arguments {if {[info exists $f]} {append object_params ""}}
+# set objectElement \
+# ""
+# }
+# video/quicktime {
+# if {![my exists classid]} {set classid "CLSID:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"}
+# foreach f $arguments {if {[info exists $f]} {append object_params ""}}
+# set objectElement \
+# "\n"
+# }
+# application/x-shockwave-flash {
+# if {![my exists classid]} {set classid "CLSID:D27CDB6E-AE6D-11cf-96B8-444553540000"}
+# set embed_options ""
+# set app_params "?"
+# foreach f $arguments {if {[info exists $f]} { append embed_options "$f = '[set $f]' " }}
+# foreach {att value} [array get param] {append app_params "$att=$value&"} ;# replace with export_vars
+# set objectElement \
+# "