trackback::auto_ping (public)

 trackback::auto_ping [ -url url ] [ -content content ] \
    [ -blog_name blog_name ] [ -title title ] [ -excerpt excerpt ]

Defined in packages/trackback/tcl/trackback-procs.tcl

searches and entry for links and checks them for trackback support. If trackback is supported, the parameters are user to make a trackback ping. http://www.movabletype.org/docs/mttrackback.html

Switches:
-url
(optional)
permanent url of weblog entry
-content
(optional)
-blog_name
(optional)
-title
(optional)
title of weblog entry
-excerpt
(optional)
part of weblog entry

Partial Call Graph (max 5 caller/called nodes):
%3 empty_string_p empty_string_p (public, deprecated) trackback::get_ping_url trackback::get_ping_url (public) trackback::send_ping trackback::send_ping (public) trackback::auto_ping trackback::auto_ping trackback::auto_ping->empty_string_p trackback::auto_ping->trackback::get_ping_url trackback::auto_ping->trackback::send_ping

Testcases:
No testcase defined.
Source code:

    # loop through links
    # hopefully this will grab anthing starting with http://
    # maybe we need to check other stuff? 
    set links_list [regexp -all -inline {http://[^\"^\s]*} $content]
    ns_log Debug "trackback: List of links $links_list"
    # get trackback url
    foreach link $links_list {
    set result_list [ad_httpget -url $link]
    ns_log debug "trackback: results $result_list"
    array set link_array $result_list
    if {[string equal $link_array(status) 200 ]} {
        #get trackback_info if available
        set ping_url_args [trackback::get_ping_url -data $link_array(page) -link $link]
        set ping_url [lindex $ping_url_args 0]
        set ping_method [lindex $ping_url_args 1]
        if {![empty_string_p $ping_url]} {
        trackback::send_ping -ping_url $ping_url  -excerpt $excerpt  -url $url  -title $title  -blog_name $blog_name  -method $ping_method
        }

    }
    
    }
XQL Not present:
PostgreSQL, Oracle
Generic XQL file:
packages/trackback/tcl/trackback-procs.xql

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