ad_general_links_summary db on_what_id on_which_table itemWhat it does:
Generates the line item list of links made on this item.Defined in: /web/philip/tcl/ad-general-links.tcl
Source code:
set user_id [ad_get_user_id] set approved_clause "and slm.approved_p = 't' and gl.approved_p = 't'" set return_url [ns_conn url]?[export_ns_set_vars "url"] set selection [ns_db select $db "select gl.link_id, gl.url, link_title, link_description, slm.map_id, slm.creation_time, first_names || ' ' || last_name as linker_name, u.user_id as link_user_id from general_links gl, site_wide_link_map slm, users u where gl.link_id = slm.link_id and on_what_id = $on_what_id and on_which_table = '[DoubleApos $on_which_table]' $approved_clause and slm.user_id = u.user_id"] append return_string "<ul>" while {[ns_db getrow $db $selection]} { set_variables_after_query if {[ad_parameter ClickthroughP general-links] == 1} { set exact_link "/ct/ad_link_${link_id}?send_to=$url" } else { set exact_link "$url" } append return_string "<li><a href=/general-links/one-link?[export_url_vars return_url link_id item]><a href=\"$exact_link\">$link_title</a> ($creation_time)</a> by <a href=\"/shared/community-member?user_id=$link_user_id\">$linker_name</a>" } append return_string "</ul>"