| 855 |
|
|
| 856 |
// やりかたが苦しいけど、オプションダイアログのプレビュー用 try |
// やりかたが苦しいけど、オプションダイアログのプレビュー用 try |
| 857 |
try |
try |
| 858 |
if ThreadItem.ParentBoard.ParentCategory <> nil then |
if ThreadItem.ParentBoard <> nil then |
| 859 |
Skin.Text := StringReplace( Skin.Text, '<BBSNAME/>', ThreadItem.ParentBoard.ParentCategory.ParentBBS2ch.Title, [rfReplaceAll] ); |
if ThreadItem.ParentBoard.ParentCategory <> nil then |
| 860 |
if ThreadItem.ParentBoard.BBSID <> '' then |
Skin.Text := StringReplace( Skin.Text, '<BBSNAME/>', ThreadItem.ParentBoard.ParentCategory.ParentBBS2ch.Title, [rfReplaceAll] ); |
| 861 |
Skin.Text := StringReplace( Skin.Text, '<THREADURL/>', GikoSys.GetURL(ThreadItem.ParentBoard.BBSID, ThreadItem.FileName), [rfReplaceAll] ); |
Skin.Text := StringReplace( Skin.Text, '<THREADURL/>', ThreadItem.URL, [rfReplaceAll] ); |
| 862 |
except end; |
except end; |
| 863 |
Skin.Text := StringReplace( Skin.Text, '<BOARDNAME/>', ThreadItem.ParentBoard.Title, [rfReplaceAll] ); |
Skin.Text := StringReplace( Skin.Text, '<BOARDNAME/>', ThreadItem.ParentBoard.Title, [rfReplaceAll] ); |
| 864 |
Skin.Text := StringReplace( Skin.Text, '<BOARDURL/>', ThreadItem.ParentBoard.URL, [rfReplaceAll] ); |
Skin.Text := StringReplace( Skin.Text, '<BOARDURL/>', ThreadItem.ParentBoard.URL, [rfReplaceAll] ); |
| 876 |
//----- とりあえずかちゅ〜しゃ互換用。コメントアウトしてもよし |
//----- とりあえずかちゅ〜しゃ互換用。コメントアウトしてもよし |
| 877 |
// やりかたが苦しいけど、オプションダイアログのプレビュー用 try |
// やりかたが苦しいけど、オプションダイアログのプレビュー用 try |
| 878 |
try |
try |
| 879 |
if ThreadItem.ParentBoard.ParentCategory <> nil then |
if ThreadItem.ParentBoard <> nil then |
| 880 |
Skin.Text := StringReplace( Skin.Text, '&BBSNAME', ThreadItem.ParentBoard.ParentCategory.ParentBBS2ch.Title, [rfReplaceAll] ); |
if ThreadItem.ParentBoard.ParentCategory <> nil then |
| 881 |
if ThreadItem.ParentBoard.BBSID <> '' then |
Skin.Text := StringReplace( Skin.Text, '&BBSNAME', ThreadItem.ParentBoard.ParentCategory.ParentBBS2ch.Title, [rfReplaceAll] ); |
| 882 |
Skin.Text := StringReplace( Skin.Text, '&THREADURL', GikoSys.GetURL(ThreadItem.ParentBoard.BBSID, ThreadItem.FileName), [rfReplaceAll] ); |
Skin.Text := StringReplace( Skin.Text, '&THREADURL', ThreadItem.URL, [rfReplaceAll] ); |
| 883 |
except end; |
except end; |
| 884 |
Skin.Text := StringReplace( Skin.Text, '&BOARDNAME', ThreadItem.ParentBoard.Title, [rfReplaceAll] ); |
Skin.Text := StringReplace( Skin.Text, '&BOARDNAME', ThreadItem.ParentBoard.Title, [rfReplaceAll] ); |
| 885 |
Skin.Text := StringReplace( Skin.Text, '&BOARDURL', ThreadItem.ParentBoard.URL, [rfReplaceAll] ); |
Skin.Text := StringReplace( Skin.Text, '&BOARDURL', ThreadItem.ParentBoard.URL, [rfReplaceAll] ); |
| 972 |
else |
else |
| 973 |
boardPlugIn := nil; |
boardPlugIn := nil; |
| 974 |
if boardPlugIn <> nil then begin |
if boardPlugIn <> nil then begin |
| 975 |
|
//===== プラグインによる表示 |
| 976 |
if Assigned( Pointer( boardPlugIn.Module ) ) then begin |
if Assigned( Pointer( boardPlugIn.Module ) ) then begin |
| 977 |
NewReceiveNo := ThreadItem.NewReceive; |
NewReceiveNo := ThreadItem.NewReceive; |
| 978 |
|
|
| 979 |
// フォントやサイズの設定 |
// フォントやサイズの設定 |
| 980 |
if Length( GikoSys.Setting.BrowserFontName ) > 0 then |
if Length( GikoSys.Setting.BrowserFontName ) > 0 then |
| 981 |
UserOptionalStyle := UserOptionalStyle + |
UserOptionalStyle := UserOptionalStyle + |
| 1001 |
SaveList := TStringList.Create; |
SaveList := TStringList.Create; |
| 1002 |
try |
try |
| 1003 |
doc.open; |
doc.open; |
| 1004 |
//doc.charset := 'Shift_JIS'; |
// 文字コードはプラグインに任せる |
| 1005 |
threadItem.SizeByte := 0; |
// doc.charset := 'Shift_JIS'; |
| 1006 |
|
threadItem.SizeByte := 0; |
| 1007 |
|
|
| 1008 |
// ヘッダ |
// ヘッダ |
| 1009 |
SaveList.Add( boardPlugIn.GetHeader( DWORD( threadItem ), |
SaveList.Add( boardPlugIn.GetHeader( DWORD( threadItem ), |
| 1010 |
'<style type="text/css">body {' + UserOptionalStyle + '}</style>' ) ); |
'<style type="text/css">body {' + UserOptionalStyle + '}</style>' ) ); |
| 1011 |
SaveList.Add('<a name="top"></a>'); |
SaveList.Add('<a name="top"></a>'); |
| 1012 |
|
|
| 1013 |
for i := 0 to threadItem.AllResCount - 1 do begin |
for i := 0 to threadItem.AllResCount - 1 do begin |
| 1015 |
Continue; |
Continue; |
| 1016 |
end; |
end; |
| 1017 |
|
|
| 1018 |
// 新着マーク |
// 新着マーク |
| 1019 |
if (NewReceiveNo = (i + 1)) or ((NewReceiveNo = 0) and (i = 0)) then begin |
if (NewReceiveNo = (i + 1)) or ((NewReceiveNo = 0) and (i = 0)) then begin |
| 1020 |
try |
try |
| 1021 |
SaveList.Add( LoadSkin( GetSkinNewmarkFileName ) ); |
SaveList.Add( LoadSkin( GetSkinNewmarkFileName ) ); |
| 1022 |
except |
except |
| 1023 |
SaveList.Add( '<a name="new"></a>' ); |
SaveList.Add( '<a name="new"></a>' ); |
| 1024 |
end; |
end; |
| 1025 |
end; |
end; |
| 1026 |
|
|
| 1027 |
// レス |
// レス |
| 1028 |
SaveList.Add( boardPlugIn.GetRes( DWORD( threadItem ), i + 1 ) ); |
SaveList.Add( boardPlugIn.GetRes( DWORD( threadItem ), i + 1 ) ); |
| 1029 |
|
|
| 1030 |
if ThreadItem.Kokomade = (i + 1) then begin |
if ThreadItem.Kokomade = (i + 1) then begin |
| 1031 |
// ここまで読んだ |
// ここまで読んだ |
| 1032 |
try |
try |
| 1033 |
SaveList.Add( LoadSkin( GetSkinBookmarkFileName ) ); |
SaveList.Add( LoadSkin( GetSkinBookmarkFileName ) ); |
| 1034 |
except |
except |
| 1035 |
SaveList.Add( '<a name="koko"></a>' ); |
SaveList.Add( '<a name="koko"></a>' ); |
| 1036 |
end; |
end; |
| 1037 |
end; |
end; |
| 1038 |
|
|
| 1039 |
threadItem.SizeByte := SizeByte + Length( SaveList.Text ); |
threadItem.SizeByte := SizeByte + Length( SaveList.Text ); |
| 1040 |
doc.Write(SaveList.Text); |
doc.Write(SaveList.Text); |
| 1045 |
threadItem.SizeByte := SizeByte + Length( SaveList.Text ); |
threadItem.SizeByte := SizeByte + Length( SaveList.Text ); |
| 1046 |
|
|
| 1047 |
// スキン(フッタ) |
// スキン(フッタ) |
| 1048 |
boardPlugIn.GetFooter( DWORD( threadItem ), '' ); |
SaveList.Add( boardPlugIn.GetFooter( DWORD( threadItem ), '' ) ); |
| 1049 |
|
|
| 1050 |
doc.Write(SaveList.Text); |
doc.Write(SaveList.Text); |
| 1051 |
finally |
finally |