Index: openacs-4/packages/xowiki/xowiki.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/xowiki.info,v diff -u -r1.29 -r1.30 --- openacs-4/packages/xowiki/xowiki.info 17 Nov 2006 21:26:23 -0000 1.29 +++ openacs-4/packages/xowiki/xowiki.info 2 Dec 2006 14:09:35 -0000 1.30 @@ -10,18 +10,18 @@ Gustaf Neumann - A more generic xotcl-based wikis example with object types + A more generic xotcl-based wikis example with object types and subtypes based on the content repository (with category support) 2006-09-15 - XoWiki is a wiki implementation for OpenACS in xotcl. Instead of trying to -implement the full set of wiki markup commands of systems like MediaWiki, -XoWiki is based on a rich text editor and focuses more on integration -with oacs (e.g categories, general comments, adp-includes). XoWiki -combines aspects of wikis (ease of page-creation) with aspects of a -content management system (revisions, re-usable items, multiple -languages). Furthermore, XoWiki allows to define different types of links such -one could define book-structures (where a navigation structure could be built on the fly) or glossaries with differnt kind of word relationships (like synonyms, etc.). XoWiki supports pages in multiple languages and is localized (currently only for English and German). Currently, richtext and plaintext type entries are supported. Included support for adp-substitution in wiki pages and a file-selector. 0.13 supports page templates and uses the new generic form interface. Use of the oo layer for the content repository, reduced number of database interactions.0.18 supports text/enhanced, nice page names, import/export. Support for search (::xowiki::Page and ::xowiki::PlainPage); 0.20 support ::xowiki::Object, directory object, rss generation into syndication table, improved admin pages; 0.21: ajax-ased chat added, new attributes creator and page_title for all xowiki::Pages; 0.22 improved permission checking. 0.24 provides link-types, more includeletes (most-recently viewed, most frequently accessed pages). 0.26 provides Weblog support. 0.27: alignment with xotcl-core 0.38 (use cr_item.name instead of cr_revisions.title), change page_title to title (potential incompatibility) to rely more strictly to the CR data model (most files are effected). 0.28: tag and improved weblog support. 0.30: symbolic oo interface, nicer links, permission management. 0.31: per package search. 0.32: new class ::xowiki::File for [[file:readme.pdf]] and [[image:picture.jpg]] 0.33: direct inclusion of xowiki pages via {{en:mypage}}, simpler default pages (see xowiki/www/default-pages). 0.34: notifications; 0.36: prototypes, direct includes, context handling; 0.37: initial reqression testing (118 tests) - + XoWiki is a wiki implementation for OpenACS in xotcl. Instead of trying to +implement the full set of wiki markup commands of systems like MediaWiki, +XoWiki is based on a rich text editor and focuses more on integration +with oacs (e.g categories, general comments, adp-includes). XoWiki +combines aspects of wikis (ease of page-creation) with aspects of a +content management system (revisions, re-usable items, multiple +languages). Furthermore, XoWiki allows to define different types of links such +one could define book-structures (where a navigation structure could be built on the fly) or glossaries with differnt kind of word relationships (like synonyms, etc.). XoWiki supports pages in multiple languages and is localized (currently only for English and German). Currently, richtext and plaintext type entries are supported. Included support for adp-substitution in wiki pages and a file-selector. 0.13 supports page templates and uses the new generic form interface. Use of the oo layer for the content repository, reduced number of database interactions.0.18 supports text/enhanced, nice page names, import/export. Support for search (::xowiki::Page and ::xowiki::PlainPage); 0.20 support ::xowiki::Object, directory object, rss generation into syndication table, improved admin pages; 0.21: ajax-ased chat added, new attributes creator and page_title for all xowiki::Pages; 0.22 improved permission checking. 0.24 provides link-types, more includeletes (most-recently viewed, most frequently accessed pages). 0.26 provides Weblog support. 0.27: alignment with xotcl-core 0.38 (use cr_item.name instead of cr_revisions.title), change page_title to title (potential incompatibility) to rely more strictly to the CR data model (most files are effected). 0.28: tag and improved weblog support. 0.30: symbolic oo interface, nicer links, permission management. 0.31: per package search. 0.32: new class ::xowiki::File for [[file:readme.pdf]] and [[image:picture.jpg]] 0.33: direct inclusion of xowiki pages via {{en:mypage}}, simpler default pages (see xowiki/www/default-pages). 0.34: notifications; 0.36: prototypes, direct includes, context handling; 0.37: initial reqression testing (118 tests) + BSD-Style 0 @@ -39,17 +39,17 @@ - - + + - + Index: openacs-4/packages/xowiki/tcl/xowiki-portlet-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/Attic/xowiki-portlet-procs.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/xowiki/tcl/xowiki-portlet-procs.tcl 17 Nov 2006 21:26:23 -0000 1.2 +++ openacs-4/packages/xowiki/tcl/xowiki-portlet-procs.tcl 2 Dec 2006 14:09:35 -0000 1.3 @@ -359,6 +359,62 @@ return $content } -} + ############################################################################# + # presence + # + Class create presence \ + -superclass ::xowiki::Portlet \ + -parameter {{__decoration plain}} + + presence instproc render {} { + my initialize -parameter { + {-interval "10 minutes"} + {-max_users:integer 40} + {-page} + } + my get_parameters + + set sql "select user_id,time from xowiki_last_visited \ + where package_id = $package_id " + + if {[info exists page] && $page eq "this"} { + my instvar __including_page + append sql "and page_id = [$__including_page item_id] " + set limit_clause "limit $max_users" + set what "last on page [$__including_page title]" + } else { + append sql "and time > now() - '$interval'::interval " + set limit_clause "" + set what "currently in community [$package_id instance_name]" + + } + + append sql "order by time desc $limit_clause" + + set count 0 + set output "" + db_foreach get_visitors $sql { + if {[info exists seen($user_id)]} continue + set seen($user_id) $time + if {[incr count]>$max_users} { + set count $max_users + break + } + + if {[::xo::cc user_id]>0} { + regexp {^([^.]+)[.]} $time _ time + set pretty_time [util::age_pretty -timestamp_ansi $time \ + -sysdate_ansi [clock_to_ansi [clock seconds]] \ + -mode_3_fmt "%d %b %Y, at %X"] + + set name [::xo::get_user_name $user_id] + append output "\n" + } + } + if {$output ne ""} {set output "
$name$pretty_time
$output
\n"} + + return "

[array size seen] Users $what


$output
" + } +} Index: openacs-4/packages/xowiki/tcl/xowiki-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/xowiki-procs.tcl,v diff -u -r1.57 -r1.58 --- openacs-4/packages/xowiki/tcl/xowiki-procs.tcl 1 Dec 2006 08:37:16 -0000 1.57 +++ openacs-4/packages/xowiki/tcl/xowiki-procs.tcl 2 Dec 2006 14:09:35 -0000 1.58 @@ -123,7 +123,7 @@ } Page set recursion_count 0 Page array set RE { - include {([^\\]){{(.+)}}[ \n\r]*} + include {([^\\]){{([^<]+)}}[ \n\r]*} anchor {([^\\])\\\[\\\[([^\]]+)\\\]\\\]} div {()([^\\])>>([^&]*)<<()([ \n]*
)?} clean {[\\](\{\{|>>|\[\[)} Index: openacs-4/packages/xowiki/tcl/xowiki-www-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/xowiki-www-procs.tcl,v diff -u -r1.20 -r1.21 --- openacs-4/packages/xowiki/tcl/xowiki-www-procs.tcl 1 Dec 2006 08:16:13 -0000 1.20 +++ openacs-4/packages/xowiki/tcl/xowiki-www-procs.tcl 2 Dec 2006 14:09:35 -0000 1.21 @@ -41,6 +41,20 @@ set content [my render] my log "--after render" + set vp [$package_id get_parameter "top_portlet" ""] + if {$vp ne ""} { + set vp_name [lindex $vp 0] + if {[my isclass ::xowiki::portlet::$vp_name]} { + set p [::xowiki::portlet::$vp_name new \ + -package_id $package_id \ + -name $vp_name \ + -actual_query [::xo::cc actual_query] \ + -destroy_on_cleanup ] + $p set __caller_parameters [lrange $vp 1 end] + set content [$p render]$content + } + } + if {[$package_id get_parameter "use_user_tracking" 1]} { my record_last_visited } Index: openacs-4/packages/xowiki/www/resources/xowiki.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/resources/xowiki.css,v diff -u -r1.6 -r1.7 --- openacs-4/packages/xowiki/www/resources/xowiki.css 15 Sep 2006 16:45:00 -0000 1.6 +++ openacs-4/packages/xowiki/www/resources/xowiki.css 2 Dec 2006 14:09:35 -0000 1.7 @@ -97,6 +97,11 @@ a:visited.rss {color: #FFF} a:link.rss {color: #FFF} +#presence {float:right; right: 1em; clear: right; font-size: 75%; padding: 5px; + border:dotted; border-width:1px;background: #f8f8f8 +} +#presence h1 {font-size: 11px; margin-bottom: 0px} + .code { font-family: "Courier", monospace; }