end;
function BBSsFindThreadFromURL(
- inURL : string
+ inURL : string
) : TThreadItem;
var
- i : Integer;
+ board : TBoard;
+ boardURL : string;
begin
- for i := Length( BBSs ) - 1 downto 0 do begin
- Result := BBSs[ i ].FindThreadFromURL( inURL );
- if Result <> nil then
- Exit;
- end;
-
- Result := nil;
+ boardURL := GikoSys.GetThreadURL2BoardURL( inURL );
+ board := BBSsFindBoardFromURL( boardURL );
+ if board = nil then
+ Result := nil
+ else
+ Result := board.FindThreadFromURL( inURL );
end;
//*************************************************************************)
function TBBS.FindThreadFromURL(inURL: string): TThreadItem;
var
- i : Integer;
+ board : TBoard;
+ boardURL : string;
begin
- for i := Count - 1 downto 0 do begin
- Result := Items[ i ].FindThreadFromURL( inURL );
- if Result <> nil then
- Exit;
- end;
- Result := nil;
+
+ boardURL := GikoSys.GetThreadURL2BoardURL( inURL );
+ board := FindBoardFromURL( boardURL );
+ if board = nil then
+ Result := nil
+ else
+ Result := board.FindThreadFromURL( inURL );
+
end;
function TBBS.FindThreadItem(BBSID: string; FileName: string): TThreadItem;
//*************************************************************************)
function TCategory.FindThreadFromURL(inURL: string): TThreadItem;
var
- i : Integer;
+ board : TBoard;
+ boardURL : string;
begin
- for i := Count - 1 downto 0 do begin
- Result := Items[ i ].FindThreadFromURL( inURL );
- if Result <> nil then
- Exit;
- end;
- Result := nil;
+ boardURL := GikoSys.GetThreadURL2BoardURL( inURL );
+ board := FindBoardFromURL( boardURL );
+ if board = nil then
+ Result := nil
+ else
+ Result := board.FindThreadFromURL( inURL );
end;
IncludeTrailingPathDelimiter( GikoSys.Setting.LogFolder ) +
EXTERNAL_LOG_FOLDER + PATH_DELIM + host + PATH_DELIM + BBSID + PATH_DELIM + BBSKey + '.dat';
FileName := BBSKey + '.dat';
- IsLogFile := FileExists( FilePath );
+ IsLogFile := FileExists( FilePath );
end;
end else begin
// \83v\83\89\83O\83C\83\93\82É TThreadItem \82ª\8dì\90¬\82³\82ê\82½\82±\82Æ\82ð\93`\82¦\82é
function TFavoriteThreadItem.GetItem : TThreadItem;
var
threadItem : TThreadItem;
- boardPlugIn : TBoardPlugIn;
board : TBoard;
boardURL : string;
i : Integer;
begin
if FItem = nil then begin
- //===== \83v\83\89\83O\83C\83\93
- boardPlugIn := nil;
- try
- for i := Length( BoardPlugIns ) - 1 downto 0 do begin
- if Assigned( Pointer( BoardPlugIns[ i ].Module ) ) then begin
- if BoardPlugIns[ i ].AcceptURL( url ) = atThread then begin
- boardPlugIn := BoardPlugIns[ i ];
- threadItem := TThreadItem.Create(boardPlugIn, URL );
- boardURL := BoardPlugIns[ i ].GetBoardURL( Longword( threadItem ) );
- threadItem.Free;
-
- 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;
-
- if Length( boardURL ) = 0 then
- boardURL := GikoSys.Get2chThreadURL2BoardURL( URL );
-
- board := BBSsFindBoardFromURL( boardURL );
+ boardURL := GikoSys.GetThreadURL2BoardURL( URL );
+ board := BBSsFindBoardFromURL( boardURL );
if board = nil then
// \81¦\8dì\82Á\82Ä\82à\81A\92Ç\89Á\82·\82é\83J\83e\83S\83\8a\82ª\96³\82¢\82Ì\82Å\8c\83\82µ\82\95Û\97¯
FItem := board.FindThreadFromURL( URL );
if FItem = nil then begin
- FItem := TThreadItem.Create( boardPlugIn, URL );
+ FItem := TThreadItem.Create( board.BoardPlugIn, URL );
FItem.Title := Title;
board.Add( FItem );
function Parse2chURL2(URL: string): TPathRec;
procedure ParseURI(var URL, Protocol, Host, Path, Document, Port, Bookmark: string);
function GetVersionBuild: Integer;
+ function GetThreadURL2BoardURL( inURL : string ) : string;
function Get2chThreadURL2BoardURL( inURL : string ) : string;
function Get2chBrowsableThreadURL( inURL : string ) : string;
function Get2chBoard2ThreadURL( inBoard : TBoard; inKey : string ) : string;
end;
end;
+function TGikoSys.GetThreadURL2BoardURL(
+ inURL : string
+) : string;
+var
+ threadItem : TThreadItem;
+ boardPlugIn : TBoardPlugIn;
+ i : Integer;
+begin
+
+ //===== \83v\83\89\83O\83C\83\93
+ boardPlugIn := nil;
+ try
+ for i := Length( BoardPlugIns ) - 1 downto 0 do begin
+ if Assigned( Pointer( BoardPlugIns[ i ].Module ) ) then begin
+ if BoardPlugIns[ i ].AcceptURL( inURL ) = atThread then begin
+ boardPlugIn := BoardPlugIns[ i ];
+ threadItem := TThreadItem.Create( boardPlugIn, inURL );
+ Result := BoardPlugIns[ i ].GetBoardURL( Longword( threadItem ) );
+ threadItem.Free;
+
+ 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;
+
+ if Length( Result ) = 0 then
+ Result := GikoSys.Get2chThreadURL2BoardURL( inURL );
+
+end;
+
function TGikoSys.Get2chThreadURL2BoardURL(
inURL : string
) : string;