procedure Init;
function GetCreateDate: TDateTime;
public
- constructor Create( inPlugIn : TBoardPlugIn; inURL : string );
+ constructor Create( inPlugIn : TBoardPlugIn; inURL : string ); overload;
+ constructor Create( is2ch : Boolean; const inURL, inHost, inBBSID, inBBSKey : string ); overload;
+
destructor Destroy; override;
function GetDatURL: string;
GikoSys.ParseURI( inURL, protocol, host, path, document, port, bookmark );
if GikoSys.Is2chHost( host ) then
FilePath :=
- IncludeTrailingPathDelimiter( GikoSys.Setting.LogFolder ) +
+ GikoSys.Setting.LogFolderP +
BBS2CH_LOG_FOLDER + PATH_DELIM + BBSID + PATH_DELIM + SUBJECT_FILENAME
else
FilePath :=
- IncludeTrailingPathDelimiter( GikoSys.Setting.LogFolder ) +
+ GikoSys.Setting.LogFolderP +
EXTERNAL_LOG_FOLDER + PATH_DELIM + host + PATH_DELIM + BBSID + PATH_DELIM + SUBJECT_FILENAME
end else begin
// \83v\83\89\83O\83C\83\93\82É TBoardItem \82ª\8dì\90¬\82³\82ê\82½\82±\82Æ\82ð\93`\82¦\82é
if Length( FilePath ) > 0 then
FileName := ExtractFilePath( FilePath ) + FOLDER_INI_FILENAME
else
- FileName := IncludeTrailingPathDelimiter( GikoSys.Setting.LogFolder )
+ FileName := GikoSys.Setting.LogFolderP
+ BBS2CH_LOG_FOLDER + PATH_DELIM + BBSID + PATH_DELIM + FOLDER_INI_FILENAME;
if not FileExists(FileName) then
if Length( FilePath ) > 0 then
FileName := ExtractFilePath( FilePath )
else
- FileName := IncludeTrailingPathDelimiter( GikoSys.Setting.LogFolder )
+ FileName := GikoSys.Setting.LogFolderP
+ BBS2CH_LOG_FOLDER + PATH_DELIM + BBSID + PATH_DELIM;
if not GikoSys.DirectoryExistsEx(FileName) then
GikoSys.ForceDirectoriesEx(FileName);
if Length( FilePath ) > 0 then
Result := FilePath
else
- Result := IncludeTrailingPathDelimiter( GikoSys.Setting.LogFolder )
+ Result := GikoSys.Setting.LogFolderP
+ BBS2CH_LOG_FOLDER + PATH_DELIM + BBSID + PATH_DELIM + SUBJECT_FILENAME;
end;
if Length( FilePath ) > 0 then
Result := ExtractFilePath( FilePath ) + FOLDER_INDEX_FILENAME
else
- Result := IncludeTrailingPathDelimiter( GikoSys.Setting.LogFolder )
+ Result := GikoSys.Setting.LogFolderP
+ BBS2CH_LOG_FOLDER + PATH_DELIM + BBSID + PATH_DELIM + FOLDER_INDEX_FILENAME;
end;
//SETTING.TXT\82Ì\83t\83@\83C\83\8b\96¼\8eæ\93¾
if Length( FilePath ) > 0 then
Result := ExtractFilePath( FilePath ) + SETTINGTXT_FILENAME
else
- Result := IncludeTrailingPathDelimiter( GikoSys.Setting.LogFolder )
+ Result := GikoSys.Setting.LogFolderP
+ BBS2CH_LOG_FOLDER + PATH_DELIM + BBSID + PATH_DELIM + SETTINGTXT_FILENAME;
end;
if Length( FilePath ) > 0 then
Result := ExtractFilePath( FilePath ) + HEADTXT_FILENAME
else
- Result := IncludeTrailingPathDelimiter( GikoSys.Setting.LogFolder )
+ Result := GikoSys.Setting.LogFolderP
+ BBS2CH_LOG_FOLDER + PATH_DELIM + BBSID + PATH_DELIM + HEADTXT_FILENAME;
end;
function TBoard.GetTitlePictureFileName: string;
if Length( FilePath ) > 0 then
Result := ExtractFilePath( FilePath ) + tmpName
else
- Result := IncludeTrailingPathDelimiter( GikoSys.Setting.LogFolder )
+ Result := GikoSys.Setting.LogFolderP
+ BBS2CH_LOG_FOLDER + PATH_DELIM + BBSID + PATH_DELIM + tmpName;
end;
end;
// \83X\83\8c\97§\82Ä\91\97\90MURL
function TBoard.GetSendURL: string;
+var
+ Protocol, Host, Path, Document, Port, Bookmark : string;
begin
- Result := GikoSys.UrlToServer(URL) + 'test/bbs.cgi';
+ Result := GikoSys.UrlToServer(URL);
+ GikoSys.ParseURI( URL, Protocol,Host, Path, Document, Port, Bookmark );
+ if GikoSys.Is2chHost(Host) then
+ Result := Result + 'test/bbs.cgi'
+ else
+ Result := Result + 'test/subbbs.cgi';
+
end;
procedure TBoard.SetRound(b: Boolean);
GikoSys.Parse2chURL( inURL, path, document, BBSID, BBSKey );
if GikoSys.Is2chHost( host ) then
FilePath :=
- IncludeTrailingPathDelimiter( GikoSys.Setting.LogFolder ) +
+ GikoSys.Setting.LogFolderP +
BBS2CH_LOG_FOLDER + PATH_DELIM + BBSID + PATH_DELIM + BBSKey + '.dat'
else
FilePath :=
- IncludeTrailingPathDelimiter( GikoSys.Setting.LogFolder ) +
+ GikoSys.Setting.LogFolderP +
EXTERNAL_LOG_FOLDER + PATH_DELIM + host + PATH_DELIM + BBSID + PATH_DELIM + BBSKey + '.dat';
FileName := BBSKey + '.dat';
IsLogFile := FileExists( FilePath );
end;
// *************************************************************************
+// \83v\83\89\83O\83C\83\93\82ð\97\98\97p\82µ\82È\82¢\83R\83\93\83X\83g\83\89\83N\83^
+// *************************************************************************
+constructor TThreadItem.Create(
+ is2ch : Boolean;
+ const inURL, inHost, inBBSID, inBBSKey : string
+);
+var
+ foundPos : Integer;
+const
+ READ_PATH = '/test/read.cgi';
+begin
+
+ inherited Create;
+ Init;
+
+ FBoardPlugIn := nil;
+
+ foundPos := Pos( READ_PATH, inURL );
+ if foundPos > 0 then begin
+ // dat \82Ì\95Û\91¶\83p\83X\82ð\90Ý\92è
+ if is2ch then
+ FilePath :=
+
+ GikoSys.Setting.LogFolderP +
+ BBS2CH_LOG_FOLDER + PATH_DELIM + inBBSID + PATH_DELIM + inBBSKey + '.dat'
+ else
+ FilePath :=
+ GikoSys.Setting.LogFolderP +
+ EXTERNAL_LOG_FOLDER + PATH_DELIM + inHost + PATH_DELIM + inBBSID + PATH_DELIM + inBBSKey + '.dat';
+ FileName := inBBSKey + '.dat';
+ IsLogFile := FileExists( FilePath );
+ URL := GikoSys.Get2chBrowsableThreadURL( inURL );
+ end else
+ URL := inURL;
+
+end;
+// *************************************************************************
// \83f\83X\83g\83\89\83N\83^
// *************************************************************************
destructor TThreadItem.Destroy;
if Length( FilePath ) > 0 then
Result := FilePath
else
- Result := IncludeTrailingPathDelimiter( GikoSys.Setting.LogFolder )
+ Result := GikoSys.Setting.LogFolderP
+ BBS2CH_LOG_FOLDER + PATH_DELIM + ParentBoard.BBSID + PATH_DELIM + FileName;
end;