1
# whatsnew.rb $Revision: 1.4 $
7
# ̤�ɤΥ��������˻��ꤷ���ޡ�����Ĥ��뤳�Ȥ��Ǥ��ޤ���
10
# tdiary.conf �� @section_anchor ����Ƭ�˰ʲ��Τ褦�� <%= whats_new %> ���ɲä��ޤ���
1
# -*- coding: utf-8 -*-
8
# 未読のセクションに指定したマークをつけることができます.
11
# tdiary.conf の @section_anchor の先頭に以下のように <%= whats_new %> を追加します.
12
13
# @section_anchor = '<%= whats_new %><span class="sanchor">_</span>'
14
# ����������̤��/���ɤˤ�ä� <%= whats_new %> ����ʬ�����餫�����
15
# �ꤷ���ޡ������֤��������ޤ����ǥե���ȤǤ�̤�ɥ��������Ǥ�
16
# "!!!NEW!!!"�����ɥ��������Ǥ� "" ��Ÿ������ޤ���
18
# ����Revision �� 1.1 �� whats_new.rb �������Ǥϡ�<span> �����
19
# <%= whats_new %> ��ޤ��褦�˽Ƥ��ޤ�������sanchor�Dz�����
20
# ɽ������褦�ʥơ��ޤǤϡ�whats_new �ν��Ϥ� sanchor �β�������
21
# �ʤäƤ��ޤ��Ȥ������꤬����ޤ�����
22
# �����ѹ���ȼ�������ɻ��Υǥե���Ȥ� '' ���ѹ����ޤ�����
24
# �֤���������ʸ������ѹ����������� tdiary.conf ���
15
# セクションの未読/既読によって <%= whats_new %> の部分があらかじめ指
16
# 定したマークで置き換えられます.デフォルトでは未読セクションでは
17
# "!!!NEW!!!",既読セクションでは "" に展開されます.
19
# 注:Revision が 1.1 の whats_new.rb の説明では,<span> の中に
20
# <%= whats_new %> を含めるように書いていましたが,sanchorで画像を
21
# 表示するようなテーマでは,whats_new の出力と sanchor の画像が重
23
# この変更に伴い,既読時のデフォルトは '' に変更しました.
25
# 置き換えられる文字列を変更したい場合は tdiary.conf 中で
26
27
# @options['whats_new.new_mark'] = '<img src="/Images/new.png" alt="NEW!" border="0">'
27
# @options['whats_new.read_mark'] = '��'
28
# @options['whats_new.read_mark'] = '既'
31
32
# Copyright (c) 2002 Junichiro KITA <kita@kitaj.no-ip.com>
32
33
# Distributed under the GPL
41
42
if t > @whats_new[:this_time]
42
43
@whats_new[:this_time] = t
44
# ���⤷���� cookie ��Ȥ�ʤ�����ξ��ϵ�ǽ���ʤ�
45
# 初回もしくは cookie を使わない設定の場合は機能しない
45
46
return apply_plugin( @whats_new[:read_mark] ) if @whats_new[:last_time] == "00000000000"
46
47
if t > @whats_new[:last_time]
47
48
apply_plugin( @whats_new[:new_mark] )
64
65
if @cgi.cookies['tdiary_whats_new'][0]
65
66
@whats_new[:this_time] = @whats_new[:last_time] = @cgi.cookies['tdiary_whats_new'][0]
67
# ���ơ��⤷���� cookie �ϻȤ�ʤ�����
68
# 初めて,もしくは cookie は使わない設定
68
69
@whats_new[:this_time] = @whats_new[:last_time] = "00000000000"
70
71
@whats_new[:new_mark] = @options['whats_new.new_mark'] || '!!!new!!!'