Changeset 17620
- Timestamp:
- 08/14/08 18:54:24 (19 months ago)
- Files:
-
- 1 modified
-
platform/tdiary/plugin/pathtraq_counter.rb (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
platform/tdiary/plugin/pathtraq_counter.rb
r17440 r17620 1 # pathtraq .rb $Revision 1.0 $1 # pathtraq_counter.rb $Revision 1.0 $ 2 2 # 3 3 # Copyright (c) 2008 SHIBATA Hiroshi <shibata.hiroshi@gmail.com> … … 14 14 begin 15 15 timeout(10) do 16 open( "http://api.pathtraq.com/page_counter? url=#{url}&m=#{mode}" ) do |f|16 open( "http://api.pathtraq.com/page_counter?api=json&url=#{url}&m=#{mode}" ) do |f| 17 17 json = JSON.parse( f.read ) 18 18 end … … 32 32 mode.each do |m| 33 33 json = call_pathtraq_json( url, m ) 34 r << %Q|<li>#{m}: #{json["count"]} </li>\n| unless json.nil?34 r << %Q|<li>#{m}: #{json["count"]} hits</li>\n| unless json.nil? 35 35 end 36 36 rescue => e … … 38 38 end 39 39 r << %Q|</ul>\n| 40 r << %Q|<div class="iddy"><span class="iddy-powered">Powered by <a href="http://pathtraq.com/"> pathtraq</a></span></div>\n|40 r << %Q|<div class="iddy"><span class="iddy-powered">Powered by <a href="http://pathtraq.com/">Pathtraq</a></span></div>\n| 41 41 42 42 return r
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)