【htmldwarf411.cgi】Life履歴順目次追加のため改造
1453行に追加
# LIFE
if (/<a href="([^"]*?)"[^>]*id="LINK_LIFE">(.*?)<\/a>/i ) {
$data{'link_life'} = $1;
$data{'link_life_word'} = $2;
}elsif ((/<!--([^>]*?)LINK_LIFE([^>]*?)-->/) and (! $data{'link_life_word'})) {
$data{'link_life_word'} = '';
}
1701行変更
# リンク定義
my @linkvars = (
'LINK_PREV',
'LINK_NEXT',
'LINK_TOP',
'LINK_LIFE',
'LINK_HOME'
);
my @data;
foreach my $line (@tempdata) {
$line = &makepages(\$line, \@changevars, \@linkvars, \@tempdata);
push (@data, $line);
}
push (@data, "\n");
my @filedata;
push (@filedata, qq(<!--TYPE:NOVEL-->));
push (@filedata, qq(<!--TEMPLATE:$input{'template'}-->));
push (@filedata, qq(<!--SITE_NAME:$input{'site_name'}-->));
push (@filedata, qq(<!--SITE_URL:$input{'site_url'}-->));
push (@filedata, qq(<!--AUTHOR:$input{'author'}-->));
push (@filedata, qq(<!--AUTHOR_ENG:$input{'author_eng'}-->));
push (@filedata, qq(<!--INDEXFILE:$input{'indexfile'}-->));
push (@filedata, qq(<!--NOVEL_TITLE:$input{'novel_title'}-->));
push (@filedata, qq(<!--INFO:$input{'info'}-->));
push (@filedata, qq(<!--CHAPTER_TITLE:$input{'chapter_title'}-->));
push (@filedata, qq(<!--CHAPTER_INFO:$input{'chapter_info'}-->));
push (@filedata, qq(<!--LINK_TOP_TARGET:$input{'link_top_target'}-->));
push (@filedata, qq(<!--LINK_LIFE_TARGET:$input{'link_life_target'}-->));
push (@filedata, qq(<!--LINK_HOME_TARGET:$input{'link_home_target'}-->));
push (@filedata, qq(<!--BREAK_TAG:$input{'break_tag'}-->));
push (@filedata, qq(<!--PARAGRAPH:$input{'paragraph'}-->));
push (@filedata, qq(<!--PARAGRAPH_LINE:$input{'paragraph_line'}-->));
push (@filedata, qq(<!--COPYRIGHT:$input{'copyright'}-->));
push (@filedata, qq(<!--DWARF_LINK:$input{'dwarf_link'}-->));
if ($input{'hidden_next'}) {
push (@filedata, qq(<!--NEXT:$input{'link_next'},$input{'link_next_word'}-->));
}
push (@data, join ("\n", @filedata));
my $data = join ("", @data);
return $data;
}
1786行変更
# リンク定義
my @linkvars = (
'LINK_TOP',
'LINK_LIFE',
'LINK_HOME'
);
2470行変更
# 各パーツを取得
my $formparts_file = &formparts_file ($dir, $file, $data{'template'});
my $formparts_novel = &formparts_novel ($data{'novel_title'}, $data{'info'});
my $formparts_chapter = &formparts_chapter ($data{'chapter_title'}, $data{'chapter_info'});
my $formparts_linkprev = &formparts_link ('prev', $data{'link_prev'}, $data{'link_prev_word'});
my $formparts_linknext = &formparts_link ('next', $data{'link_next'}, $data{'link_next_word'});
my $formparts_linktop = &formparts_link ('top', $data{'link_top'}, $data{'link_top_word'});
my $formparts_linklife = &formparts_link ('life', $data{'link_life'}, $data{'link_life_word'});
my $formparts_linkhome = &formparts_link ('home', $data{'link_home'}, $data{'link_home_word'});
my $formparts_author = &formparts_author ($data{'site_name'}, $data{'site_url'}, $data{'author'}, $data{'author_eng'});
my $formparts_linktop_target = &formparts_target ('link_top', \%data);
my $formparts_linklife_target = &formparts_target ('link_life', \%data);
my $formparts_linkhome_target = &formparts_target ('link_home', \%data);
my $formparts_design = &formparts_design (\%data);
my $formparts_buttons = &formparts_button;
$document = &sanitize ($data{'document'});
my $doc_width = $doc_width . 'em';
print <<FORM;
2531行変更
$formparts_linkprev
$formparts_linknext
$formparts_linktop
$formparts_linklife
$formparts_linkhome
$formparts_author
2543行変更
<table>
<tr>
<td>本文→目次</td>
<td>$formparts_linktop_target
</td>
</tr>
<tr>
<td>本文→LIFE履歴目次</td>
<td>$formparts_linklife_target
</td>
</tr>
<tr>
<td>本文→ホーム</td>
<td>$formparts_linkhome_target
</td>
</tr>
</table>
2955行変更
<input type="button" value="小説タイトル" onclick="DwarfVars('\$NOVEL_TITLE')"><input
type="button" value="小説紹介" onclick="DwarfVars('\$INFO')"><input
type="button" value="章タイトル" onclick="DwarfVars('\$CHAPTER_TITLE')"><input
type="button" value="章紹介" onclick="DwarfVars('\$CHAPTER_INFO')"><input
type="button" value="前頁" onclick="DwarfVars('\$LINK_PREV')"><input
type="button" value="次頁" onclick="DwarfVars('\$LINK_NEXT')"><input
type="button" value="TOP" onclick="DwarfVars('\$LINK_TOP')"><input
type="button" value="LIFE" onclick="DwarfVars('\$LINK_LIFE')"><input
type="button" value="HOME" onclick="DwarfVars('\$LINK_HOME')"><br>
<input type="button" value="本文" onclick="DwarfVars('\$DOCUMENT')"><input
type="button" value="著者名" onclick="DwarfVars('\$AUTHOR')"><input
type="button" value="著者英名" onclick="DwarfVars('\$AUTHOR_ENG')"><input
type="button" value="サイト名" onclick="DwarfVars('\$SITE_NAME')"><input
type="button" value="サイトURL" onclick="DwarfVars('\$SITE_URL')"><input
type="button" value="サイトリンク" onclick="DwarfVars('\$SITE_LINK')"><br><input
type="button" value="年" onclick="DwarfVars('\$YEAR')"><input
type="button" value="月" onclick="DwarfVars('\$MONTH')"><input
type="button" value="日" onclick="DwarfVars('\$DAY')"><input
type="button" value="時" onclick="DwarfVars('\$HOUR')"><input
type="button" value="分" onclick="DwarfVars('\$MIN')"><input
type="button" value="秒" onclick="DwarfVars('\$SEC')">
3531行変更
# 各パーツ生成
my $formparts_novel = &formparts_novel ($novel_title);
my $formparts_linktop = &formparts_link ('top', $data{'link_top'}, $data{'link_top_word'});
my $formparts_linkife = &formparts_link ('life', $data{'link_life'}, $data{'link_life_word'});
my $formparts_linkhome = &formparts_link ('home', $data{'link_home'}, $data{'link_home_word'});
my $formparts_author = &formparts_author ($data{'site_name'}, $data{'site_url'}, $data{'author'}, $data{'author_eng'});
my $formparts_linktop_target = &formparts_target ('link_top', \%data);
my $formparts_linklife_target = &formparts_target ('link_life', \%data);
my $formparts_linkdocument_target = &formparts_target ('link_document', \%data);
my $formparts_linkhome_target = &formparts_target ('link_home', \%data);
my $formparts_design = &formparts_design (\%data);
my $formparts_buttons = &formparts_button;
3623行変更
$formparts_linktop
$formparts_linklife
$formparts_linkhome
3649行変更
<table>
<tr>
<td>本文→目次</td>
<td>$formparts_linktop_target
</td>
</tr>
<tr>
<td>本文→LIFE履歴目次</td>
<td>$formparts_linklife_target
</td>
</tr>
<tr>
<td>本文→ホーム</td>
<td>$formparts_linkhome_target
</td>
</tr>
3738行変更
<table>
<tr>
<td>前頁</td>
<td><input type="text" name="link_prev_word" size="40" class="nes" value="$data{'link_prev_word'}"></td>
</tr>
<tr>
<td>次頁</td>
<td><input type="text" name="link_next_word" size="40" class="nes" value="$data{'link_next_word'}"></td>
</tr>
<tr>
<td>目次</td>
<td><input type="text" name="link_top_word" size="40" class="nes" value="$data{'link_top_word'}"></td>
</tr>
<tr>
<td>目次</td>
<td><input type="text" name="link_life_word" size="40" class="nes" value="$data{'link_life_word'}"></td>
</tr>
<tr>
<td>ホーム</td>
<td><input type="text" name="link_home_word" size="40" class="nes" value="$data{'link_home_word'}"></td>
</tr>
</table>
3765行変更
<table>
<tr>
<td>本文→目次</td>
<td>
<select name="link_top_target">
<option value="0"$selected{'link_top_target_0'}>なし</option>
<option value="1"$selected{'link_top_target_1'}>新ウィンドウ</option>
<option value="2"$selected{'link_top_target_2'}>全フレーム解除</option>
<option value="3"$selected{'link_top_target_3'}>親フレーム解除</option>
<option value="4"$selected{'link_top_target_4'}>その他</option>
</select>
その他 : <input type="text" name="link_top_othertarget" value="$data{'link_top_othertarget'}" class="nes" style="ime-mode:disabled">
</td>
</tr>
<tr>
<td>本文→LIFE履歴目次</td>
<td>
<select name="link_life_target">
<option value="0"$selected{'link_life_target_0'}>なし</option>
<option value="1"$selected{'link_life_target_1'}>新ウィンドウ</option>
<option value="2"$selected{'link_life_target_2'}>全フレーム解除</option>
<option value="3"$selected{'link_life_target_3'}>親フレーム解除</option>
<option value="4"$selected{'link_life_target_4'}>その他</option>
</select>
その他 : <input type="text" name="link_life_othertarget" value="$data{'link_life_othertarget'}" class="nes" style="ime-mode:disabled">
</td>
</tr>
<tr>
<td>本文→ホーム</td>
<td>
<select name="link_home_target">
<option value="0"$selected{'link_home_target_0'}>なし</option>
<option value="1"$selected{'link_home_target_1'}>新ウィンドウ</option>
<option value="2"$selected{'link_home_target_2'}>全フレーム解除</option>
<option value="3"$selected{'link_home_target_3'}>親フレーム解除</option>
<option value="4"$selected{'link_home_target_4'}>その他</option>
</select>
その他 : <input type="text" name="link_home_othertarget" value="$data{'link_home_othertarget'}" class="nes" style="ime-mode:disabled">
</td>
</tr>
4047行変更
my %titles = (
'prev' => '前頁',
'next' => '次頁',
'top' => 'トップ',
'life' => 'LIFE履歴トップ',
'home' => 'ホーム'
);
4572行変更
# ドロップダウンリスト
@selected = ('link_top_target','link_life_target', 'link_home_target', 'link_document_target', 'link_indextohome_target');
ラベル:PC