Class ::xowiki::includelet::my-general-comments

::xowiki::includelet::my-general-comments[i] create ... \
           [ -__decoration (default "none") ]

List the general comments available for the current page.
Defined in /var/www/openacs.org/packages/xowiki/tcl/includelet-procs.tcl

Class Relations

  • class: ::xowiki::IncludeletClass[i]
  • superclass: ::xowiki::Includelet[i]
::xowiki::IncludeletClass create ::xowiki::includelet::my-general-comments \
     -superclass ::xowiki::Includelet

Methods (to be applied on instances)

  • __decoration (setter)

  • render (scripted)

    :get_parameters
    set item_id [${:__including_page} item_id]
    set gc_return_url [::$package_id url]
    #
    # Even, if general_comments is turned on, don't offer the
    # link to add comments, unless the user is logged in.
    # Otherwise, this attracts spammers and search bots
    #
    if {[::xo::cc user_id] != 0} {
      set gc_link [general_comments_create_link  -object_name [${:__including_page} title]  $item_id $gc_return_url]
      set gc_link <p>$gc_link</p>
    } else {
      set gc_link ""
    }
    set gc_comments [general_comments_get_comments $item_id $gc_return_url]
    if {$gc_comments ne ""} {
      return "<p>#general-comments.Comments#</p><ul>$gc_comments</ul>$gc_link"
    } else {
      return "$gc_link"
    }