#
# More - A More... menu module to hide infrequently used modules
#
# Note: It is named '{more}.itcl' so that it loads up last and
# hence is able to see (and hide) any installed module.
#
proc action_more {chan path env} {
global hidden_modules
set tbl ""
set sub ""
foreach module $hidden_modules {
append sub "[html_link "/[lindex $module 0]" [lindex $module 1]] "
append tbl [tr "ALIGN=LEFT" [td [html_link "/[lindex $module 0]" [lindex $module 1]]] [td [lindex $module 2]]]
}
puts $chan [html_start "More modules..." $sub]
puts $chan "
More modules... |
"
puts $chan $tbl
puts $chan [html_table_end]
puts $chan [html_end]
}
if {[file exists $source_dir/modules/{more}.cfg]} {
set fd [open $source_dir/modules/{more}.cfg r]
set hidden_list [read $fd]
close $fd
} else {
set hidden_list {MFS RSS Logos Extract Gallery GDchecker ChannelMap "MRV Setup" "Channel Prefs" "Resource Editor" Update}
}
set hidden_modules {}
foreach module $module_list {
set url [lindex $module 0]
set sdesc [lindex $module 1]
if {[lsearch $hidden_list $sdesc] >= 0} {
set index [lsearch $module_list $module]
set module_list [lreplace $module_list $index $index]
lappend hidden_modules $module
}
}
unset hidden_list
register_module "more" "more..." "Modules that are not used very often"