| 265 |
function GetCreateDate: TDateTime; |
function GetCreateDate: TDateTime; |
| 266 |
function GetFilePath: String; |
function GetFilePath: String; |
| 267 |
public |
public |
| 268 |
constructor Create( inPlugIn : TBoardPlugIn; inURL : string ); overload; |
constructor Create(const inPlugIn : TBoardPlugIn; const inBoard : TBoard; inURL : string ); overload; |
| 269 |
constructor Create( is2ch : Boolean; const inURL, inHost, inBBSID, inBBSKey : string ); overload; |
constructor Create(const inPlugIn : TBoardPlugIn; const inBoard : TBoard; |
| 270 |
constructor Create( inPlugIn : TBoardPlugIn; const inBoard : TBoard; inURL : string ); overload; |
inURL : string; inExist: Boolean; const inFilename: string ); overload; |
|
constructor Create( is2ch : Boolean; const inBoard : TBoard; const inURL, inHost, inBBSID, inBBSKey : string); overload; |
|
| 271 |
|
|
| 272 |
destructor Destroy; override; |
destructor Destroy; override; |
| 273 |
|
|
| 373 |
if tmpBoard.Is2ch then begin |
if tmpBoard.Is2ch then begin |
| 374 |
if AnsiCompareStr(tmpBoard.BBSID, inBBSID) = 0 then begin |
if AnsiCompareStr(tmpBoard.BBSID, inBBSID) = 0 then begin |
| 375 |
Result := tmpBoard; |
Result := tmpBoard; |
| 376 |
|
EXIT; |
| 377 |
end; |
end; |
| 378 |
end; |
end; |
| 379 |
end; |
end; |
| 1523 |
// 外部板プラグインを指定したコンストラクタ |
// 外部板プラグインを指定したコンストラクタ |
| 1524 |
// ************************************************************************* |
// ************************************************************************* |
| 1525 |
constructor TThreadItem.Create( |
constructor TThreadItem.Create( |
| 1526 |
inPlugIn : TBoardPlugIn; |
const inPlugIn : TBoardPlugIn; |
| 1527 |
inURL : string |
const inBoard : TBoard; |
| 1528 |
|
inURL : string |
| 1529 |
); |
); |
| 1530 |
var |
var |
| 1531 |
foundPos : Integer; |
foundPos : Integer; |
| 1537 |
|
|
| 1538 |
inherited Create; |
inherited Create; |
| 1539 |
Init; |
Init; |
| 1540 |
|
FParentBoard := inBoard; |
| 1541 |
//FBoardPlugIn := inPlugIn; |
//FBoardPlugIn := inPlugIn; |
| 1542 |
URL := inURL; |
URL := inURL; |
| 1543 |
|
|
| 1544 |
if inPlugIn = nil then begin |
if inPlugIn = nil then begin |
| 1545 |
foundPos := Pos( READ_PATH, inURL ); |
foundPos := Pos( READ_PATH, inURL ); |
| 1547 |
// dat の保存パスを設定 |
// dat の保存パスを設定 |
| 1548 |
GikoSys.ParseURI( inURL, protocol, host, path, document, port, bookmark ); |
GikoSys.ParseURI( inURL, protocol, host, path, document, port, bookmark ); |
| 1549 |
GikoSys.Parse2chURL( inURL, path, document, BBSID, BBSKey ); |
GikoSys.Parse2chURL( inURL, path, document, BBSID, BBSKey ); |
| 1550 |
FileName := BBSKey + '.dat'; |
FileName := BBSKey + '.dat'; |
|
{ |
|
|
if GikoSys.Is2chHost( host ) then |
|
|
FilePath := |
|
|
GikoSys.Setting.LogFolderP + |
|
|
BBS2CH_LOG_FOLDER + PATH_DELIM + BBSID + PATH_DELIM + BBSKey + '.dat' |
|
|
else |
|
|
FilePath := |
|
|
GikoSys.Setting.LogFolderP + |
|
|
EXTERNAL_LOG_FOLDER + PATH_DELIM + host + PATH_DELIM + BBSID + PATH_DELIM + BBSKey + '.dat'; |
|
|
} |
|
| 1551 |
IsLogFile := FileExists( FilePath ); |
IsLogFile := FileExists( FilePath ); |
| 1552 |
URL := GikoSys.Get2chBrowsableThreadURL( inURL ); |
URL := GikoSys.Get2chBrowsableThreadURL( inURL ); |
| 1553 |
end; |
end; |
| 1557 |
end; |
end; |
| 1558 |
|
|
| 1559 |
end; |
end; |
| 1560 |
|
// ************************************************************************* |
| 1561 |
|
// 外部板プラグインを指定したコンストラクタ Log有りかどうか判断済み |
| 1562 |
|
// FileNameも取得済み → ReadSubject用 |
| 1563 |
|
// ************************************************************************* |
| 1564 |
constructor TThreadItem.Create( |
constructor TThreadItem.Create( |
| 1565 |
inPlugIn : TBoardPlugIn; |
const inPlugIn : TBoardPlugIn; |
| 1566 |
const inBoard : TBoard; |
const inBoard : TBoard; |
| 1567 |
inURL : string |
inURL : string; |
| 1568 |
|
inExist: Boolean; |
| 1569 |
|
const inFilename: string |
| 1570 |
); |
); |
|
var |
|
|
foundPos : Integer; |
|
|
protocol, host, path, document, port, bookmark : string; |
|
|
BBSID, BBSKey : string; |
|
|
const |
|
|
READ_PATH = '/test/read.cgi'; |
|
| 1571 |
begin |
begin |
| 1572 |
|
|
| 1573 |
inherited Create; |
inherited Create; |
| 1574 |
Init; |
Init; |
| 1575 |
FParentBoard := inBoard; |
FParentBoard := inBoard; |
|
//FBoardPlugIn := inPlugIn; |
|
| 1576 |
URL := inURL; |
URL := inURL; |
| 1577 |
|
|
| 1578 |
if inPlugIn = nil then begin |
if inPlugIn = nil then begin |
| 1579 |
foundPos := Pos( READ_PATH, inURL ); |
// dat の保存パスを設定 |
| 1580 |
if foundPos > 0 then begin |
FileName := inFilename; |
| 1581 |
// dat の保存パスを設定 |
IsLogFile := inExist; |
| 1582 |
GikoSys.ParseURI( inURL, protocol, host, path, document, port, bookmark ); |
URL := GikoSys.Get2chBrowsableThreadURL( inURL ); |
|
GikoSys.Parse2chURL( inURL, path, document, BBSID, BBSKey ); |
|
|
FileName := BBSKey + '.dat'; |
|
|
IsLogFile := FileExists( FilePath ); |
|
|
URL := GikoSys.Get2chBrowsableThreadURL( inURL ); |
|
|
end; |
|
| 1583 |
end else begin |
end else begin |
| 1584 |
// プラグインに TThreadItem が作成されたことを伝える |
// プラグインに TThreadItem が作成されたことを伝える |
| 1585 |
inPlugIn.CreateThreadItem( DWORD( Self ) ); |
inPlugIn.CreateThreadItem( DWORD( Self ) ); |
| 1586 |
end; |
end; |
| 1587 |
|
|
| 1588 |
end; |
end; |
|
|
|
|
// ************************************************************************* |
|
|
// プラグインを利用しないコンストラクタ |
|
|
// ************************************************************************* |
|
|
constructor TThreadItem.Create( |
|
|
is2ch : Boolean; |
|
|
const inURL, inHost, inBBSID, inBBSKey : string |
|
|
); |
|
|
var |
|
|
foundPos : Integer; |
|
|
tfilePath : String; |
|
|
const |
|
|
READ_PATH = '/test/read.cgi'; |
|
|
begin |
|
|
|
|
|
inherited Create; |
|
|
Init; |
|
|
|
|
|
//FBoardPlugIn := nil; |
|
|
|
|
|
foundPos := Pos( READ_PATH, inURL ); |
|
|
if foundPos > 0 then begin |
|
|
FileName := inBBSKey + '.dat'; |
|
|
|
|
|
// dat の保存パスを設定 |
|
|
if is2ch then |
|
|
tfilePath := |
|
|
|
|
|
GikoSys.Setting.LogFolderP + |
|
|
BBS2CH_LOG_FOLDER + PATH_DELIM + inBBSID + PATH_DELIM + inBBSKey + '.dat' |
|
|
else |
|
|
tfilePath := |
|
|
GikoSys.Setting.LogFolderP + |
|
|
EXTERNAL_LOG_FOLDER + PATH_DELIM + inHost + PATH_DELIM + inBBSID + PATH_DELIM + inBBSKey + '.dat'; |
|
|
|
|
|
IsLogFile := FileExists( tfilePath ); |
|
|
URL := GikoSys.Get2chBrowsableThreadURL( inURL ); |
|
|
end else |
|
|
URL := inURL; |
|
|
|
|
|
end; |
|
|
constructor TThreadItem.Create( |
|
|
is2ch : Boolean; |
|
|
const inBoard : TBoard; |
|
|
const inURL, inHost, inBBSID, inBBSKey : string |
|
|
); |
|
|
var |
|
|
foundPos : Integer; |
|
|
tfilePath : String; |
|
|
const |
|
|
READ_PATH = '/test/read.cgi'; |
|
|
begin |
|
|
|
|
|
inherited Create; |
|
|
Init; |
|
|
//FBoardPlugIn := nil; |
|
|
FParentBoard := inBoard; |
|
|
foundPos := Pos( READ_PATH, inURL ); |
|
|
if foundPos > 0 then begin |
|
|
FileName := inBBSKey + '.dat'; |
|
|
IsLogFile := FileExists( FilePath ); |
|
|
URL := GikoSys.Get2chBrowsableThreadURL( inURL ); |
|
|
end else |
|
|
URL := inURL; |
|
|
|
|
|
end; |
|
| 1589 |
// ************************************************************************* |
// ************************************************************************* |
| 1590 |
// デストラクタ |
// デストラクタ |
| 1591 |
// ************************************************************************* |
// ************************************************************************* |