function Find(key: string): TCategory;
function FindBBSID(BBSID: string): TBoard;
function FindBoardFromTitle(Title: string): TBoard;
+ function FindBoardFromURL(inURL: string): TBoard;
function FindThreadItem(BBSID: string; FileName: string): TThreadItem;
function GetLogFolder: string;
function FindName(key: string): TBoard;
function FindBBSID(BBSID: string): TBoard;
function FindBoardFromTitle(Title: string): TBoard;
+ function FindBoardFromURL(inURL: string): TBoard;
function IsMidoku: Boolean;
property NodeExpand: Boolean read FExpand write FExpand;
FExpand: Boolean;
FBoardPlugIn : TBoardPlugIn; // \82±\82Ì\94Â\82ð\83T\83|\81[\83g\82·\82é\83v\83\89\83O\83C\83\93
- FFilePath : string; // \82±\82Ì\83X\83\8c\88ê\97\97\82ª\95Û\91¶\82³\82ê\82Ä\82¢\82é\83p\83X
+ FFilePath : string; // \82±\82Ì\83X\83\8c\88ê\97\97\82ª\95Û\91¶\82³\82ê\82Ä\82¢\82é\83p\83X
FIsLogFile : Boolean; // \83\8d\83O\91¶\8dÝ\83t\83\89\83O
- FIntData : Integer; // \8dD\82«\82É\82¢\82¶\82Á\82Ä\82æ\82µ\81B\82¢\82ë\82ñ\82È\97p\93r\82É\8eg\82¤yo
- FListData : TList; // \8dD\82«\82É\82¢\82¶\82Á\82Ä\82æ\82µ\81B\82¢\82ë\82ñ\82È\97p\93r\82É\8eg\82¤yo
+ FIntData : Integer; // \8dD\82«\82É\82¢\82¶\82Á\82Ä\82æ\82µ\81B\82¢\82ë\82ñ\82È\97p\93r\82É\8eg\82¤yo
+ FListData : TList; // \8dD\82«\82É\82¢\82¶\82Á\82Ä\82æ\82µ\81B\82¢\82ë\82ñ\82È\97p\93r\82É\8eg\82¤yo
function GetThreadItem(index: integer): TThreadItem;
procedure SetThreadItem(index: integer; value: TThreadItem);
property ParentCategory: TCategory read FParentCategory write FParentCategory;
property BoardPlugIn : TBoardPlugIn read FBoardPlugIn;
- property FilePath : string read FFilePath write FFilePath;
- property IsLogFile : Boolean read FIsLogFile write FIsLogFile;
- property IntData : Integer read FIntData write FIntData;
- property ListData : TList read FListData write FListData;
- function IsBoardPlugInAvailable : Boolean;
+ property FilePath : string read FFilePath write FFilePath;
+ property IsLogFile : Boolean read FIsLogFile write FIsLogFile;
+ property IntData : Integer read FIntData write FIntData;
+ property ListData : TList read FListData write FListData;
+ function IsBoardPlugInAvailable : Boolean;
function Add(item: TThreadItem): integer;
procedure Insert(Index: Integer; Item: TThreadItem);
property BoardPlugIn : TBoardPlugIn read FBoardPlugIn;
property FilePath : string read FFilePath write FFilePath;
property SizeByte : Integer read FSizeByte write FSizeByte;
- function IsBoardPlugInAvailable : Boolean;
+ function IsBoardPlugInAvailable : Boolean;
end;
end;
end;
+function TBBS2ch.FindBoardFromURL(inURL: string): TBoard;
+var
+ i: Integer;
+ Category: TCategory;
+ Board: TBoard;
+begin
+ Result := nil;
+ for i := 0 to Count - 1 do begin
+ Category := Items[i];
+ Board := Category.FindBoardFromURL(inURL);
+ if Board <> nil then begin
+ Result := Board;
+ Exit;
+ end;
+ end;
+end;
+
function TBBS2ch.FindThreadItem(BBSID: string; FileName: string): TThreadItem;
var
Board: TBoard;
procedure TBBS2ch.ReadBoardFile;
var
i, j, k: integer;
- kbound: Integer;
+ kbound: Integer;
idx: Integer;
ini: TMemIniFile;
CategoryList: TStringList;
Category.Title := CategoryList[i];
for j := 0 to BoardList.Count - 1 do begin
- Board := nil;
+ Board := nil;
inistr := ini.ReadString(CategoryList[i], BoardList[j], '');
- //===== \83v\83\89\83O\83C\83\93
- try
- kbound := High( BoardPlugIns );
- for k := Low( BoardPlugIns ) to kbound do begin
- if Assigned( Pointer( BoardPlugIns[ k ].Module ) ) then begin
- if BoardPlugIns[ k ].AcceptURL( inistr ) then begin
- Board := TBoard.Create( BoardPlugIns[ k ], inistr );
+ //===== \83v\83\89\83O\83C\83\93
+ try
+ kbound := High( BoardPlugIns );
+ for k := Low( BoardPlugIns ) to kbound do begin
+ if Assigned( Pointer( BoardPlugIns[ k ].Module ) ) then begin
+ if BoardPlugIns[ k ].AcceptURL( inistr ) then begin
+ Board := TBoard.Create( BoardPlugIns[ k ], inistr );
Break;
- end;
- end;
- end;
- except
- // exception \82ª\94\90¶\82µ\82½\8fê\8d\87\82Í\93à\95\94\8f\88\97\9d\82É\94C\82¹\82½\82¢\82Ì\82Å\82±\82±\82Å\82Í\89½\82à\82µ\82È\82¢
- end;
+ end;
+ end;
+ end;
+ except
+ // exception \82ª\94\90¶\82µ\82½\8fê\8d\87\82Í\93à\95\94\8f\88\97\9d\82É\94C\82¹\82½\82¢\82Ì\82Å\82±\82±\82Å\82Í\89½\82à\82µ\82È\82¢
+ end;
if Board = nil then begin
Board := TBoard.Create;
Board.URL := inistr;
- end;
+ end;
Board.BeginUpdate;
Board.No := j + 1;
Board.Title := BoardList[j];
end;
end;
+function TCategory.FindBoardFromURL(inURL: string): TBoard;
+var
+ i: integer;
+begin
+ Result := nil;
+ for i := 0 to Count - 1 do begin
+ if Items[i].URL = inURL then begin
+ Result := Items[i];
+ Exit;
+ end;
+ end;
+end;
+
function TCategory.IsMidoku: Boolean;
var
i: Integer;
FUpdate := True;
- FBoardPlugIn := nil;
+ FBoardPlugIn := nil;
end;
// *************************************************************************
FBoardPlugIn := inPlugIn;
URL := inURL;
- // \83v\83\89\83O\83C\83\93\82É TBoardItem \82ª\8dì\90¬\82³\82ê\82½\82±\82Æ\82ð\93`\82¦\82é
+ // \83v\83\89\83O\83C\83\93\82É TBoardItem \82ª\8dì\90¬\82³\82ê\82½\82±\82Æ\82ð\93`\82¦\82é
inPlugIn.CreateBoardItem( DWORD( Self ) );
end;
SaveSettings;
end;
- // \83v\83\89\83O\83C\83\93\82É TBoardItem \82ª\94j\8aü\82³\82ê\82½\82±\82Æ\82ð\93`\82¦\82é
- if IsBoardPlugInAvailable then
- BoardPlugIn.DisposeBoardItem( DWORD( Self ) );
+ // \83v\83\89\83O\83C\83\93\82É TBoardItem \82ª\94j\8aü\82³\82ê\82½\82±\82Æ\82ð\93`\82¦\82é
+ if IsBoardPlugInAvailable then
+ BoardPlugIn.DisposeBoardItem( DWORD( Self ) );
Clear;
inherited;
begin
repeat
- if BoardPlugIn = nil then
- Break;
-
- if not Assigned( Pointer( BoardPlugIn.Module ) ) then
- Break;
+ if BoardPlugIn = nil then
+ Break;
+
+ if not Assigned( Pointer( BoardPlugIn.Module ) ) then
+ Break;
- Result := True;
- Exit;
- until True;
+ Result := True;
+ Exit;
+ until True;
- Result := False;
+ Result := False;
end;
FileName: string;
begin
if Length( FilePath ) > 0 then
- FileName := ExtractFilePath( FilePath ) + FOLDER_INI_FILENAME
- else
- FileName := ParentCategory.ParentBBS2ch.GetLogFolder
- + BBSID + PATH_DELIM + FOLDER_INI_FILENAME;
+ FileName := ExtractFilePath( FilePath ) + FOLDER_INI_FILENAME
+ else
+ FileName := ParentCategory.ParentBBS2ch.GetLogFolder
+ + BBSID + PATH_DELIM + FOLDER_INI_FILENAME;
if not FileExists(FileName) then
Exit;
FileName: string;
begin
if Length( FilePath ) > 0 then
- FileName := ExtractFilePath( FilePath )
- else
- FileName := ParentCategory.ParentBBS2ch.GetLogFolder
- + BBSID + PATH_DELIM;
+ FileName := ExtractFilePath( FilePath )
+ else
+ FileName := ParentCategory.ParentBBS2ch.GetLogFolder
+ + BBSID + PATH_DELIM;
if not GikoSys.DirectoryExistsEx(FileName) then
GikoSys.ForceDirectoriesEx(FileName);
FileName := FileName + FOLDER_INI_FILENAME;
function TBoard.GetSubjectFileName: string;
begin
if Length( FilePath ) > 0 then
- Result := FilePath
- else
- Result := ParentCategory.ParentBBS2ch.GetLogFolder
- + BBSID + PATH_DELIM + SUBJECT_FILENAME;
+ Result := FilePath
+ else
+ Result := ParentCategory.ParentBBS2ch.GetLogFolder
+ + BBSID + PATH_DELIM + SUBJECT_FILENAME;
end;
// \83C\83\93\83f\83b\83N\83X\83t\83@\83C\83\8b\96¼(folder.idx)\8eæ\93¾\81i\83p\83X\81{\83t\83@\83C\83\8b\96¼\81j
function TBoard.GetFolderIndexFileName: string;
begin
if Length( FilePath ) > 0 then
- Result := ExtractFilePath( FilePath ) + FOLDER_INDEX_FILENAME
- else
- Result := ParentCategory.ParentBBS2ch.GetLogFolder
- + BBSID + PATH_DELIM + FOLDER_INDEX_FILENAME;
+ Result := ExtractFilePath( FilePath ) + FOLDER_INDEX_FILENAME
+ else
+ Result := ParentCategory.ParentBBS2ch.GetLogFolder
+ + BBSID + PATH_DELIM + FOLDER_INDEX_FILENAME;
end;
// \83X\83\8c\97§\82Ä\91\97\90MURL
FBoardPlugIn := inPlugIn;
URL := inURL;
- // \83v\83\89\83O\83C\83\93\82É TThreadItem \82ª\8dì\90¬\82³\82ê\82½\82±\82Æ\82ð\93`\82¦\82é
+ // \83v\83\89\83O\83C\83\93\82É TThreadItem \82ª\8dì\90¬\82³\82ê\82½\82±\82Æ\82ð\93`\82¦\82é
inPlugIn.CreateThreadItem( DWORD( Self ) );
end;
begin
repeat
- if BoardPlugIn = nil then
- Break;
+ if BoardPlugIn = nil then
+ Break;
- if not Assigned( Pointer( BoardPlugIn.Module ) ) then
- Break;
+ if not Assigned( Pointer( BoardPlugIn.Module ) ) then
+ Break;
- Result := True;
- Exit;
- until True;
+ Result := True;
+ Exit;
+ until True;
- Result := False;
+ Result := False;
end;