| 13 |
MSHTML_TLB, |
MSHTML_TLB, |
| 14 |
{$IFEND} |
{$IFEND} |
| 15 |
{HttpApp,} YofUtils, URLMon, IdGlobal, IdURI, {Masks,} |
{HttpApp,} YofUtils, URLMon, IdGlobal, IdURI, {Masks,} |
| 16 |
Setting, BoardGroup, gzip, Dolib, bmRegExp, AbonUnit; |
Setting, BoardGroup, gzip, Dolib, bmRegExp, AbonUnit, |
| 17 |
|
MojuUtils; |
| 18 |
|
|
| 19 |
type |
type |
| 20 |
//BBSタイプ |
//BBSタイプ |
| 92 |
FOnlyAHundredRes : Boolean; |
FOnlyAHundredRes : Boolean; |
| 93 |
// FExitWrite: TStringList; |
// FExitWrite: TStringList; |
| 94 |
// function StrToFloatDef(s: string; Default: Double): Double; |
// function StrToFloatDef(s: string; Default: Double): Double; |
|
function CustomStringReplace(S ,OldPattern: String;const NewPattern: string): String; |
|
| 95 |
public |
public |
| 96 |
{ Public 宣言 } |
{ Public 宣言 } |
| 97 |
FAbon : TAbon; |
FAbon : TAbon; |
| 868 |
try |
try |
| 869 |
if ThreadItem.ParentBoard <> nil then |
if ThreadItem.ParentBoard <> nil then |
| 870 |
if ThreadItem.ParentBoard.ParentCategory <> nil then |
if ThreadItem.ParentBoard.ParentCategory <> nil then |
| 871 |
Skin.Text := CustomStringReplace( Skin.Text, '<BBSNAME/>', ThreadItem.ParentBoard.ParentCategory.ParenTBBS.Title); |
CustomStringReplace( Skin, '<BBSNAME/>', ThreadItem.ParentBoard.ParentCategory.ParenTBBS.Title); |
| 872 |
Skin.Text := CustomStringReplace( Skin.Text, '<THREADURL/>', ThreadItem.URL); |
//Skin.Text := CustomStringReplace( Skin.Text, '<BBSNAME/>', ThreadItem.ParentBoard.ParentCategory.ParenTBBS.Title); |
| 873 |
|
//Skin.Text := CustomStringReplace( Skin.Text, '<THREADURL/>', ThreadItem.URL); |
| 874 |
|
CustomStringReplace( Skin, '<THREADURL/>', ThreadItem.URL); |
| 875 |
except end; |
except end; |
| 876 |
Skin.Text := CustomStringReplace( Skin.Text, '<BOARDNAME/>', ThreadItem.ParentBoard.Title); |
//Skin.Text := CustomStringReplace( Skin.Text, '<BOARDNAME/>', ThreadItem.ParentBoard.Title); |
| 877 |
Skin.Text := CustomStringReplace( Skin.Text, '<BOARDURL/>', ThreadItem.ParentBoard.URL); |
CustomStringReplace( Skin, '<BOARDNAME/>', ThreadItem.ParentBoard.Title); |
| 878 |
Skin.Text := CustomStringReplace( Skin.Text, '<THREADNAME/>', ThreadItem.Title); |
//Skin.Text := CustomStringReplace( Skin.Text, '<BOARDURL/>', ThreadItem.ParentBoard.URL); |
| 879 |
Skin.Text := CustomStringReplace( Skin.Text, '<SKINPATH/>', Setting.CSSFileName); |
CustomStringReplace( Skin, '<BOARDURL/>', ThreadItem.ParentBoard.URL); |
| 880 |
Skin.Text := CustomStringReplace( Skin.Text, '<GETRESCOUNT/>', IntToStr( ThreadItem.NewReceive - 1 )); |
//Skin.Text := CustomStringReplace( Skin.Text, '<THREADNAME/>', ThreadItem.Title); |
| 881 |
Skin.Text := CustomStringReplace( Skin.Text, '<NEWRESCOUNT/>', IntToStr( ThreadItem.NewResCount )); |
CustomStringReplace( Skin, '<THREADNAME/>', ThreadItem.Title); |
| 882 |
Skin.Text := CustomStringReplace( Skin.Text, '<ALLRESCOUNT/>', IntToStr( ThreadItem.AllResCount )); |
//Skin.Text := CustomStringReplace( Skin.Text, '<SKINPATH/>', Setting.CSSFileName); |
| 883 |
|
CustomStringReplace( Skin, '<SKINPATH/>', Setting.CSSFileName); |
| 884 |
Skin.Text := CustomStringReplace( Skin.Text, '<NEWDATE/>', |
//Skin.Text := CustomStringReplace( Skin.Text, '<GETRESCOUNT/>', IntToStr( ThreadItem.NewReceive - 1 )); |
| 885 |
FormatDateTime('yyyy/mm/dd(ddd) hh:mm', ThreadItem.RoundDate)); |
CustomStringReplace( Skin, '<GETRESCOUNT/>', IntToStr( ThreadItem.NewReceive - 1 )); |
| 886 |
Skin.Text := CustomStringReplace( Skin.Text, '<SIZEKB/>', IntToStr( Floor( SizeByte / 1024 ) )); |
//Skin.Text := CustomStringReplace( Skin.Text, '<NEWRESCOUNT/>', IntToStr( ThreadItem.NewResCount )); |
| 887 |
Skin.Text := CustomStringReplace( Skin.Text, '<SIZE/>', IntToStr( SizeByte )); |
CustomStringReplace( Skin, '<NEWRESCOUNT/>', IntToStr( ThreadItem.NewResCount )); |
| 888 |
|
//Skin.Text := CustomStringReplace( Skin.Text, '<ALLRESCOUNT/>', IntToStr( ThreadItem.AllResCount )); |
| 889 |
|
CustomStringReplace( Skin, '<ALLRESCOUNT/>', IntToStr( ThreadItem.AllResCount )); |
| 890 |
|
|
| 891 |
|
//Skin.Text := CustomStringReplace( Skin.Text, '<NEWDATE/>', |
| 892 |
|
//FormatDateTime('yyyy/mm/dd(ddd) hh:mm', ThreadItem.RoundDate)); |
| 893 |
|
CustomStringReplace( Skin, '<NEWDATE/>',FormatDateTime('yyyy/mm/dd(ddd) hh:mm', ThreadItem.RoundDate)); |
| 894 |
|
//Skin.Text := CustomStringReplace( Skin.Text, '<SIZEKB/>', IntToStr( Floor( SizeByte / 1024 ) )); |
| 895 |
|
CustomStringReplace( Skin, '<SIZEKB/>', IntToStr( Floor( SizeByte / 1024 ) )); |
| 896 |
|
//Skin.Text := CustomStringReplace( Skin.Text, '<SIZE/>', IntToStr( SizeByte )); |
| 897 |
|
CustomStringReplace( Skin, '<SIZE/>', IntToStr( SizeByte )); |
| 898 |
|
|
| 899 |
//----- とりあえずかちゅ〜しゃ互換用。コメントアウトしてもよし |
//----- とりあえずかちゅ〜しゃ互換用。コメントアウトしてもよし |
| 900 |
// やりかたが苦しいけど、オプションダイアログのプレビュー用 try |
// やりかたが苦しいけど、オプションダイアログのプレビュー用 try |
| 901 |
try |
try |
| 902 |
if ThreadItem.ParentBoard <> nil then |
if ThreadItem.ParentBoard <> nil then |
| 903 |
if ThreadItem.ParentBoard.ParentCategory <> nil then |
if ThreadItem.ParentBoard.ParentCategory <> nil then |
| 904 |
Skin.Text := CustomStringReplace( Skin.Text, '&BBSNAME', ThreadItem.ParentBoard.ParentCategory.ParenTBBS.Title); |
CustomStringReplace( Skin, '&BBSNAME', ThreadItem.ParentBoard.ParentCategory.ParenTBBS.Title); |
| 905 |
Skin.Text := CustomStringReplace( Skin.Text, '&THREADURL', ThreadItem.URL); |
//Skin.Text := CustomStringReplace( Skin.Text, '&BBSNAME', ThreadItem.ParentBoard.ParentCategory.ParenTBBS.Title); |
| 906 |
|
//Skin.Text := CustomStringReplace( Skin.Text, '&THREADURL', ThreadItem.URL); |
| 907 |
|
CustomStringReplace( Skin, '&THREADURL', ThreadItem.URL); |
| 908 |
except end; |
except end; |
| 909 |
Skin.Text := CustomStringReplace( Skin.Text, '&BOARDNAME', ThreadItem.ParentBoard.Title); |
//Skin.Text := CustomStringReplace( Skin.Text, '&BOARDNAME', ThreadItem.ParentBoard.Title); |
| 910 |
Skin.Text := CustomStringReplace( Skin.Text, '&BOARDURL', ThreadItem.ParentBoard.URL); |
CustomStringReplace( Skin, '&BOARDNAME', ThreadItem.ParentBoard.Title); |
| 911 |
Skin.Text := CustomStringReplace( Skin.Text, '&THREADNAME', ThreadItem.Title); |
//Skin.Text := CustomStringReplace( Skin.Text, '&BOARDURL', ThreadItem.ParentBoard.URL); |
| 912 |
Skin.Text := CustomStringReplace( Skin.Text, '&SKINPATH', Setting.CSSFileName); |
CustomStringReplace( Skin, '&BOARDURL', ThreadItem.ParentBoard.URL); |
| 913 |
Skin.Text := CustomStringReplace( Skin.Text, '&GETRESCOUNT', IntToStr( ThreadItem.NewReceive - 1 )); |
//Skin.Text := CustomStringReplace( Skin.Text, '&THREADNAME', ThreadItem.Title); |
| 914 |
Skin.Text := CustomStringReplace( Skin.Text, '&NEWRESCOUNT', IntToStr( ThreadItem.NewResCount )); |
CustomStringReplace( Skin, '&THREADNAME', ThreadItem.Title); |
| 915 |
Skin.Text := CustomStringReplace( Skin.Text, '&ALLRESCOUNT', IntToStr( ThreadItem.AllResCount )); |
//Skin.Text := CustomStringReplace( Skin.Text, '&SKINPATH', Setting.CSSFileName); |
| 916 |
|
CustomStringReplace( Skin, '&SKINPATH', Setting.CSSFileName); |
| 917 |
Skin.Text := CustomStringReplace( Skin.Text, '&NEWDATE', |
//Skin.Text := CustomStringReplace( Skin.Text, '&GETRESCOUNT', IntToStr( ThreadItem.NewReceive - 1 )); |
| 918 |
FormatDateTime('yyyy/mm/dd(ddd) hh:mm', ThreadItem.RoundDate)); |
CustomStringReplace( Skin, '&GETRESCOUNT', IntToStr( ThreadItem.NewReceive - 1 )); |
| 919 |
Skin.Text := CustomStringReplace( Skin.Text, '&SIZEKB', IntToStr( Floor( SizeByte / 1024 ) )); |
//Skin.Text := CustomStringReplace( Skin.Text, '&NEWRESCOUNT', IntToStr( ThreadItem.NewResCount )); |
| 920 |
Skin.Text := CustomStringReplace( Skin.Text, '&SIZE', IntToStr( SizeByte )); |
CustomStringReplace( Skin, '&NEWRESCOUNT', IntToStr( ThreadItem.NewResCount )); |
| 921 |
|
//Skin.Text := CustomStringReplace( Skin.Text, '&ALLRESCOUNT', IntToStr( ThreadItem.AllResCount )); |
| 922 |
|
CustomStringReplace( Skin, '&ALLRESCOUNT', IntToStr( ThreadItem.AllResCount )); |
| 923 |
|
|
| 924 |
|
//Skin.Text := CustomStringReplace( Skin.Text, '&NEWDATE', |
| 925 |
|
// FormatDateTime('yyyy/mm/dd(ddd) hh:mm', ThreadItem.RoundDate)); |
| 926 |
|
CustomStringReplace( Skin, '&NEWDATE', FormatDateTime('yyyy/mm/dd(ddd) hh:mm', ThreadItem.RoundDate)); |
| 927 |
|
//Skin.Text := CustomStringReplace( Skin.Text, '&SIZEKB', IntToStr( Floor( SizeByte / 1024 ) )); |
| 928 |
|
CustomStringReplace( Skin, '&SIZEKB', IntToStr( Floor( SizeByte / 1024 ) )); |
| 929 |
|
//Skin.Text := CustomStringReplace( Skin.Text, '&SIZE', IntToStr( SizeByte )); |
| 930 |
|
CustomStringReplace( Skin, '&SIZE', IntToStr( SizeByte )); |
| 931 |
//----- ここまで |
//----- ここまで |
| 932 |
end; |
end; |
| 933 |
Result := Skin.Text; |
Result := Skin.Text; |
| 2922 |
end; |
end; |
| 2923 |
end; |
end; |
| 2924 |
|
|
|
// **************************************** |
|
|
// StringReplace() が遅いので機能を削って高速化した関数 |
|
|
// 大文字小文字の区別をします。区別なしのモードはありません。 |
|
|
// **************************************** |
|
|
function TGikoSys.CustomStringReplace(S ,OldPattern: String;const NewPattern: string): String; |
|
|
var |
|
|
position : Integer; |
|
|
lenOld : Integer;//OldPatternの長さ |
|
|
begin |
|
|
Result := ''; |
|
|
position := 0; |
|
|
lenOld := Length(OldPattern); |
|
|
position := AnsiPos( OldPattern, S); |
|
|
while position <> 0 do begin |
|
|
Result := Result + Copy(S,1,position -1 ) + NewPattern; |
|
|
Delete(S ,1, position + lenOld - 1); |
|
|
position := AnsiPos( OldPattern, S); |
|
|
end; |
|
|
if Length( S ) > 0 then begin |
|
|
Result := Result + S; |
|
|
end; |
|
|
|
|
|
end; |
|
|
|
|
| 2925 |
initialization |
initialization |
| 2926 |
GikoSys := TGikoSys.Create; |
GikoSys := TGikoSys.Create; |
| 2927 |
|
|