summaryrefslogtreecommitdiff
path: root/sample/rss/tdiary_plugin
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
commit98d168ffc7331938a2aaaf761768de28f012dc24 (patch)
tree29bc901a604ead85301271a364250188a508f738 /sample/rss/tdiary_plugin
parent58f1ea99d711f94f11d8792a043a9ef8c5c74cef (diff)
* sample/rss/tdiary_plugin/rss-recent.rb: supported configuration
via Web browser. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8288 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'sample/rss/tdiary_plugin')
-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 0000000000..860773cca8
--- /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 0000000000..2c1bbe0237
--- /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 261ca872b7..f574135e31 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