| 9 |
type |
type |
| 10 |
//リストの表示アイテム選択 |
//リストの表示アイテム選択 |
| 11 |
TGikoViewType = (gvtAll, gvtLog, gvtNew, gvtUser); |
TGikoViewType = (gvtAll, gvtLog, gvtNew, gvtUser); |
|
//リストの取得件数 |
|
|
//TGikoListCount = (glc50, glc100, glc200, glc500, glc1000, glcAll); |
|
|
//巡回番号 |
|
|
//TGikoRoundNo = (grnNone, grn1, grn2, grn3, grn4, grn5, grnOnce); |
|
| 12 |
//リストの上げ下げ |
//リストの上げ下げ |
| 13 |
TGikoAgeSage = (gasNone, gasAge, gasSage, gasNew, gasNull); |
TGikoAgeSage = (gasNone, gasAge, gasSage, gasNew, gasNull); |
| 14 |
|
|
|
{ TFolder = class |
|
|
private |
|
|
FItemList: TList; //子アイテムリスト |
|
|
FLeaf: Boolean; //下にフォルダを持つことが出来るか |
|
|
public |
|
|
function Add(Item: TFolder): Integer; |
|
|
procedure Clear; |
|
|
procedure Delete(Index: Integer); |
|
|
procedure Exchange(Index1, Index2: Integer); |
|
|
procedure Insert(Index: Integer; Item: TFolder); |
|
|
procedure Move(CurIndex, NewIndex: Integer); |
|
|
function Remove(Item: TFolder): Integer; |
|
|
procedure Sort(Compare: TListSortCompare); |
|
|
property Capacity: Integer read FCapacity write SetCapacity; |
|
|
property Count: Integer read FCount write SetCount; |
|
|
property Items[Index: Integer]: TFolder read Get write Put; default; |
|
|
|
|
|
property Leaf: Boolean read FLeaf; |
|
|
end; |
|
|
|
|
|
TBBS = class(TFolder) |
|
|
end; |
|
|
TCategory class(TFolder) |
|
|
end; |
|
|
TBoard = class(TFolder) |
|
|
end; |
|
|
TThreadItem = class(TFolder) |
|
|
end; |
|
|
} |
|
|
|
|
|
{ |
|
|
TBBS = class(TBBS) |
|
|
end; |
|
|
TBoard2ch = class(TBoard) |
|
|
end; |
|
|
TThreadItem2ch = class(TThreadItem) |
|
|
end; |
|
|
} |
|
|
|
|
|
// ITest = interface |
|
|
// end; |
|
|
// IBBS = interface |
|
|
// end; |
|
|
// ICategory = interface |
|
|
// end; |
|
|
// IBoard = interface |
|
|
// end; |
|
|
// IThreadItem = interface |
|
|
// end; |
|
|
|
|
| 15 |
TCategory = class; |
TCategory = class; |
| 16 |
TBoard = class; |
TBoard = class; |
| 17 |
TThreadItem = class; |
TThreadItem = class; |
| 124 |
FIntData : Integer; // 好きにいじってよし。いろんな用途に使うyo |
FIntData : Integer; // 好きにいじってよし。いろんな用途に使うyo |
| 125 |
FListData : TList; // 好きにいじってよし。いろんな用途に使うyo |
FListData : TList; // 好きにいじってよし。いろんな用途に使うyo |
| 126 |
|
|
| 127 |
FSETTINGTXTTime: TDateTime; //SETTING.TXTを取得した日時 |
FSETTINGTXTTime : TDateTime; //SETTING.TXTを取得した日時 |
| 128 |
FIsSETTINGTXT: boolean; //SETTING.TXTを取得しているか |
FIsSETTINGTXT : boolean; //SETTING.TXTを取得しているか |
| 129 |
FHEADTXTTime: TDateTime; //HEAD.TXTを取得した日時 |
FHEADTXTTime : TDateTime; //HEAD.TXTを取得した日時 |
| 130 |
FIsHEADTXT: boolean; //HEAD.TXTを取得しているか |
FIsHEADTXT : boolean; //HEAD.TXTを取得しているか |
| 131 |
FTitlePictureURL: string; //top絵のURL |
FTitlePictureURL: string; //top絵のURL |
| 132 |
FMultiplicity : Integer; //重複しているかどうか? |
FMultiplicity : Integer; //重複しているかどうか? |
| 133 |
|
FIs2ch : Boolean; //hostが2chかどうか |
| 134 |
|
FNewThreadCount: Integer; //新着スレッドの数 |
| 135 |
|
FLogThreadCount: Integer; //ログ有りスレッドの数 |
| 136 |
|
FUserThreadCount: Integer; //? |
| 137 |
|
|
| 138 |
function GetThreadItem(index: integer): TThreadItem; |
function GetThreadItem(index: integer): TThreadItem; |
| 139 |
procedure SetThreadItem(index: integer; value: TThreadItem); |
procedure SetThreadItem(index: integer; value: TThreadItem); |
| 140 |
procedure SetRound(b: Boolean); |
procedure SetRound(b: Boolean); |
| 196 |
function GetLogThreadCount: Integer; |
function GetLogThreadCount: Integer; |
| 197 |
function GetUserThreadCount: Integer; |
function GetUserThreadCount: Integer; |
| 198 |
function GetNewThread(Index: Integer): TThreadItem; |
function GetNewThread(Index: Integer): TThreadItem; |
| 199 |
function GetLogThread(Index: Integer): TThreadItem; |
function GetLogThread(Index: Integer): TThreadItem; overload; |
| 200 |
|
function GetLogThread(Index: Integer; Base: Integer): TThreadItem; overload; |
| 201 |
function GetUserThread(Index: Integer): TThreadItem; |
function GetUserThread(Index: Integer): TThreadItem; |
| 202 |
|
|
| 203 |
procedure BeginUpdate; |
procedure BeginUpdate; |
| 213 |
property IsSETTINGTXT: boolean read FIsSETTINGTXT write FIsSETTINGTXT; |
property IsSETTINGTXT: boolean read FIsSETTINGTXT write FIsSETTINGTXT; |
| 214 |
property HEADTXTTime: TDateTime read FHEADTXTTime write FHEADTXTTime; |
property HEADTXTTime: TDateTime read FHEADTXTTime write FHEADTXTTime; |
| 215 |
property IsHEADTXT: boolean read FIsHEADTXT write FIsHEADTXT; |
property IsHEADTXT: boolean read FIsHEADTXT write FIsHEADTXT; |
| 216 |
property TitlePictureURL: string read FTitlePictureURL write FTitlePictureURL; |
property TitlePictureURL: string read FTitlePictureURL write FTitlePictureURL; |
| 217 |
property Multiplicity: Integer read FMultiplicity write FMultiplicity; |
property Multiplicity: Integer read FMultiplicity write FMultiplicity; |
| 218 |
|
property Is2ch : boolean read FIs2ch write FIs2ch; |
| 219 |
|
property NewThreadCount: Integer read FNewThreadCount write FNewThreadCount; //新着スレッドの数 |
| 220 |
|
property LogThreadCount: Integer read FLogThreadCount write FLogThreadCount; //ログ有りスレッドの数 |
| 221 |
|
property UserThreadCount: Integer read FUserThreadCount write FUserThreadCount; //? |
| 222 |
end; |
end; |
| 223 |
|
|
| 224 |
//スレ |
//スレ |
| 252 |
FUpdate: Boolean; |
FUpdate: Boolean; |
| 253 |
FExpand: Boolean; |
FExpand: Boolean; |
| 254 |
FURL : string; // このスレをブラウザで表示する際の URL |
FURL : string; // このスレをブラウザで表示する際の URL |
| 255 |
FBoardPlugIn : TBoardPlugIn; // このスレをサポートするプラグイン |
//FBoardPlugIn : TBoardPlugIn; // このスレをサポートするプラグイン |
| 256 |
FFilePath : string; // このスレが保存されているパス |
//FFilePath : string; // このスレが保存されているパス |
| 257 |
|
|
| 258 |
procedure SetLastModified(d: TDateTime); |
procedure SetLastModified(d: TDateTime); |
| 259 |
procedure SetRound(b: Boolean); |
procedure SetRound(b: Boolean); |
| 263 |
procedure SetScrollTop(i: Integer); |
procedure SetScrollTop(i: Integer); |
| 264 |
procedure Init; |
procedure Init; |
| 265 |
function GetCreateDate: TDateTime; |
function GetCreateDate: TDateTime; |
| 266 |
|
function GetFilePath: String; |
| 267 |
public |
public |
| 268 |
constructor Create( inPlugIn : TBoardPlugIn; inURL : string ); overload; |
constructor Create( inPlugIn : TBoardPlugIn; inURL : string ); overload; |
| 269 |
constructor Create( is2ch : Boolean; const inURL, inHost, inBBSID, inBBSKey : string ); overload; |
constructor Create( is2ch : Boolean; const inURL, inHost, inBBSID, inBBSKey : string ); overload; |
| 270 |
|
constructor Create( inPlugIn : TBoardPlugIn; const inBoard : TBoard; inURL : string ); overload; |
| 271 |
|
constructor Create( is2ch : Boolean; const inBoard : TBoard; const inURL, inHost, inBBSID, inBBSKey : string); overload; |
| 272 |
|
|
| 273 |
destructor Destroy; override; |
destructor Destroy; override; |
| 274 |
|
|
| 310 |
// property SPID: string read FSPID write FSPID; |
// property SPID: string read FSPID write FSPID; |
| 311 |
property CreateDate: TDateTime read GetCreateDate; |
property CreateDate: TDateTime read GetCreateDate; |
| 312 |
property URL : string read FURL write FURL; |
property URL : string read FURL write FURL; |
| 313 |
property BoardPlugIn : TBoardPlugIn read FBoardPlugIn; |
//property BoardPlugIn : TBoardPlugIn read FBoardPlugIn; |
| 314 |
property FilePath : string read FFilePath write FFilePath; |
property FilePath : string read GetFilePath; |
| 315 |
function IsBoardPlugInAvailable : Boolean; |
//function IsBoardPlugInAvailable : Boolean; |
| 316 |
end; |
end; |
| 317 |
|
|
| 318 |
|
TBoardGroup = class(TStringList) |
| 319 |
|
private |
| 320 |
|
FBoardPlugIn : TBoardPlugIn; // この板をサポートするプラグイン |
| 321 |
|
public |
| 322 |
|
procedure Clear ; override; |
| 323 |
|
property BoardPlugIn : TBoardPlugIn read FBoardPlugIn write FBoardPlugIn; |
| 324 |
|
end; |
| 325 |
|
|
| 326 |
|
|
|
//検索結果リスト |
|
|
{ TSearchList = class(TList) |
|
|
private |
|
|
function GetThreadItem(index: integer): TThreadItem; |
|
|
procedure SetThreadItem(index: integer; value: TThreadItem); |
|
|
public |
|
|
constructor Create; |
|
|
destructor Destroy; override; |
|
|
|
|
|
property Items[index: integer]: TThreadItem read GetThreadItem write SetThreadItem; |
|
|
|
|
|
function Add(item: TThreadItem): integer; |
|
|
procedure Delete(index: integer); |
|
|
procedure Clear; override; |
|
|
end;} |
|
|
|
|
| 327 |
function BBSsFindBoardFromBBSID( inBBSID : string ) : TBoard; |
function BBSsFindBoardFromBBSID( inBBSID : string ) : TBoard; |
| 328 |
function BBSsFindBoardFromURL( inURL : string ) : TBoard; |
function BBSsFindBoardFromURL( inURL : string ) : TBoard; |
| 329 |
function BBSsFindBoardFromTitle( inTitle : string ) : TBoard; |
function BBSsFindBoardFromTitle( inTitle : string ) : TBoard; |
| 332 |
|
|
| 333 |
var |
var |
| 334 |
BBSs : array of TBBS; |
BBSs : array of TBBS; |
| 335 |
|
BoardGroups : array of TBoardGroup; |
| 336 |
|
|
| 337 |
implementation |
implementation |
| 338 |
|
|
| 362 |
function BBSsFindBoardFromBBSID( |
function BBSsFindBoardFromBBSID( |
| 363 |
inBBSID : string |
inBBSID : string |
| 364 |
) : TBoard; |
) : TBoard; |
| 365 |
|
var |
| 366 |
|
i : Integer; |
| 367 |
|
tmpBoard : TBoard; |
| 368 |
begin |
begin |
| 369 |
|
|
| 370 |
Result := BBSs[ 0 ].FindBBSID( inBBSID ); |
// Result := BBSs[ 0 ].FindBBSID( inBBSID ); |
| 371 |
|
if Length(BoardGroups) > 0 then begin |
| 372 |
|
for i := BoardGroups[0].Count - 1 downto 0 do begin |
| 373 |
|
tmpBoard := TBoard(BoardGroups[0].Objects[i]); |
| 374 |
|
if tmpBoard.Is2ch then begin |
| 375 |
|
if AnsiCompareStr(tmpBoard.BBSID, inBBSID) = 0 then begin |
| 376 |
|
Result := tmpBoard; |
| 377 |
|
end; |
| 378 |
|
end; |
| 379 |
|
end; |
| 380 |
|
end; |
| 381 |
|
|
| 382 |
end; |
end; |
| 383 |
|
|
| 385 |
inURL : string |
inURL : string |
| 386 |
) : TBoard; |
) : TBoard; |
| 387 |
var |
var |
| 388 |
i : Integer; |
i,p : Integer; |
| 389 |
|
accept : TAcceptType; |
| 390 |
begin |
begin |
| 391 |
|
Result := nil; |
| 392 |
for i := Length( BBSs ) - 1 downto 0 do begin |
for i := Length(BoardGroups) - 1 downto 1 do begin |
| 393 |
Result := BBSs[ i ].FindBoardFromURL( inURL ); |
accept := BoardGroups[i].BoardPlugIn.AcceptURL(inURL); |
| 394 |
if Result <> nil then |
if (accept = atBoard) or (accept = atThread) then begin |
| 395 |
Exit; |
if BoardGroups[i].Find(inURL, p) then begin |
| 396 |
end; |
Result := TBoard(BoardGroups[i].Objects[p]); |
| 397 |
|
Exit; |
| 398 |
Result := nil; |
end else begin |
| 399 |
|
inURL := BoardGroups[i].BoardPlugIn.ExtractBoardURL(inURL); |
| 400 |
|
if BoardGroups[i].Find(inURL, p) then begin |
| 401 |
|
Result := TBoard(BoardGroups[i].Objects[p]); |
| 402 |
|
Exit; |
| 403 |
|
end; |
| 404 |
|
end; |
| 405 |
|
end; |
| 406 |
|
end; |
| 407 |
|
//ここにきたら、pluginを使わないやつらを調べる |
| 408 |
|
if BoardGroups[0].Find(inURL, p) then |
| 409 |
|
Result := TBoard(BoardGroups[0].Objects[p]); |
| 410 |
|
|
| 411 |
end; |
end; |
| 412 |
|
|
| 414 |
inTitle : string |
inTitle : string |
| 415 |
) : TBoard; |
) : TBoard; |
| 416 |
var |
var |
| 417 |
i : Integer; |
i,j : Integer; |
| 418 |
|
tmpBoard : TBoard; |
| 419 |
begin |
begin |
| 420 |
|
Result := nil; |
| 421 |
for i := Length( BBSs ) - 1 downto 0 do begin |
for i := Length( BBSs ) - 1 downto 0 do begin |
| 422 |
Result := BBSs[ i ].FindBoardFromTitle( inTitle ); |
for j := BoardGroups[i].Count - 1 downto 0 do begin |
| 423 |
if Result <> nil then |
tmpBoard := TBoard(BoardGroups[i].Objects[j]); |
| 424 |
Exit; |
if ( AnsiCompareStr(tmpBoard.Title, inTitle) = 0) then begin |
| 425 |
|
Result := tmpBoard; |
| 426 |
|
Exit; |
| 427 |
|
end; |
| 428 |
|
end; |
| 429 |
end; |
end; |
| 430 |
|
|
|
Result := nil; |
|
|
|
|
| 431 |
end; |
end; |
| 432 |
|
|
| 433 |
function BBSsFindThreadFromURL( |
function BBSsFindThreadFromURL( |
| 532 |
i: Integer; |
i: Integer; |
| 533 |
begin |
begin |
| 534 |
if not IsBoardFileRead then |
if not IsBoardFileRead then |
| 535 |
GikoSys.ReadBoardFile( Self ); |
GikoSys.ReadBoardFile( Self ); |
| 536 |
for i := Count - 1 downto 0 do begin |
for i := Count - 1 downto 0 do begin |
| 537 |
Result := Items[ i ].FindBoardFromTitle(Title); |
Result := Items[ i ].FindBoardFromTitle(Title); |
| 538 |
if Result <> nil then |
if Result <> nil then |
| 549 |
i : Integer; |
i : Integer; |
| 550 |
begin |
begin |
| 551 |
if not IsBoardFileRead then |
if not IsBoardFileRead then |
| 552 |
GikoSys.ReadBoardFile( Self ); |
GikoSys.ReadBoardFile( Self ); |
| 553 |
for i := Count - 1 downto 0 do begin |
for i := Count - 1 downto 0 do begin |
| 554 |
Result := Items[ i ].FindBoardFromURL( inURL ); |
Result := Items[ i ].FindBoardFromURL( inURL ); |
| 555 |
if Result <> nil then |
if Result <> nil then |
| 656 |
|
|
| 657 |
procedure TCategory.Delete(index: integer); |
procedure TCategory.Delete(index: integer); |
| 658 |
begin |
begin |
| 659 |
if (Items[index] <> nil) then begin |
{if (Items[index] <> nil) then begin |
| 660 |
try |
try |
| 661 |
if TBoard(Items[index]).Multiplicity = 0 then |
if TBoard(Items[index]).Multiplicity = 0 then |
| 662 |
TBoard(Items[index]).Free |
TBoard(Items[index]).Free |
| 665 |
except |
except |
| 666 |
end; |
end; |
| 667 |
end; |
end; |
| 668 |
inherited Delete(index); |
} |
| 669 |
|
inherited Delete(index); |
| 670 |
end; |
end; |
| 671 |
|
|
| 672 |
procedure TCategory.Clear; |
procedure TCategory.Clear; |
| 821 |
if inPlugIn = nil then begin |
if inPlugIn = nil then begin |
| 822 |
// subject.txt の保存パスを設定 |
// subject.txt の保存パスを設定 |
| 823 |
GikoSys.ParseURI( inURL, protocol, host, path, document, port, bookmark ); |
GikoSys.ParseURI( inURL, protocol, host, path, document, port, bookmark ); |
| 824 |
if GikoSys.Is2chHost( host ) then |
if GikoSys.Is2chHost( host ) then begin |
| 825 |
|
Self.Is2ch := True; |
| 826 |
FilePath := |
FilePath := |
| 827 |
GikoSys.Setting.LogFolderP + |
GikoSys.Setting.LogFolderP + |
| 828 |
BBS2CH_LOG_FOLDER + PATH_DELIM + BBSID + PATH_DELIM + SUBJECT_FILENAME |
BBS2CH_LOG_FOLDER + PATH_DELIM + BBSID + PATH_DELIM + SUBJECT_FILENAME |
| 829 |
else |
end else begin |
| 830 |
|
Self.Is2ch := False; |
| 831 |
FilePath := |
FilePath := |
| 832 |
GikoSys.Setting.LogFolderP + |
GikoSys.Setting.LogFolderP + |
| 833 |
EXTERNAL_LOG_FOLDER + PATH_DELIM + host + PATH_DELIM + BBSID + PATH_DELIM + SUBJECT_FILENAME |
EXTERNAL_LOG_FOLDER + PATH_DELIM + host + PATH_DELIM + BBSID + PATH_DELIM + SUBJECT_FILENAME |
| 834 |
|
end; |
| 835 |
end else begin |
end else begin |
| 836 |
// プラグインに TBoardItem が作成されたことを伝える |
// プラグインに TBoardItem が作成されたことを伝える |
| 837 |
inPlugIn.CreateBoardItem( DWORD( Self ) ); |
inPlugIn.CreateBoardItem( DWORD( Self ) ); |
| 838 |
|
Self.Is2ch := False; |
| 839 |
end; |
end; |
| 840 |
|
|
| 841 |
end; |
end; |
| 1200 |
Protocol, Host, Path, Document, Port, Bookmark : string; |
Protocol, Host, Path, Document, Port, Bookmark : string; |
| 1201 |
begin |
begin |
| 1202 |
Result := GikoSys.UrlToServer(URL); |
Result := GikoSys.UrlToServer(URL); |
| 1203 |
GikoSys.ParseURI( URL, Protocol,Host, Path, Document, Port, Bookmark ); |
//GikoSys.ParseURI( URL, Protocol,Host, Path, Document, Port, Bookmark ); |
| 1204 |
if GikoSys.Is2chHost(Host) then |
//if GikoSys.Is2chHost(Host) then |
| 1205 |
|
if Self.Is2ch then |
| 1206 |
Result := Result + 'test/bbs.cgi' |
Result := Result + 'test/bbs.cgi' |
| 1207 |
else |
else |
| 1208 |
Result := Result + 'test/subbbs.cgi'; |
Result := Result + 'test/subbbs.cgi'; |
| 1407 |
end; |
end; |
| 1408 |
Result := nil; |
Result := nil; |
| 1409 |
end; |
end; |
| 1410 |
|
function TBoard.GetLogThread(Index: Integer; Base: Integer): TThreadItem; |
| 1411 |
|
var |
| 1412 |
|
i: Integer; |
| 1413 |
|
Cnt: Integer; |
| 1414 |
|
begin |
| 1415 |
|
Cnt := 0; |
| 1416 |
|
if Length( ParentCategory.ParenTBBS.ShortSelectText ) = 0 then |
| 1417 |
|
begin |
| 1418 |
|
for i := Base to Count - 1 do begin |
| 1419 |
|
if Items[i].IsLogFile then |
| 1420 |
|
begin |
| 1421 |
|
if Index = Cnt then begin |
| 1422 |
|
Result := Items[i]; |
| 1423 |
|
Exit; |
| 1424 |
|
end; |
| 1425 |
|
inc(Cnt); |
| 1426 |
|
end; |
| 1427 |
|
end; |
| 1428 |
|
end else begin |
| 1429 |
|
for i := Base to Count - 1 do begin |
| 1430 |
|
if Items[i].IsLogFile then |
| 1431 |
|
begin |
| 1432 |
|
if Items[i].ShortTitle = '' then |
| 1433 |
|
Items[i].ShortTitle := ZenToHan(Items[i].Title); |
| 1434 |
|
if AnsiPos(ParentCategory.ParenTBBS.ShortSelectText, Items[i].ShortTitle) <> 0 then begin |
| 1435 |
|
if Index = Cnt then begin |
| 1436 |
|
Result := Items[i]; |
| 1437 |
|
Exit; |
| 1438 |
|
end; |
| 1439 |
|
inc(Cnt); |
| 1440 |
|
end; |
| 1441 |
|
end; |
| 1442 |
|
end; |
| 1443 |
|
end; |
| 1444 |
|
Result := nil; |
| 1445 |
|
end; |
| 1446 |
function TBoard.GetUserThread(Index: Integer): TThreadItem; |
function TBoard.GetUserThread(Index: Integer): TThreadItem; |
| 1447 |
var |
var |
| 1448 |
i: Integer; |
i: Integer; |
| 1516 |
|
|
| 1517 |
FUpdate := True; |
FUpdate := True; |
| 1518 |
FURL := ''; |
FURL := ''; |
| 1519 |
FBoardPlugIn := nil; |
//FBoardPlugIn := nil; |
| 1520 |
end; |
end; |
| 1521 |
|
|
| 1522 |
// ************************************************************************* |
// ************************************************************************* |
| 1537 |
inherited Create; |
inherited Create; |
| 1538 |
Init; |
Init; |
| 1539 |
|
|
| 1540 |
FBoardPlugIn := inPlugIn; |
//FBoardPlugIn := inPlugIn; |
| 1541 |
URL := inURL; |
URL := inURL; |
| 1542 |
|
|
| 1543 |
if inPlugIn = nil then begin |
if inPlugIn = nil then begin |
| 1546 |
// dat の保存パスを設定 |
// dat の保存パスを設定 |
| 1547 |
GikoSys.ParseURI( inURL, protocol, host, path, document, port, bookmark ); |
GikoSys.ParseURI( inURL, protocol, host, path, document, port, bookmark ); |
| 1548 |
GikoSys.Parse2chURL( inURL, path, document, BBSID, BBSKey ); |
GikoSys.Parse2chURL( inURL, path, document, BBSID, BBSKey ); |
| 1549 |
|
FileName := BBSKey + '.dat'; |
| 1550 |
|
{ |
| 1551 |
if GikoSys.Is2chHost( host ) then |
if GikoSys.Is2chHost( host ) then |
| 1552 |
FilePath := |
FilePath := |
| 1553 |
GikoSys.Setting.LogFolderP + |
GikoSys.Setting.LogFolderP + |
| 1556 |
FilePath := |
FilePath := |
| 1557 |
GikoSys.Setting.LogFolderP + |
GikoSys.Setting.LogFolderP + |
| 1558 |
EXTERNAL_LOG_FOLDER + PATH_DELIM + host + PATH_DELIM + BBSID + PATH_DELIM + BBSKey + '.dat'; |
EXTERNAL_LOG_FOLDER + PATH_DELIM + host + PATH_DELIM + BBSID + PATH_DELIM + BBSKey + '.dat'; |
| 1559 |
FileName := BBSKey + '.dat'; |
} |
| 1560 |
|
IsLogFile := FileExists( FilePath ); |
| 1561 |
|
URL := GikoSys.Get2chBrowsableThreadURL( inURL ); |
| 1562 |
|
end; |
| 1563 |
|
end else begin |
| 1564 |
|
// プラグインに TThreadItem が作成されたことを伝える |
| 1565 |
|
inPlugIn.CreateThreadItem( DWORD( Self ) ); |
| 1566 |
|
end; |
| 1567 |
|
|
| 1568 |
|
end; |
| 1569 |
|
constructor TThreadItem.Create( |
| 1570 |
|
inPlugIn : TBoardPlugIn; |
| 1571 |
|
const inBoard : TBoard; |
| 1572 |
|
inURL : string |
| 1573 |
|
); |
| 1574 |
|
var |
| 1575 |
|
foundPos : Integer; |
| 1576 |
|
protocol, host, path, document, port, bookmark : string; |
| 1577 |
|
BBSID, BBSKey : string; |
| 1578 |
|
const |
| 1579 |
|
READ_PATH = '/test/read.cgi'; |
| 1580 |
|
begin |
| 1581 |
|
|
| 1582 |
|
inherited Create; |
| 1583 |
|
Init; |
| 1584 |
|
FParentBoard := inBoard; |
| 1585 |
|
//FBoardPlugIn := inPlugIn; |
| 1586 |
|
URL := inURL; |
| 1587 |
|
|
| 1588 |
|
if inPlugIn = nil then begin |
| 1589 |
|
foundPos := Pos( READ_PATH, inURL ); |
| 1590 |
|
if foundPos > 0 then begin |
| 1591 |
|
// dat の保存パスを設定 |
| 1592 |
|
GikoSys.ParseURI( inURL, protocol, host, path, document, port, bookmark ); |
| 1593 |
|
GikoSys.Parse2chURL( inURL, path, document, BBSID, BBSKey ); |
| 1594 |
|
FileName := BBSKey + '.dat'; |
| 1595 |
IsLogFile := FileExists( FilePath ); |
IsLogFile := FileExists( FilePath ); |
| 1596 |
URL := GikoSys.Get2chBrowsableThreadURL( inURL ); |
URL := GikoSys.Get2chBrowsableThreadURL( inURL ); |
| 1597 |
end; |
end; |
| 1611 |
); |
); |
| 1612 |
var |
var |
| 1613 |
foundPos : Integer; |
foundPos : Integer; |
| 1614 |
|
tfilePath : String; |
| 1615 |
const |
const |
| 1616 |
READ_PATH = '/test/read.cgi'; |
READ_PATH = '/test/read.cgi'; |
| 1617 |
begin |
begin |
| 1619 |
inherited Create; |
inherited Create; |
| 1620 |
Init; |
Init; |
| 1621 |
|
|
| 1622 |
FBoardPlugIn := nil; |
//FBoardPlugIn := nil; |
| 1623 |
|
|
| 1624 |
foundPos := Pos( READ_PATH, inURL ); |
foundPos := Pos( READ_PATH, inURL ); |
| 1625 |
if foundPos > 0 then begin |
if foundPos > 0 then begin |
| 1626 |
|
FileName := inBBSKey + '.dat'; |
| 1627 |
|
|
| 1628 |
// dat の保存パスを設定 |
// dat の保存パスを設定 |
| 1629 |
if is2ch then |
if is2ch then |
| 1630 |
FilePath := |
tfilePath := |
| 1631 |
|
|
| 1632 |
GikoSys.Setting.LogFolderP + |
GikoSys.Setting.LogFolderP + |
| 1633 |
BBS2CH_LOG_FOLDER + PATH_DELIM + inBBSID + PATH_DELIM + inBBSKey + '.dat' |
BBS2CH_LOG_FOLDER + PATH_DELIM + inBBSID + PATH_DELIM + inBBSKey + '.dat' |
| 1634 |
else |
else |
| 1635 |
FilePath := |
tfilePath := |
| 1636 |
GikoSys.Setting.LogFolderP + |
GikoSys.Setting.LogFolderP + |
| 1637 |
EXTERNAL_LOG_FOLDER + PATH_DELIM + inHost + PATH_DELIM + inBBSID + PATH_DELIM + inBBSKey + '.dat'; |
EXTERNAL_LOG_FOLDER + PATH_DELIM + inHost + PATH_DELIM + inBBSID + PATH_DELIM + inBBSKey + '.dat'; |
| 1638 |
|
|
| 1639 |
|
IsLogFile := FileExists( tfilePath ); |
| 1640 |
|
URL := GikoSys.Get2chBrowsableThreadURL( inURL ); |
| 1641 |
|
end else |
| 1642 |
|
URL := inURL; |
| 1643 |
|
|
| 1644 |
|
end; |
| 1645 |
|
constructor TThreadItem.Create( |
| 1646 |
|
is2ch : Boolean; |
| 1647 |
|
const inBoard : TBoard; |
| 1648 |
|
const inURL, inHost, inBBSID, inBBSKey : string |
| 1649 |
|
); |
| 1650 |
|
var |
| 1651 |
|
foundPos : Integer; |
| 1652 |
|
tfilePath : String; |
| 1653 |
|
const |
| 1654 |
|
READ_PATH = '/test/read.cgi'; |
| 1655 |
|
begin |
| 1656 |
|
|
| 1657 |
|
inherited Create; |
| 1658 |
|
Init; |
| 1659 |
|
//FBoardPlugIn := nil; |
| 1660 |
|
FParentBoard := inBoard; |
| 1661 |
|
foundPos := Pos( READ_PATH, inURL ); |
| 1662 |
|
if foundPos > 0 then begin |
| 1663 |
FileName := inBBSKey + '.dat'; |
FileName := inBBSKey + '.dat'; |
| 1664 |
IsLogFile := FileExists( FilePath ); |
IsLogFile := FileExists( FilePath ); |
| 1665 |
URL := GikoSys.Get2chBrowsableThreadURL( inURL ); |
URL := GikoSys.Get2chBrowsableThreadURL( inURL ); |
| 1674 |
begin |
begin |
| 1675 |
|
|
| 1676 |
// プラグインに TThreadItem が破棄されたことを伝える |
// プラグインに TThreadItem が破棄されたことを伝える |
| 1677 |
if IsBoardPlugInAvailable then |
if Self.ParentBoard.IsBoardPlugInAvailable then |
| 1678 |
FBoardPlugIn.DisposeThreadItem( DWORD( Self ) ); |
Self.ParentBoard.BoardPlugIn.DisposeThreadItem( DWORD( Self ) ); |
| 1679 |
|
|
| 1680 |
inherited; |
inherited; |
| 1681 |
|
|
| 1684 |
// ************************************************************************* |
// ************************************************************************* |
| 1685 |
// 外部板プラグインが使用可能か |
// 外部板プラグインが使用可能か |
| 1686 |
// ************************************************************************* |
// ************************************************************************* |
| 1687 |
|
{ |
| 1688 |
function TThreadItem.IsBoardPlugInAvailable : Boolean; |
function TThreadItem.IsBoardPlugInAvailable : Boolean; |
| 1689 |
begin |
begin |
| 1690 |
|
|
| 1702 |
Result := False; |
Result := False; |
| 1703 |
|
|
| 1704 |
end; |
end; |
| 1705 |
|
} |
| 1706 |
function TThreadItem.GetDatURL: string; |
function TThreadItem.GetDatURL: string; |
| 1707 |
var |
var |
| 1708 |
Protocol, Host, Path, Document, Port, Bookmark: string; |
Protocol, Host, Path, Document, Port, Bookmark: string; |
| 1963 |
Result := ZERO_DATE; |
Result := ZERO_DATE; |
| 1964 |
end; |
end; |
| 1965 |
end; |
end; |
| 1966 |
|
function TThreadItem.GetFilePath: String; |
| 1967 |
|
var |
| 1968 |
|
path : String; |
| 1969 |
|
begin |
| 1970 |
|
path := ExtractFilePath(Self.ParentBoard.FilePath) + Self.FileName; |
| 1971 |
|
Result := path; |
| 1972 |
|
end; |
| 1973 |
|
|
| 1974 |
|
procedure TBoardGroup.Clear; |
| 1975 |
|
var |
| 1976 |
|
i : Integer; |
| 1977 |
|
begin |
| 1978 |
|
for i := Self.Count - 1 downto 0 do begin |
| 1979 |
|
TBoard(Self.Objects[i]).Free; |
| 1980 |
|
end; |
| 1981 |
|
inherited Clear; |
| 1982 |
|
Self.Capacity := 0; |
| 1983 |
|
end; |
| 1984 |
|
|
| 1985 |
|
|
| 1986 |
end. |
end. |
| 1987 |
|
|