FHEADTXTTime: TDateTime; //HEAD.TXT\82ð\8eæ\93¾\82µ\82½\93ú\8e\9e
FIsHEADTXT: boolean; //HEAD.TXT\82ð\8eæ\93¾\82µ\82Ä\82¢\82é\82©
FTitlePictureURL: string; //top\8aG\82ÌURL
-
+ FMultiplicity : Integer; //\8fd\95¡\82µ\82Ä\82¢\82é\82©\82Ç\82¤\82©\81H
function GetThreadItem(index: integer): TThreadItem;
procedure SetThreadItem(index: integer; value: TThreadItem);
procedure SetRound(b: Boolean);
property HEADTXTTime: TDateTime read FHEADTXTTime write FHEADTXTTime;
property IsHEADTXT: boolean read FIsHEADTXT write FIsHEADTXT;
property TitlePictureURL: string read FTitlePictureURL write FTitlePictureURL;
-
+ property Multiplicity: Integer read FMultiplicity write FMultiplicity;
end;
//\83X\83\8c
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;
procedure TCategory.Delete(index: integer);
begin
- if Items[index] <> nil then
- TBoard(Items[index]).Free;
+ if (Items[index] <> nil) then begin
+ try
+ if TBoard(Items[index]).Multiplicity = 0 then
+ TBoard(Items[index]).Free
+ else
+ TBoard(Items[index]).Multiplicity := TBoard(Items[index]).Multiplicity - 1;
+ except
+ end;
+ end;
inherited Delete(index);
end;
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é
var
ini: TMemIniFile;
FileName: string;
- tmp: string;
+ tmp: string;
begin
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);
except
if( inDateTimeString[5] = '/' ) and ( inDateTimeString[8] = '/' ) then begin
y := StrToIntDef( Copy(inDateTimeString, 1, 4), 1970 );
- m := StrToIntDef( Copy(inDateTimeString, 6, 2), 1 );
+ m := StrToIntDef( Copy(inDateTimeString, 6, 2), 1 );
d := StrToIntDef( Copy(inDateTimeString, 9, 2), 1 );
hour := 0; min := 0; sec := 0;
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/subbbs.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);
if Items[i].NewArrival then
begin
if Items[i].ShortTitle = '' then
- Items[i].ShortTitle := ZenToHan(Items[i].Title);
+ Items[i].ShortTitle := CustomStringReplace(ZenToHan(Items[i].Title), ' ', '');
if AnsiPos(ParentCategory.ParenTBBS.ShortSelectText, Items[i].ShortTitle) <> 0 then
inc(Result);
end;
if Items[i].IsLogFile then
begin
if Items[i].ShortTitle = '' then
- Items[i].ShortTitle := ZenToHan(Items[i].Title);
+ Items[i].ShortTitle := CustomStringReplace(ZenToHan(Items[i].Title), ' ', '');
if AnsiPos(ParentCategory.ParenTBBS.ShortSelectText, Items[i].ShortTitle) <> 0 then
inc(Result);
end;
else
for i := 0 to Count - 1 do begin
if Items[i].ShortTitle = '' then
- Items[i].ShortTitle := ZenToHan(Items[i].Title);
+ Items[i].ShortTitle := CustomStringReplace(ZenToHan(Items[i].Title), ' ', '');
if AnsiPos(ParentCategory.ParenTBBS.ShortSelectText, Items[i].ShortTitle) <> 0 then
inc(Result);
end;
if Items[i].NewArrival then
begin
if Items[i].ShortTitle = '' then
- Items[i].ShortTitle := ZenToHan(Items[i].Title);
+ Items[i].ShortTitle := CustomStringReplace(ZenToHan(Items[i].Title), ' ', '');
if AnsiPos(ParentCategory.ParenTBBS.ShortSelectText, Items[i].ShortTitle) <> 0 then begin
if Index = Cnt then begin
Result := Items[i];
end else begin
for i := 0 to Count - 1 do begin
if Items[i].ShortTitle = '' then
- Items[i].ShortTitle := ZenToHan(Items[i].Title);
+ Items[i].ShortTitle := CustomStringReplace(ZenToHan(Items[i].Title), ' ', '');
if AnsiPos(ParentCategory.ParenTBBS.ShortSelectText, Items[i].ShortTitle) <> 0 then begin
if Index = Cnt then begin
Result := Items[i];
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;