Develop and Download Open Source Software

Browse CVS Repository

Diff of /gikonavigoeson/gikonavi/GikoSystem.pas

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.80 by yoffy, Sun Nov 23 09:25:26 2003 UTC revision 1.81 by yoffy, Sun Nov 23 09:55:54 2003 UTC
# Line 217  const Line 217  const
217          DEFAULT_NGWORD_FILE_NAME : String = 'NGword.txt';          DEFAULT_NGWORD_FILE_NAME : String = 'NGword.txt';
218          NGWORDs_DIR_NAME : String               = 'NGwords';          NGWORDs_DIR_NAME : String               = 'NGwords';
219    
220            READ_PATH: string =                     '/test/read.cgi/';
221            OLD_READ_PATH: string =         '/test/read.cgi?';
222            KAKO_PATH: string =                     '/kako/';
223    
224  (*************************************************************************  (*************************************************************************
225   *GikoSysコンストラクタ   *GikoSysコンストラクタ
226   *************************************************************************)   *************************************************************************)
# Line 516  begin Line 520  begin
520    
521          sl := TStringList.Create;          sl := TStringList.Create;
522          try          try
523                    if Pos( 'giko', board.URL ) > 0 then begin
524                            messagebox( 0, '', '', MB_OK );
525                    end;
526                  if FileExists(FileName) then                  if FileExists(FileName) then
527                          sl.LoadFromFile(FileName);                          sl.LoadFromFile(FileName);
528    
529                  //2行目から(1行目はバージョン)                  //2行目から(1行目はバージョン)
530                  for i := sl.Count - 1 downto 0 do begin                  for i := sl.Count - 1 downto 1 do begin
531                          Rec := ParseIndexLine(sl[i]);                          Rec := ParseIndexLine(sl[i]);
532    
533                          if usePlugIn then                          if usePlugIn then
# Line 531  begin Line 538  begin
538                                  ThreadItem := TThreadItem.Create(                                  ThreadItem := TThreadItem.Create(
539                                          nil,                                          nil,
540                                          Get2chBoard2ThreadURL( Board, ChangeFileExt( Rec.FFileName, '' ) ) );                                          Get2chBoard2ThreadURL( Board, ChangeFileExt( Rec.FFileName, '' ) ) );
541                                    
542                                  //IsLogFileチェック                                  //IsLogFileチェック
543                                  ThreadItem.IsLogFile := False;                                  ThreadItem.IsLogFile := False;
544                                  if FileList.Count <> 0 then begin                                  if FileList.Count <> 0 then begin
# Line 2341  begin Line 2348  begin
2348  end;  end;
2349    
2350  function TGikoSys.Parse2chURL(const url: string; const path: string; const document: string; var BBSID: string; var BBSKey: string): Boolean;  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/';  
2351  var  var
2352          Index: Integer;          Index: Integer;
2353          s: string;          s: string;
# Line 2682  function       TGikoSys.Get2chBrowsableThreadU Line 2685  function       TGikoSys.Get2chBrowsableThreadU
2685  var  var
2686          Protocol, Host, Path, Document, Port, Bookmark : string;          Protocol, Host, Path, Document, Port, Bookmark : string;
2687          BBSID, BBSKey : string;          BBSID, BBSKey : string;
 const  
         KAKO_PATH       = '/kako/';  
2688  begin  begin
2689    
2690          if Pos( KAKO_PATH, inURL ) > 0 then begin          if Pos( KAKO_PATH, inURL ) > 0 then begin
2691                  Result := inURL;                  Result := inURL;
2692          end else begin          end else begin
2693                  ParseURI( inURL, Protocol, Host, Path, Document, Port, Bookmark );                  ParseURI( inURL, Protocol, Host, Path, Document, Port, Bookmark );
                 Parse2chURL( inURL, Path, Document, BBSID, BBSKey );  
2694    
2695                  Result := Protocol + '://' + Host + '/test/read.cgi/' + BBSID + '/' + BBSKey + '/l50';                  if Is2chHost( Host ) then begin
2696                            Parse2chURL( inURL, Path, Document, BBSID, BBSKey );
2697                            Result := Protocol + '://' + Host + Path + READ_PATH + BBSID + '/' + BBSKey + '/l50';
2698                    end else begin
2699                            Parse2chURL( inURL, Path, Document, BBSID, BBSKey );
2700                            Result := Protocol + '://' + Host + Path + OLD_READ_PATH + 'bbs=' + BBSID + '&key=' + BBSKey + '&ls=50';
2701                    end;
2702          end;          end;
2703    
2704  end;  end;
2705    
2706  function        TGikoSys.Get2chBoard2ThreadURL(  function        TGikoSys.Get2chBoard2ThreadURL(
2707          inBoard : TBoard;          inBoard : TBoard;
2708          inKey           : string          inKey           : string
2709  ) : string;  ) : string;
2710  var  var
2711          url : string;          url                     : string;
2712          Protocol, Host, Path, Document, Port, Bookmark : string;          server  : string;
2713  begin  begin
2714    
2715          url := inBoard.URL;          server := UrlToServer( inBoard.URL );
2716          ParseURI( url, Protocol, Host, Path, Document, Port, Bookmark );          if Is2chHost( server ) then
2717                    Result := server + 'test/read.cgi/' + inBoard.BBSID + '/' + inKey + '/l50'
2718          Result := Protocol + '://' + Host + '/test/read.cgi/' + inBoard.BBSID + '/' + inKey + '/l50';          else
2719                    Result := server + 'test/read.cgi?bbs=' + inBoard.BBSID + '&key=' + inKey + '&ls=50';
2720    
2721  end;  end;
2722    

Legend:
Removed from v.1.80  
changed lines
  Added in v.1.81

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26