summaryrefslogtreecommitdiffstats
path: root/sample/rss
diff options
context:
space:
mode:
authorkou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-04-09 05:47:33 +0000
committerkou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-04-09 05:47:33 +0000
commita50712d6f6540f4759d21ae0e9ba2f57ee5e4218 (patch)
tree29bc901a604ead85301271a364250188a508f738 /sample/rss
parentf7132983798812a3b05887cc99337241094d5b47 (diff)
downloadruby-a50712d6f6540f4759d21ae0e9ba2f57ee5e4218.tar.gz
ruby-a50712d6f6540f4759d21ae0e9ba2f57ee5e4218.tar.xz
ruby-a50712d6f6540f4759d21ae0e9ba2f57ee5e4218.zip
* sample/rss/tdiary_plugin/rss-recent.rb: supported configuration
via Web browser. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@8288 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'sample/rss')
-rw-r--r--sample/rss/tdiary_plugin/en/rss-recent.rb22
-rw-r--r--sample/rss/tdiary_plugin/ja/rss-recent.rb22
-rw-r--r--sample/rss/tdiary_plugin/rss-recent.rb24
3 files changed, 68 insertions, 0 deletions
diff --git a/sample/rss/tdiary_plugin/en/rss-recent.rb b/sample/rss/tdiary_plugin/en/rss-recent.rb
new file mode 100644
index 000000000..860773cca
--- /dev/null
+++ b/sample/rss/tdiary_plugin/en/rss-recent.rb
@@ -0,0 +1,22 @@
+# -*- indent-tabs-mode: t -*-
+
+def label_rss_recent_title
+ 'External RSS display'
+end
+
+def label_rss_recent_use_image_link_title
+ 'Image treatment'
+end
+
+def label_rss_recent_use_image_link_description
+ "Select whether you use image as link instead of text or not " +
+ "if the RSS has Web site's image information."
+end
+
+def label_rss_recent_not_use_image_link
+ "don't use image as link"
+end
+
+def label_rss_recent_use_image_link
+ "use image as link"
+end
diff --git a/sample/rss/tdiary_plugin/ja/rss-recent.rb b/sample/rss/tdiary_plugin/ja/rss-recent.rb
new file mode 100644
index 000000000..2c1bbe023
--- /dev/null
+++ b/sample/rss/tdiary_plugin/ja/rss-recent.rb
@@ -0,0 +1,22 @@
+# -*- indent-tabs-mode: t -*-
+
+def label_rss_recent_title
+ '外部RSSの表示'
+end
+
+def label_rss_recent_use_image_link_title
+ '画像の扱い'
+end
+
+def label_rss_recent_use_image_link_description
+ 'もしRSSにWebサイトの画像情報が含まれていたら,' +
+ 'Webサイトへのリンクにテキストではなくその画像を用います.'
+end
+
+def label_rss_recent_not_use_image_link
+ 'リンクに画像を用いない'
+end
+
+def label_rss_recent_use_image_link
+ 'リンクに画像を用いる'
+end
diff --git a/sample/rss/tdiary_plugin/rss-recent.rb b/sample/rss/tdiary_plugin/rss-recent.rb
index 261ca872b..f574135e3 100644
--- a/sample/rss/tdiary_plugin/rss-recent.rb
+++ b/sample/rss/tdiary_plugin/rss-recent.rb
@@ -263,3 +263,27 @@ def rss_recent_pubDate_to_dc_date(target)
end
end
end
+
+add_conf_proc('rss-recent', label_rss_recent_title) do
+ item = 'rss-recent.use-image-link'
+ if @mode == 'saveconf'
+ @conf[item] = (@cgi.params[item][0] == 't')
+ end
+
+ <<-HTML
+ <div class"body">
+ <h3 class="subtitle">#{label_rss_recent_use_image_link_title}</h3>
+ <p>#{label_rss_recent_use_image_link_description}</p>
+ <p>
+ <select name=#{item}>
+ <option value="f"#{@conf[item] ? '' : ' selected'}>
+ #{label_rss_recent_not_use_image_link}
+ </option>
+ <option value="t"#{@conf[item] ? ' selected' : ''}>
+ #{label_rss_recent_use_image_link}
+ </option>
+ </select>
+ </p>
+ </div>
+ HTML
+end