Mephisto Post Pinging Improvement
ArticlePingObserver::SERVICES = [
{ :url => "http://rpc.pingomatic.com/", :type => :xmlrpc },
{ :url => "http://rpc.weblogs.com/pingSiteForm", :type => :rest },
{ :url => "http://pingomatic.com/ping/", :type => :weblogs_get, :extras => [ "chk_weblogscom=on&chk_blogs=on&chk_technorati=on&chk_feedburner=on&chk_syndic8=on&chk_newsgator=on&chk_feedster=on&chk_myyahoo=on&chk_pubsubcom=on&chk_blogdigger=on&chk_blogrolling=on&chk_blogstreet=on&chk_moreover=on&chk_weblogalot=on&chk_icerocket=on&chk_newsisfree=on&chk_topicexchange=on" ] },
{ :url => "http://rpc.technorati.com/rpc/ping", :type => :xmlrpc },
{ :url => "http://ping.syndic8.com/xmlrpc.php", :type => :xmlrpc },
{ :url => "http://rubycorner.com/ping/xmlrpc/e49ac4608c88606f75486e6da3da34de6527622a", :type => :xmlrpc, :category => 'ruby' },
{ :url => "http://rubylicio.us/ping/xmlrpc", :type => :xmlrpc, :category => 'ruby' }
}
There’s the array of services. Now the magic:
SERVICES.each do |sinfo|
if sinfo[:category] == "ruby"
next unless article.tags(true).collect{|t|t[:name]}.join(" ") =~ /\bruby\b/
end
Very simple. It should work on the basis of the service categories and the tags. We’ll see. Hopefully this post will end up on RubyCorner.


Aníbal Rojas
August 11, 2007 at 3:47 PM
Great! We have been trying to make the bloggers registered at RubyCorner.com to register with ruby specific feeds to help keep the directory centered in the topic, wish everybody had this care.
Mark Guzman
August 11, 2007 at 3:47 PM
Nice! I think I’ll add this to the plugin.