forum::message::subject_sort_filter (public, deprecated)

 forum::message::subject_sort_filter -forum_id forum_id \
    -order_by order_by

Defined in packages/forums/tcl/messages-procs.tcl

Deprecated. Invoking this procedure generates a warning.

-forum_id (required)
-order_by (required)
A piece of HTML for toggling the sort order of threads (subjects) in a forum. The user can either sort by the first postings in subjects (the creation date of the subjects) or the last one. DEPRECATED: this proc is not mentioned anywhere in current upstream codebase. Furthermore, it refers to a very specific UI (e.g. sorting properties, styling...) and does therefore provide little value in general.
Peter Marklund

See Also:
  • idioms in the specific UI

Partial Call Graph (max 5 caller/called nodes):
%3 _ _ (public) ad_conn ad_conn (public) ad_get_tcl_call_stack ad_get_tcl_call_stack (public) export_vars export_vars (public) forum::message::subject_sort_filter forum::message::subject_sort_filter forum::message::subject_sort_filter->_ forum::message::subject_sort_filter->ad_conn forum::message::subject_sort_filter->ad_get_tcl_call_stack forum::message::subject_sort_filter->export_vars

No testcase defined.
Source code:
ns_log Notice "Deprecated proc forum::message::subject_sort_filter used:\n[ad_get_tcl_call_stack]"

    set subject_label [_ forums.lt_First_post_in_subject]
    set child_label [_ forums.Last_post_in_subject]
    set new_order_by [expr {$order_by eq "posting_date" ? "last_child_post" : "posting_date"}]

    set toggle_url [export_vars -base [ad_conn url] -override {{order_by $new_order_by}} {order_by forum_id}]
    if {$order_by eq "posting_date"} {
        # subject selected
        set subject_link "<b>$subject_label</b>"
        set child_link "<a href=\"[ns_quotehtml $toggle_url]\">$child_label</a>"
    } else {
        # child selected
        set subject_link "<a href=\"[ns_quotehtml $toggle_url]\">$subject_label</a>"
        set child_link "<b>$child_label</b>"
    set sort_filter "$subject_link | $child_link"

    return $sort_filter
XQL Not present:
PostgreSQL, Oracle
Generic XQL file:

[ hide source ] | [ make this the default ]
Show another procedure: