From b14bfb6b27856497ddc3799e55fbc3b700f0cf96 Mon Sep 17 00:00:00 2001 From: yoffy Date: Sun, 23 Nov 2003 09:55:54 +0000 Subject: [PATCH] =?utf8?q?=E3=83=BB=E3=83=97=E3=83=A9=E3=82=B0=E3=82=A4?= =?utf8?q?=E3=83=B3=E3=82=92=E4=BD=BF=E7=94=A8=E3=81=97=E3=81=AA=E3=81=84?= =?utf8?q?=E5=A4=96=E9=83=A8=E6=9D=BF=E3=81=AE=20URL=20=E3=81=8C=E3=81=86?= =?utf8?q?=E3=81=BE=E3=81=8F=E6=89=B1=E3=81=88=E3=81=AA=E3=81=8F=E3=81=AA?= =?utf8?q?=E3=81=A3=E3=81=A6=E3=81=84=E3=81=9F=E3=81=AE=E3=81=A7=E4=BF=AE?= =?utf8?q?=E6=AD=A3=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- GikoSystem.pas | 41 ++++++++++++++++++++++++----------------- 1 file changed, 24 insertions(+), 17 deletions(-) diff --git a/GikoSystem.pas b/GikoSystem.pas index ca24c5c..2f12984 100644 --- a/GikoSystem.pas +++ b/GikoSystem.pas @@ -217,6 +217,10 @@ const DEFAULT_NGWORD_FILE_NAME : String = 'NGword.txt'; NGWORDs_DIR_NAME : String = 'NGwords'; + READ_PATH: string = '/test/read.cgi/'; + OLD_READ_PATH: string = '/test/read.cgi?'; + KAKO_PATH: string = '/kako/'; + (************************************************************************* *GikoSysƒRƒ“ƒXƒgƒ‰ƒNƒ^ *************************************************************************) @@ -516,11 +520,14 @@ begin sl := TStringList.Create; try + if Pos( 'giko', board.URL ) > 0 then begin + messagebox( 0, '', '', MB_OK ); + end; if FileExists(FileName) then sl.LoadFromFile(FileName); //‚Qs–Ú‚©‚çi‚Ps–ڂ̓o[ƒWƒ‡ƒ“j - for i := sl.Count - 1 downto 0 do begin + for i := sl.Count - 1 downto 1 do begin Rec := ParseIndexLine(sl[i]); if usePlugIn then @@ -531,7 +538,7 @@ begin ThreadItem := TThreadItem.Create( nil, Get2chBoard2ThreadURL( Board, ChangeFileExt( Rec.FFileName, '' ) ) ); - + //IsLogFileƒ`ƒFƒbƒN ThreadItem.IsLogFile := False; if FileList.Count <> 0 then begin @@ -2341,10 +2348,6 @@ begin end; function TGikoSys.Parse2chURL(const url: string; const path: string; const document: string; var BBSID: string; var BBSKey: string): Boolean; -const - READ_PATH: string = '/test/read.cgi/'; - OLD_READ_PATH: string = '/test/read.cgi?'; - KAKO_PATH: string = '/kako/'; var Index: Integer; s: string; @@ -2682,34 +2685,38 @@ function TGikoSys.Get2chBrowsableThreadURL( var Protocol, Host, Path, Document, Port, Bookmark : string; BBSID, BBSKey : string; -const - KAKO_PATH = '/kako/'; begin if Pos( KAKO_PATH, inURL ) > 0 then begin Result := inURL; end else begin ParseURI( inURL, Protocol, Host, Path, Document, Port, Bookmark ); - Parse2chURL( inURL, Path, Document, BBSID, BBSKey ); - Result := Protocol + '://' + Host + '/test/read.cgi/' + BBSID + '/' + BBSKey + '/l50'; + if Is2chHost( Host ) then begin + Parse2chURL( inURL, Path, Document, BBSID, BBSKey ); + Result := Protocol + '://' + Host + Path + READ_PATH + BBSID + '/' + BBSKey + '/l50'; + end else begin + Parse2chURL( inURL, Path, Document, BBSID, BBSKey ); + Result := Protocol + '://' + Host + Path + OLD_READ_PATH + 'bbs=' + BBSID + '&key=' + BBSKey + '&ls=50'; + end; end; end; function TGikoSys.Get2chBoard2ThreadURL( inBoard : TBoard; - inKey : string + inKey : string ) : string; var - url : string; - Protocol, Host, Path, Document, Port, Bookmark : string; + url : string; + server : string; begin - url := inBoard.URL; - ParseURI( url, Protocol, Host, Path, Document, Port, Bookmark ); - - Result := Protocol + '://' + Host + '/test/read.cgi/' + inBoard.BBSID + '/' + inKey + '/l50'; + server := UrlToServer( inBoard.URL ); + if Is2chHost( server ) then + Result := server + 'test/read.cgi/' + inBoard.BBSID + '/' + inKey + '/l50' + else + Result := server + 'test/read.cgi?bbs=' + inBoard.BBSID + '&key=' + inKey + '&ls=50'; end; -- 2.11.0