ギコナビ
Revisão | d5df7a08e8348887f31c6859657e1965da2e03e9 (tree) |
---|---|
Hora | 2008-09-14 10:47:48 |
Autor | cvs2git <cvs2git> |
Commiter | cvs2git |
This commit was manufactured by cvs2svn to create tag 'v1_58_0_752'.
@@ -334,12 +334,6 @@ type | ||
334 | 334 | property BoardPlugIn : TBoardPlugIn read FBoardPlugIn write FBoardPlugIn; |
335 | 335 | end; |
336 | 336 | |
337 | - // ÁêprpTBoard | |
338 | - TSpecialBoard = class(TBoard) | |
339 | - public | |
340 | - function Add(item: TThreadItem): integer; overload; | |
341 | - procedure Clear; overload; | |
342 | - end; | |
343 | 337 | |
344 | 338 | function BBSsFindBoardFromBBSID( inBBSID : string ) : TBoard; |
345 | 339 | function BBSsFindBoardFromURL( inURL : string ) : TBoard; |
@@ -347,13 +341,9 @@ type | ||
347 | 341 | function BBSsFindThreadFromURL(const inURL : string ) : TThreadItem; |
348 | 342 | function ConvertDateTimeString( inDateTimeString : string) : TDateTime; |
349 | 343 | |
350 | - procedure DestorySpecialBBS( inBBS : TBBS ); | |
351 | - | |
352 | 344 | var |
353 | 345 | BBSs : array of TBBS; |
354 | 346 | BoardGroups : array of TBoardGroup; |
355 | - SpecialBBS : TBBS; | |
356 | - SpecialBoard: TSpecialBoard; | |
357 | 347 | |
358 | 348 | implementation |
359 | 349 |
@@ -539,28 +529,6 @@ begin | ||
539 | 529 | end; |
540 | 530 | |
541 | 531 | end; |
542 | -{! | |
543 | -\brief ÁêprBBSí | |
544 | -\param bbs í·éÁêprBBS | |
545 | -} | |
546 | -procedure DestorySpecialBBS( inBBS : TBBS ); | |
547 | -var | |
548 | - sCategory : TCategory; | |
549 | - sBoard : TSpecialBoard; | |
550 | -begin | |
551 | - if inBBS <> nil then begin | |
552 | - sCategory := inBBS.Items[0]; | |
553 | - if sCategory <> nil then begin | |
554 | - sBoard := TSpecialBoard(sCategory.Items[0]); | |
555 | - if sBoard <> nil then begin | |
556 | - sBoard.Modified := False; | |
557 | - sBoard.Clear; | |
558 | - FreeAndNil(sBoard); | |
559 | - end; | |
560 | - end; | |
561 | - FreeAndNil(inBBS); | |
562 | - end; | |
563 | -end; | |
564 | 532 | |
565 | 533 | (************************************************************************* |
566 | 534 | *@\¼FTBBSRXgN^ |
@@ -1862,19 +1830,6 @@ begin | ||
1862 | 1830 | |
1863 | 1831 | end; |
1864 | 1832 | |
1865 | -function TSpecialBoard.Add(item: TThreadItem): integer; | |
1866 | -begin | |
1867 | - Result := inherited AddObject(Item.URL, Item); | |
1868 | -end; | |
1869 | - | |
1870 | -procedure TSpecialBoard.Clear; | |
1871 | -var | |
1872 | - i: integer; | |
1873 | -begin | |
1874 | - for i := Count - 1 downto 0 do | |
1875 | - DeleteList(i); | |
1876 | - Capacity := 0; | |
1877 | -end; | |
1878 | 1833 | |
1879 | 1834 | end. |
1880 | 1835 |
@@ -368,7 +368,6 @@ object EditorForm: TEditorForm | ||
368 | 368 | Left = 324 |
369 | 369 | Top = 0 |
370 | 370 | Action = ContinueModeAction |
371 | - Style = tbsCheck | |
372 | 371 | end |
373 | 372 | end |
374 | 373 | object MainMenu: TMainMenu |
@@ -8397,9 +8397,6 @@ object GikoForm: TGikoForm | ||
8397 | 8397 | object ID1: TMenuItem |
8398 | 8398 | Action = GikoDM.SameIDResAnchorAction |
8399 | 8399 | end |
8400 | - object N83: TMenuItem | |
8401 | - Action = GikoDM.DereferenceResAction | |
8402 | - end | |
8403 | 8400 | end |
8404 | 8401 | object BrowserTabPopupMenu: TPopupMenu |
8405 | 8402 | Images = HotToobarImageList |
@@ -8753,11 +8750,4 @@ object GikoForm: TGikoForm | ||
8753 | 8750 | Left = 8 |
8754 | 8751 | Top = 440 |
8755 | 8752 | end |
8756 | - object TaskTrayPopupMenu: TPopupMenu | |
8757 | - Left = 38 | |
8758 | - Top = 373 | |
8759 | - object Exit1: TMenuItem | |
8760 | - Action = GikoDM.ExitAction | |
8761 | - end | |
8762 | - end | |
8763 | 8753 | end |
@@ -417,9 +417,6 @@ type | ||
417 | 417 | IDNG1: TMenuItem; |
418 | 418 | IDNG2: TMenuItem; |
419 | 419 | ResPopupClearTimer: TTimer; |
420 | - TaskTrayPopupMenu: TPopupMenu; | |
421 | - Exit1: TMenuItem; | |
422 | - N83: TMenuItem; | |
423 | 420 | procedure FormCreate(Sender: TObject); |
424 | 421 | procedure FormDestroy(Sender: TObject); |
425 | 422 | procedure BrowserStatusTextChange(Sender: TObject; |
@@ -692,9 +689,6 @@ type | ||
692 | 689 | function isValidFile(FileName: String) : boolean; |
693 | 690 | //! ListViewÌD&Dó¯æè |
694 | 691 | procedure AcceptDropFiles(var Msg: TMsg); |
695 | - //! XbhêXV | |
696 | - procedure UpdateListView(); | |
697 | - | |
698 | 692 | protected |
699 | 693 | procedure CreateParams(var Params: TCreateParams); override; |
700 | 694 | procedure WndProc(var Message: TMessage); override; |
@@ -821,8 +815,6 @@ type | ||
821 | 815 | procedure TaskTrayIconMessage(var Msg : TMsg); message WM_USER + 2010; |
822 | 816 | //! ^XNgCÉACRo^tH[Bµ |
823 | 817 | procedure StoredTaskTray; |
824 | - //! ¯IDXAJ[\¦ | |
825 | - procedure ShowSameIDAncher(const AID: String); | |
826 | 818 | published |
827 | 819 | property EnabledCloseButton: Boolean read FEnabledCloseButton write SetEnabledCloseButton; |
828 | 820 | end; |
@@ -1553,13 +1545,8 @@ var | ||
1553 | 1545 | i : Integer; |
1554 | 1546 | wp : TWindowPlacement; |
1555 | 1547 | tmpBool : Boolean; |
1556 | - WindowPlacement: TWindowPlacement; | |
1548 | + doc:IHTMLDocument2; | |
1557 | 1549 | begin |
1558 | - // ^XNgCÌACRí | |
1559 | - if (FIconData.uID <> 0) then begin | |
1560 | - Shell_NotifyIcon(NIM_DELETE, @FIconData); | |
1561 | - end; | |
1562 | - | |
1563 | 1550 | // }EXWFX`[Jú |
1564 | 1551 | try |
1565 | 1552 | if GikoSys.Setting.GestureEnabled then begin |
@@ -1577,9 +1564,6 @@ begin | ||
1577 | 1564 | except |
1578 | 1565 | end; |
1579 | 1566 | try |
1580 | - WindowPlacement.length := SizeOf(TWindowPlacement); | |
1581 | - GetWindowPlacement(Self.Handle, @WindowPlacement); | |
1582 | - | |
1583 | 1567 | //Åå»EEBhEÊuÛ¶ |
1584 | 1568 | wp.length := sizeof(wp); |
1585 | 1569 | GetWindowPlacement(Handle, @wp); |
@@ -1587,8 +1571,8 @@ begin | ||
1587 | 1571 | GikoSys.Setting.WindowLeft := wp.rcNormalPosition.Left; |
1588 | 1572 | GikoSys.Setting.WindowHeight := wp.rcNormalPosition.Bottom - wp.rcNormalPosition.Top; |
1589 | 1573 | GikoSys.Setting.WindowWidth := wp.rcNormalPosition.Right - wp.rcNormalPosition.Left; |
1590 | - GikoSys.Setting.WindowMax := (WindowState = wsMaximized) or | |
1591 | - (WindowPlacement.flags = WPF_RESTORETOMAXIMIZED); | |
1574 | + GikoSys.Setting.WindowMax := WindowState = wsMaximized; | |
1575 | + | |
1592 | 1576 | GikoSys.Setting.ListStyle := ListView.ViewStyle; |
1593 | 1577 | GikoSys.Setting.CabinetVisible := GikoDM.CabinetVisibleAction.Checked; |
1594 | 1578 | GikoSys.Setting.CabinetWidth := CabinetPanel.Width; |
@@ -1743,7 +1727,6 @@ begin | ||
1743 | 1727 | BBSs[ i ].Free; |
1744 | 1728 | BBSs[ i ] := nil; |
1745 | 1729 | end; |
1746 | - DestorySpecialBBS(BoardGroup.SpecialBBS); | |
1747 | 1730 | except |
1748 | 1731 | end; |
1749 | 1732 |
@@ -2584,7 +2567,20 @@ begin | ||
2584 | 2567 | end; |
2585 | 2568 | TreeView.Refresh; |
2586 | 2569 | //ListViewűÌXªÜÜêéÂð\¦µÄ¢éÆ«ÌXV |
2587 | - UpdateListView(); | |
2570 | + if (ActiveList <> nil) and (ActiveList is TBoard) then begin | |
2571 | + TBoard(ActiveList).LogThreadCount := TBoard(ActiveList).GetLogThreadCount; | |
2572 | + TBoard(ActiveList).NewThreadCount := TBoard(ActiveList).GetNewThreadCount; | |
2573 | + TBoard(ActiveList).UserThreadCount:= TBoard(ActiveList).GetUserThreadCount; | |
2574 | + //ListViewÌACeÌÂàXV | |
2575 | + case GikoForm.ViewType of | |
2576 | + gvtAll: ListView.Items.Count := TBoard(ActiveList).Count; | |
2577 | + gvtLog: ListView.Items.Count := TBoard(ActiveList).LogThreadCount; | |
2578 | + gvtNew: ListView.Items.Count := TBoard(ActiveList).NewThreadCount; | |
2579 | + gvtArch: ListView.Items.Count := TBoard(ActiveList).ArchiveThreadCount; | |
2580 | + gvtLive: ListView.Items.Count := TBoard(ActiveList).LiveThreadCount; | |
2581 | + gvtUser: ListView.Items.Count := TBoard(ActiveList).UserThreadCount; | |
2582 | + end; | |
2583 | + end; | |
2588 | 2584 | RefreshListView(Item.ThreadItem); |
2589 | 2585 | end; |
2590 | 2586 |
@@ -3076,9 +3072,6 @@ begin | ||
3076 | 3072 | BBSs[i].SelectText := SelectText; |
3077 | 3073 | BBSs[i].KubetsuChk := KubetsuChk; |
3078 | 3074 | end; |
3079 | - BoardGroup.SpecialBBS.SelectText := SelectText; | |
3080 | - BoardGroup.SpecialBBS.KubetsuChk := KubetsuChk; | |
3081 | - | |
3082 | 3075 | ViewType := AViewType; |
3083 | 3076 | if ActiveList is TBoard then begin |
3084 | 3077 | Board := TBoard(ActiveList); |
@@ -4960,13 +4953,9 @@ begin | ||
4960 | 4953 | if PreviewTimer.Enabled then |
4961 | 4954 | PreviewTimer.Enabled := False; |
4962 | 4955 | |
4963 | - //WindowOÉÚ®µ½Æ«ÍÁ¦éæ¤É·é½ß | |
4964 | - if (FResPopupBrowser <> nil) and (IsWindowVisible(FResPopupBrowser.Handle)) then begin | |
4965 | - // ENbNÌÍÁ³È¢æ¤ÉðÇÁ | |
4966 | - if (Message.MouseMsg <> WM_RBUTTONUP) then begin | |
4967 | - FResPopupBrowser.Clear; | |
4968 | - end; | |
4969 | - end; | |
4956 | + if (FResPopupBrowser <> nil) and (IsWindowVisible(FResPopupBrowser.Handle)) then begin | |
4957 | + FResPopupBrowser.Clear; | |
4958 | + end; | |
4970 | 4959 | |
4971 | 4960 | if (FPreviewBrowser <> nil) |
4972 | 4961 | and (IsWindowVisible(FPreviewBrowser.Handle)) then begin |
@@ -5722,7 +5711,7 @@ procedure TGikoForm.SelectComboBoxKeyDown(Sender: TObject; var Key: Word; | ||
5722 | 5711 | Shift: TShiftState); |
5723 | 5712 | var |
5724 | 5713 | IMC: HIMC; |
5725 | - Len, idx: integer; | |
5714 | + Len: integer; | |
5726 | 5715 | Str: string; |
5727 | 5716 | tmp: string; |
5728 | 5717 | begin |
@@ -5748,20 +5737,6 @@ begin | ||
5748 | 5737 | SetSelectWord(Str); |
5749 | 5738 | end; |
5750 | 5739 | end; |
5751 | - end else if (Key = Windows.VK_DELETE) and (ssCtrl in Shift) then begin | |
5752 | - // Ctrl + DEL Åí·é | |
5753 | - Str := SelectComboBox.Text; | |
5754 | - idx := GikoSys.Setting.SelectTextList.IndexOf( Str ); | |
5755 | - if idx <> -1 then begin | |
5756 | - GikoSys.Setting.SelectTextList.Delete( idx ); | |
5757 | - end; | |
5758 | - idx := SelectComboBox.Items.IndexOf( Str ); | |
5759 | - if idx <> -1 then begin | |
5760 | - SelectComboBox.Items.Delete( idx ); | |
5761 | - end; | |
5762 | - SelectComboBox.Text := ''; | |
5763 | - // iÝðð·é½ßÉÏXCxgðÄÑo· | |
5764 | - SelectComboBox.OnChange(Sender); | |
5765 | 5740 | end else if Length( SelectComboBox.Text ) = 0 then |
5766 | 5741 | begin |
5767 | 5742 | {* SelectComboBox.TextªóÅàAüÍrÅEscµ½Æ© |
@@ -6778,12 +6753,18 @@ end; | ||
6778 | 6753 | //! XbhuEUNbNCxg |
6779 | 6754 | // ************************************************************************* |
6780 | 6755 | function TGikoForm.WebBrowserClick(Sender: TObject): WordBool; |
6756 | +const | |
6757 | + LIMIT = 20; | |
6781 | 6758 | var |
6782 | 6759 | e: IHTMLElement; |
6783 | 6760 | doc : IHTMLDocument2; |
6784 | 6761 | FOleInPlaceActiveObject: IOleInPlaceActiveObject; |
6785 | 6762 | p : TPoint; |
6786 | 6763 | AID: string; |
6764 | + stlist : TStringList; | |
6765 | + i, count: Integer; | |
6766 | + body : String; | |
6767 | + limited : Integer; | |
6787 | 6768 | begin |
6788 | 6769 | result := true; |
6789 | 6770 | if not Assigned(FActiveContent) then |
@@ -6795,53 +6776,63 @@ begin | ||
6795 | 6776 | FOleInPlaceActiveObject := FActiveContent.Browser.ControlInterface as IOleInPlaceActiveObject; |
6796 | 6777 | FOleInPlaceActiveObject.OnFrameWindowActivate(True); |
6797 | 6778 | GetCursorPos(p); |
6798 | - | |
6779 | + | |
6799 | 6780 | p.x := p.x - FActiveContent.Browser.ClientOrigin.x; |
6800 | 6781 | p.y := p.y - FActiveContent.Browser.ClientOrigin.y; |
6801 | - | |
6782 | + | |
6802 | 6783 | doc := FActiveContent.Browser.ControlInterface.Document as IHTMLDocument2; |
6803 | 6784 | if not Assigned(doc) then |
6804 | 6785 | Exit; |
6805 | 6786 | |
6806 | 6787 | e := doc.elementFromPoint(p.x, p.y); |
6807 | - if not Assigned(e) then | |
6788 | + if not Assigned(e) then | |
6808 | 6789 | Exit; |
6809 | - | |
6790 | + | |
6810 | 6791 | if (e.className = 'date') or (e.id = 'date') then begin |
6811 | - AID := GikoSys.ExtructResID(e.innerText); | |
6812 | - ShowSameIDAncher(AID); | |
6792 | + AID := e.innerText; | |
6793 | + if AnsiPos('id', AnsiLowerCase(AID)) > 0 then begin | |
6794 | + AID := Copy(AID, AnsiPos('id', AnsiLowerCase(AID)) - 1, 11); | |
6795 | + if AnsiPos(' be:', AnsiLowerCase(AID)) > 0 then begin | |
6796 | + AID := Copy(AID, 1, AnsiPos(' BE:', AnsiLowerCase(AID)) - 1) | |
6797 | + end; | |
6798 | + end else begin | |
6799 | + stlist := TStringList.Create; | |
6800 | + try | |
6801 | + stList.DelimitedText := AID; | |
6802 | + AID := ''; | |
6803 | + for i := 0 to stList.Count - 1 do begin | |
6804 | + if Length(WideString(stList[i])) = 8 then begin | |
6805 | + if GikoSys.NotDateorTimeString(stList[i]) then begin | |
6806 | + AID := stList[i]; | |
6807 | + break; | |
6808 | + end; | |
6809 | + end; | |
6810 | + end; | |
6811 | + finally | |
6812 | + stList.Free; | |
6813 | + end; | |
6814 | + end; | |
6815 | + | |
6816 | + count := GikoSys.GetSameIDResCount(AID, FActiveContent.Thread); | |
6817 | + limited := LIMIT; | |
6818 | + if not (GikoSys.Setting.LimitResCountMessage) then begin | |
6819 | + limited := -1; | |
6820 | + end else if (count > LIMIT) then begin | |
6821 | + if (GikoUtil.MsgBox(Handle, | |
6822 | + IntToStr(LIMIT) + 'ÂÈã èÜ·ªA·×Ä\¦µÜ·©H', | |
6823 | + 'ID|bvAbvx', | |
6824 | + MB_YESNO or MB_ICONQUESTION) = ID_YES) then begin | |
6825 | + limited := -1; | |
6826 | + end | |
6827 | + end; | |
6828 | + | |
6829 | + body := GikoSys.GetSameIDResAnchor(AID, FActiveContent.Thread, limited); | |
6830 | + FActiveContent.IDAnchorPopup(body); | |
6813 | 6831 | end; |
6814 | 6832 | except |
6815 | 6833 | end; |
6816 | 6834 | end; |
6817 | -procedure TGikoForm.ShowSameIDAncher(const AID: String); | |
6818 | -const | |
6819 | - LIMIT = 20; | |
6820 | -var | |
6821 | - numbers : TStringList; | |
6822 | - limited : Integer; | |
6823 | -begin | |
6824 | - numbers := TStringList.Create; | |
6825 | - try | |
6826 | 6835 | |
6827 | - GikoSys.GetSameIDRes(AID, FActiveContent.Thread, numbers); | |
6828 | - limited := LIMIT; | |
6829 | - if not (GikoSys.Setting.LimitResCountMessage) then begin | |
6830 | - limited := -1; | |
6831 | - end else if (numbers.Count > LIMIT) then begin | |
6832 | - if (GikoUtil.MsgBox(Handle, | |
6833 | - IntToStr(LIMIT) + 'ÂÈã èÜ·ªA·×Ä\¦µÜ·©H', | |
6834 | - 'ID|bvAbvx', | |
6835 | - MB_YESNO or MB_ICONQUESTION) = ID_YES) then begin | |
6836 | - limited := -1; | |
6837 | - end | |
6838 | - end; | |
6839 | - FActiveContent.IDAnchorPopup( | |
6840 | - GikoSys.CreateResAnchor(numbers, FActiveContent.Thread, limited)); | |
6841 | - finally | |
6842 | - numbers.Free; | |
6843 | - end; | |
6844 | -end; | |
6845 | 6836 | //XbhêðÅ廵ÄtH[JXðÄé |
6846 | 6837 | procedure TGikoForm.SelectTimerTimer(Sender: TObject); |
6847 | 6838 | begin |
@@ -7758,17 +7749,10 @@ begin | ||
7758 | 7749 | end; |
7759 | 7750 | |
7760 | 7751 | procedure TGikoForm.TaskTrayIconMessage(var Msg: TMsg); |
7761 | -var | |
7762 | - p: TPoint; | |
7763 | 7752 | begin |
7764 | 7753 | // ¶NbNÈç³·é |
7765 | 7754 | if (Msg.wParam = WM_LBUTTONUP) then begin |
7766 | 7755 | UnStoredTaskTray; |
7767 | - end else if (Msg.wParam=WM_RBUTTONUP) then begin | |
7768 | - // ENbNÈçI¹·é | |
7769 | - GetCursorPos ( p ); | |
7770 | - SetForegroundWindow ( Self.Handle ); | |
7771 | - TaskTrayPopupMenu.Popup ( p.X, p.Y ); | |
7772 | 7756 | end; |
7773 | 7757 | end; |
7774 | 7758 | //! ^XNgCÉACRo^tH[Bµ |
@@ -7841,6 +7825,7 @@ var | ||
7841 | 7825 | Board: TBoard; |
7842 | 7826 | LogFolder: String; |
7843 | 7827 | datList: TStringList; |
7828 | + p: TPoint; | |
7844 | 7829 | begin |
7845 | 7830 | // \¦µÄ¢éÌÂÌÆ«ÈOÍÛ |
7846 | 7831 | if GetActiveList is TBoard then begin |
@@ -7877,12 +7862,10 @@ begin | ||
7877 | 7862 | if (datList.Count > 0) then begin |
7878 | 7863 | GikoSys.AddOutofIndexDat(Board, datList, False); |
7879 | 7864 | ShowMessage(IntToStr(datList.Count) + 'ÂÌdatt@CªRs[³êܵ½B' ); |
7880 | - if GikoForm.TreeView.Visible then begin | |
7865 | + if GikoForm.TreeView.Visible then | |
7881 | 7866 | GikoForm.TreeView.Refresh; |
7882 | - end; | |
7883 | - if GikoForm.ListView.Visible then begin | |
7884 | - UpdateListView(); | |
7885 | - end; | |
7867 | + if GikoForm.ListView.Visible then | |
7868 | + GikoForm.ListView.Refresh; | |
7886 | 7869 | end else begin |
7887 | 7870 | ShowMessage('êÂàRs[³êܹñŵ½B' ); |
7888 | 7871 | end; |
@@ -7895,25 +7878,7 @@ begin | ||
7895 | 7878 | ShowMessage('Âð\¦µÄ¾³¢B'); |
7896 | 7879 | end; |
7897 | 7880 | end; |
7898 | -procedure TGikoForm.UpdateListView(); | |
7899 | -begin | |
7900 | - //ListViewűÌXªÜÜêéÂð\¦µÄ¢éÆ«ÌXV | |
7901 | - if (ActiveList <> nil) and (ActiveList is TBoard) then begin | |
7902 | - TBoard(ActiveList).LogThreadCount := TBoard(ActiveList).GetLogThreadCount; | |
7903 | - TBoard(ActiveList).NewThreadCount := TBoard(ActiveList).GetNewThreadCount; | |
7904 | - TBoard(ActiveList).UserThreadCount:= TBoard(ActiveList).GetUserThreadCount; | |
7905 | - //ListViewÌACeÌÂàXV | |
7906 | - case GikoForm.ViewType of | |
7907 | - gvtAll: ListView.Items.Count := TBoard(ActiveList).Count; | |
7908 | - gvtLog: ListView.Items.Count := TBoard(ActiveList).LogThreadCount; | |
7909 | - gvtNew: ListView.Items.Count := TBoard(ActiveList).NewThreadCount; | |
7910 | - gvtArch: ListView.Items.Count := TBoard(ActiveList).ArchiveThreadCount; | |
7911 | - gvtLive: ListView.Items.Count := TBoard(ActiveList).LiveThreadCount; | |
7912 | - gvtUser: ListView.Items.Count := TBoard(ActiveList).UserThreadCount; | |
7913 | - end; | |
7914 | - end; | |
7915 | - ListView.Refresh; | |
7916 | -end; | |
7881 | + | |
7917 | 7882 | //! t@C`FbN |
7918 | 7883 | function TGikoForm.isValidFile(FileName: String) : boolean; |
7919 | 7884 | var |
@@ -7930,7 +7895,7 @@ begin | ||
7930 | 7895 | end else begin |
7931 | 7896 | // Ot@CÌg£qð͸µ½à̪Xì¬ú |
7932 | 7897 | try |
7933 | - dt := GikoSys.GetCreateDateFromName(ExtractFileName(FileName)); | |
7898 | + dt := GikoSys.GetCreateDateFromName(FileName); | |
7934 | 7899 | if ((UnixToDateTime(ZERO_DATE) + OffsetFromUTC) = dt) then begin |
7935 | 7900 | Result := False; |
7936 | 7901 | GikoUtil.MsgBox(Handle, ExtractFileName(FileName) + 'Ìt@C¼ªs³Å·B', 'G[', MB_ICONSTOP or MB_OK); |
@@ -1,8 +1,8 @@ | ||
1 | 1 | object GikoDM: TGikoDM |
2 | 2 | OldCreateOrder = False |
3 | 3 | OnCreate = DataModuleCreate |
4 | - Left = 518 | |
5 | - Top = 174 | |
4 | + Left = 516 | |
5 | + Top = 172 | |
6 | 6 | Height = 336 |
7 | 7 | Width = 286 |
8 | 8 | object GikoFormActionList: TActionList |
@@ -315,7 +315,7 @@ object GikoDM: TGikoDM | ||
315 | 315 | ImageIndex = 9 |
316 | 316 | ShortCut = 16433 |
317 | 317 | OnExecute = AllItemActionExecute |
318 | - OnUpdate = DependActiveListTBoardWithSpeciapActionUpdate | |
318 | + OnUpdate = DependActiveListTBoardActionUpdate | |
319 | 319 | end |
320 | 320 | object LogItemAction: TAction |
321 | 321 | Category = #26495 |
@@ -326,7 +326,7 @@ object GikoDM: TGikoDM | ||
326 | 326 | ImageIndex = 10 |
327 | 327 | ShortCut = 16434 |
328 | 328 | OnExecute = LogItemActionExecute |
329 | - OnUpdate = DependActiveListTBoardWithSpeciapActionUpdate | |
329 | + OnUpdate = DependActiveListTBoardActionUpdate | |
330 | 330 | end |
331 | 331 | object NewItemAction: TAction |
332 | 332 | Category = #26495 |
@@ -337,7 +337,7 @@ object GikoDM: TGikoDM | ||
337 | 337 | ImageIndex = 11 |
338 | 338 | ShortCut = 16435 |
339 | 339 | OnExecute = NewItemActionExecute |
340 | - OnUpdate = DependActiveListTBoardWithSpeciapActionUpdate | |
340 | + OnUpdate = DependActiveListTBoardActionUpdate | |
341 | 341 | end |
342 | 342 | object ArchiveItemAction: TAction |
343 | 343 | Category = #26495 |
@@ -347,7 +347,7 @@ object GikoDM: TGikoDM | ||
347 | 347 | Hint = 'DAT'#33853#12385#12473#12524#12483#12489#12398#12415#34920#31034#12377#12427 |
348 | 348 | ImageIndex = 55 |
349 | 349 | OnExecute = ArchiveItemActionExecute |
350 | - OnUpdate = DependActiveListTBoardWithSpeciapActionUpdate | |
350 | + OnUpdate = DependActiveListTBoardActionUpdate | |
351 | 351 | end |
352 | 352 | object LiveItemAction: TAction |
353 | 353 | Category = #26495 |
@@ -357,7 +357,7 @@ object GikoDM: TGikoDM | ||
357 | 357 | Hint = #29983#23384#12375#12390#12356#12427#12473#12524#12483#12489#12398#12415#12434#34920#31034#12377#12427 |
358 | 358 | ImageIndex = 54 |
359 | 359 | OnExecute = LiveItemActionExecute |
360 | - OnUpdate = DependActiveListTBoardWithSpeciapActionUpdate | |
360 | + OnUpdate = DependActiveListTBoardActionUpdate | |
361 | 361 | end |
362 | 362 | object ThreadRangeAction: TAction |
363 | 363 | Category = #26495 |
@@ -367,7 +367,7 @@ object GikoDM: TGikoDM | ||
367 | 367 | Hint = #12473#12524#12483#12489#12398#34920#31034#31684#22258#12434#35373#23450 |
368 | 368 | ImageIndex = 10 |
369 | 369 | OnExecute = ThreadRangeActionExecute |
370 | - OnUpdate = DependActiveListTBoardWithSpeciapActionUpdate | |
370 | + OnUpdate = DependActiveCntentActionUpdate | |
371 | 371 | end |
372 | 372 | object SelectItemAction: TAction |
373 | 373 | Category = #26495 |
@@ -378,7 +378,7 @@ object GikoDM: TGikoDM | ||
378 | 378 | ImageIndex = 12 |
379 | 379 | ShortCut = 16436 |
380 | 380 | OnExecute = SelectItemActionExecute |
381 | - OnUpdate = DependActiveListTBoardWithSpeciapActionUpdate | |
381 | + OnUpdate = DependActiveListTBoardActionUpdate | |
382 | 382 | end |
383 | 383 | object StopAction: TAction |
384 | 384 | Category = #34920#31034 |
@@ -1356,27 +1356,6 @@ object GikoDM: TGikoDM | ||
1356 | 1356 | Hint = 'ID'#12434'NG'#12527#12540#12489#12501#12449#12452#12523#12395#36861#21152#12377#12427 |
1357 | 1357 | OnExecute = AddIDtoNGWord1ActionExecute |
1358 | 1358 | end |
1359 | - object ExtractSameIDAction: TAction | |
1360 | - Category = #12473#12524#12483#12489 | |
1361 | - Caption = #12463#12522#12483#12503#12508#12540#12489#12398#25991#23383#21015#12434#21547#12416'ID'#12398#12524#12473#12450#12531#12459#12540#34920#31034 | |
1362 | - Hint = #12463#12522#12483#12503#12508#12540#12489#12398#25991#23383#21015#12434#21547#12416'ID'#12398#12524#12473#12450#12531#12459#12540#34920#31034 | |
1363 | - OnExecute = ExtractSameIDActionExecute | |
1364 | - OnUpdate = DependActiveCntentLogActionUpdate | |
1365 | - end | |
1366 | - object ShowTabListAction: TAction | |
1367 | - Category = #34920#31034 | |
1368 | - Caption = #12479#12502#19968#35239#34920#31034 | |
1369 | - Hint = #12479#12502#19968#35239#34920#31034 | |
1370 | - OnExecute = ShowTabListActionExecute | |
1371 | - end | |
1372 | - object DereferenceResAction: TAction | |
1373 | - Tag = 1 | |
1374 | - Category = #12473#12524#12483#12489 | |
1375 | - Caption = #12371#12398#12524#12473#12434#21442#29031#12375#12390#12356#12427#12524#12473#12450#12531#12459#12540#34920#31034 | |
1376 | - Hint = #12371#12398#12524#12473#12434#21442#29031#12375#12390#12356#12427#12524#12473#12450#12531#12459#12540#34920#31034 | |
1377 | - OnExecute = DereferenceResActionExecute | |
1378 | - OnUpdate = DependActiveCntentLogActionUpdate | |
1379 | - end | |
1380 | 1359 | end |
1381 | 1360 | object ToobarImageList: TImageList |
1382 | 1361 | Left = 44 |
@@ -239,9 +239,6 @@ type | ||
239 | 239 | NewLinkToClipboardAction: TAction; |
240 | 240 | AddIDtoNGWord0Action: TAction; |
241 | 241 | AddIDtoNGWord1Action: TAction; |
242 | - ExtractSameIDAction: TAction; | |
243 | - ShowTabListAction: TAction; | |
244 | - DereferenceResAction: TAction; | |
245 | 242 | procedure EditNGActionExecute(Sender: TObject); |
246 | 243 | procedure ReloadActionExecute(Sender: TObject); |
247 | 244 | procedure GoFowardActionExecute(Sender: TObject); |
@@ -451,9 +448,6 @@ type | ||
451 | 448 | procedure NewLinkToClipboardActionExecute(Sender: TObject); |
452 | 449 | procedure AddIDtoNGWord0ActionExecute(Sender: TObject); |
453 | 450 | procedure AddIDtoNGWord1ActionExecute(Sender: TObject); |
454 | - procedure ExtractSameIDActionExecute(Sender: TObject); | |
455 | - procedure ShowTabListActionExecute(Sender: TObject); | |
456 | - procedure DereferenceResActionExecute(Sender: TObject); | |
457 | 451 | private |
458 | 452 | { Private é¾ } |
459 | 453 | procedure ClearResFilter; |
@@ -486,10 +480,8 @@ type | ||
486 | 480 | procedure DependActiveCntentActionUpdate(Sender: TObject); |
487 | 481 | //! TActionÅGetActiveContentªnilÈO©ÂOðÁÄ¢éÆLøÉÈé |
488 | 482 | procedure DependActiveCntentLogActionUpdate(Sender: TObject); |
489 | - //! TActionÅActiveListªTBoard(ñÁêÂ)ÅLøÉÈé | |
490 | - procedure DependActiveListTBoardActionUpdate(Sender: TObject); | |
491 | 483 | //! TActionÅActiveListªTBoardÅLøÉÈé |
492 | - procedure DependActiveListTBoardWithSpeciapActionUpdate(Sender: TObject); | |
484 | + procedure DependActiveListTBoardActionUpdate(Sender: TObject); | |
493 | 485 | end; |
494 | 486 | |
495 | 487 | var |
@@ -530,17 +522,9 @@ begin | ||
530 | 522 | and (GikoForm.GetActiveContent.IsLogFile); |
531 | 523 | end; |
532 | 524 | // ************************************************************************* |
533 | -//! TActionÅActiveListªTBoard(ñÁêÂ)ÅLøÉÈé | |
534 | -// ************************************************************************* | |
535 | -procedure TGikoDM.DependActiveListTBoardActionUpdate(Sender: TObject); | |
536 | -begin | |
537 | - TAction(Sender).Enabled := (GikoForm.GetActiveList is TBoard) and | |
538 | - (GikoForm.GetActiveList <> BoardGroup.SpecialBoard); | |
539 | -end; | |
540 | -// ************************************************************************* | |
541 | 525 | //! TActionÅActiveListªTBoardÅLøÉÈé |
542 | 526 | // ************************************************************************* |
543 | -procedure TGikoDM.DependActiveListTBoardWithSpeciapActionUpdate(Sender: TObject); | |
527 | +procedure TGikoDM.DependActiveListTBoardActionUpdate(Sender: TObject); | |
544 | 528 | begin |
545 | 529 | TAction(Sender).Enabled := (GikoForm.GetActiveList is TBoard); |
546 | 530 | end; |
@@ -2354,6 +2338,7 @@ procedure TGikoDM.KokomadeActionExecute(Sender: TObject); | ||
2354 | 2338 | var |
2355 | 2339 | No: Integer; |
2356 | 2340 | ThreadItem: TThreadItem; |
2341 | + doc : IHTMLDocument2; | |
2357 | 2342 | begin |
2358 | 2343 | No := GikoForm.KokoPopupMenu.Tag; |
2359 | 2344 | if No = 0 |
@@ -2419,18 +2404,28 @@ const | ||
2419 | 2404 | LIMIT = 20; |
2420 | 2405 | var |
2421 | 2406 | ThreadItem : TThreadItem; |
2422 | - No : Integer; | |
2423 | - AID: string; | |
2407 | + No, count: Integer; | |
2408 | + body : string; | |
2409 | + limited: Integer; | |
2424 | 2410 | begin |
2425 | 2411 | No := GikoForm.KokoPopupMenu.Tag; |
2426 | 2412 | if No = 0 then Exit; |
2427 | 2413 | ThreadItem := GikoForm.GetActiveContent(True); |
2428 | 2414 | if ThreadItem = nil then Exit; |
2429 | - | |
2430 | - AID := GikoSys.GetResID(No, ThreadItem); | |
2431 | - if not IsNoValidID(AID) then begin | |
2432 | - GikoForm.ShowSameIDAncher(AID); | |
2433 | - end; | |
2415 | + count := GikoSys.GetSameIDResCount(No, GikoForm.ActiveContent.Thread); | |
2416 | + limited := LIMIT; | |
2417 | + if not (GikoSys.Setting.LimitResCountMessage) then begin | |
2418 | + limited := -1; | |
2419 | + end else if count > LIMIT then begin | |
2420 | + if ( GikoUtil.MsgBox(GikoForm.Handle, | |
2421 | + IntToStr(LIMIT) + 'ÂÈã èÜ·ªA·×Ä\¦µÜ·©H', | |
2422 | + 'ID|bvAbvx', | |
2423 | + MB_YESNO or MB_ICONQUESTION) = ID_YES ) then begin | |
2424 | + limited := -1; | |
2425 | + end; | |
2426 | + end; | |
2427 | + body := GikoSys.GetSameIDResAnchor(No, ThreadItem, limited); | |
2428 | + GikoForm.ActiveContent.IDAnchorPopup(body); | |
2434 | 2429 | end; |
2435 | 2430 | // ************************************************************************* |
2436 | 2431 | //! ±ÌX Ú`ñ@iÊíj |
@@ -2651,8 +2646,7 @@ end; | ||
2651 | 2646 | // ************************************************************************* |
2652 | 2647 | procedure TGikoDM.UpFolderActionUpdate(Sender: TObject); |
2653 | 2648 | begin |
2654 | - UpFolderAction.Enabled := not (GikoForm.GetActiveList is TBBS) and | |
2655 | - (GikoForm.GetActiveList <> BoardGroup.SpecialBoard); | |
2649 | + UpFolderAction.Enabled := not (GikoForm.GetActiveList is TBBS); | |
2656 | 2650 | end; |
2657 | 2651 | // ************************************************************************* |
2658 | 2652 | //! \¦@\¦XgÌ[hÏX |
@@ -3015,10 +3009,9 @@ procedure TGikoDM.SelectListReloadActionUpdate(Sender: TObject); | ||
3015 | 3009 | begin |
3016 | 3010 | if (GikoForm.GetActiveList is TCategory) and (GikoForm.ListView.SelCount > 0) then |
3017 | 3011 | TAction(Sender).Enabled := True |
3018 | - else if GikoForm.GetActiveList is TBoard then begin | |
3019 | - TAction(Sender).Enabled := | |
3020 | - (GikoForm.GetActiveList <> BoardGroup.SpecialBoard); | |
3021 | - end else | |
3012 | + else if GikoForm.GetActiveList is TBoard then | |
3013 | + TAction(Sender).Enabled := True | |
3014 | + else | |
3022 | 3015 | TAction(Sender).Enabled := False; |
3023 | 3016 | end; |
3024 | 3017 | // ************************************************************************* |
@@ -3216,10 +3209,8 @@ end; | ||
3216 | 3209 | // ************************************************************************* |
3217 | 3210 | procedure TGikoDM.LogFolderOpenActionUpdate(Sender: TObject); |
3218 | 3211 | begin |
3219 | - if (((GikoForm.GetActiveList is TBoard) and | |
3220 | - (GikoForm.GetActiveList <> BoardGroup.SpecialBoard)) | |
3221 | - or (GikoForm.GetActiveList is TCategory)) | |
3222 | - and (GikoForm.ListView.SelCount > 0) then | |
3212 | + if ((GikoForm.GetActiveList is TBoard) or (GikoForm.GetActiveList is TCategory)) | |
3213 | + and (GikoForm.ListView.SelCount > 0) then | |
3223 | 3214 | TAction(Sender).Enabled := True |
3224 | 3215 | else |
3225 | 3216 | TAction(Sender).Enabled := False; |
@@ -4401,7 +4392,7 @@ begin | ||
4401 | 4392 | // XÌÔðXV |
4402 | 4393 | if (Pos('menu:', url) > 0) then begin |
4403 | 4394 | index := StrToInt64Def( |
4404 | - Copy(url, 6, Length(url)), index + 1 | |
4395 | + Copy(url, 5, Length(url)), index + 1 | |
4405 | 4396 | ); |
4406 | 4397 | end else begin |
4407 | 4398 | // JnXÔÈ~©`FbN |
@@ -4469,99 +4460,6 @@ procedure TGikoDM.AddIDtoNGWord1ActionExecute(Sender: TObject); | ||
4469 | 4460 | begin |
4470 | 4461 | GikoForm.AddIDtoNGWord(false); |
4471 | 4462 | end; |
4472 | -//! Nbv{[h̶ñðIDƵįêIDXAJ[\¦ | |
4473 | -procedure TGikoDM.ExtractSameIDActionExecute(Sender: TObject); | |
4474 | -var | |
4475 | - ID: String; | |
4476 | -begin | |
4477 | - ID := Trim(Clipboard.AsText); | |
4478 | - if (Length(ID) > 0) then begin | |
4479 | - if not IsNoValidID(ID) then begin | |
4480 | - GikoForm.ShowSameIDAncher(ID); | |
4481 | - end; | |
4482 | - end; | |
4483 | -end; | |
4484 | -//! ^uÌXbhêð\¦·é | |
4485 | -procedure TGikoDM.ShowTabListActionExecute(Sender: TObject); | |
4486 | -var | |
4487 | - i : Integer; | |
4488 | -begin | |
4489 | - GikoForm.ListView.Items.BeginUpdate; | |
4490 | - GikoForm.ListView.Items.Clear; | |
4491 | - BoardGroup.SpecialBoard.Clear; | |
4492 | - for i := GikoForm.BrowserTab.Tabs.Count - 1 downto 0 do begin | |
4493 | - BoardGroup.SpecialBoard.Add( | |
4494 | - TBrowserRecord(GikoForm.BrowserTab.Tabs.Objects[i]).Thread); | |
4495 | - end; | |
4496 | - GikoForm.ListView.Items.EndUpdate; | |
4497 | - GikoForm.SetActiveList(BoardGroup.SpecialBoard); | |
4498 | -end; | |
4499 | -//! tQƵĢéXðÇÁ·é | |
4500 | -procedure TGikoDM.DereferenceResActionExecute(Sender: TObject); | |
4501 | -var | |
4502 | - i, currentNo, No : Integer; | |
4503 | - links : IHTMLElementCollection; | |
4504 | - threadItem : TThreadItem; | |
4505 | - item : IHTMLElement; | |
4506 | - url, url2 : string; | |
4507 | - resNo : TStringList; | |
4508 | - alreadyExist : Boolean; | |
4509 | - PathRec: TPathRec; | |
4510 | -begin | |
4511 | - No := GikoForm.KokoPopupMenu.Tag; | |
4512 | - if No = 0 then Exit; | |
4513 | - | |
4514 | - ThreadItem := GikoForm.GetActiveContent; | |
4515 | - // ANeBu^u©çSÄÌNðæ¾·é | |
4516 | - links := GetActiveThreadLinks; | |
4517 | - if (ThreadItem <> nil) and (links <> nil) then begin | |
4518 | - resNo := TStringList.Create; | |
4519 | - try | |
4520 | - currentNo := 0; | |
4521 | - alreadyExist := False; | |
4522 | - // NðSĸ·é | |
4523 | - for i := 0 to links.length - 1 do begin | |
4524 | - item := links.item(i, 0) as IHTMLElement; | |
4525 | - if (item <> nil) then begin | |
4526 | - url := item.getAttribute('href', 0); | |
4527 | - // XÌÔðXV | |
4528 | - if (Pos('menu:', url) > 0) then begin | |
4529 | - currentNo := StrToInt64Def( | |
4530 | - Copy(url, 6, Length(url)), currentNo + 1 | |
4531 | - ); | |
4532 | - alreadyExist := False; | |
4533 | - end else if (currentNo <> -1) and (not alreadyExist) then begin | |
4534 | - // IE7Î | |
4535 | - if Pos('about:..', url) = 1 then begin | |
4536 | - url := 'about:blank..' + Copy( url, Length('about:..')+1, Length(url) ) | |
4537 | - end; | |
4538 | - // ©ªÖÌN©çX|bvpÌÔæ¾ | |
4539 | - if Pos('about:blank..', url) = 1 then begin | |
4540 | - // No ÔÖÌNª êÎQÆ è | |
4541 | - url2 := THTMLCreate.GetRespopupURL(url, ThreadItem.URL); | |
4542 | - PathRec := Gikosys.Parse2chURL2(url2); | |
4543 | - if (not PathRec.FNoParam) then begin | |
4544 | - Gikosys.GetPopupResNumber(url2,PathRec.FSt,PathRec.FTo); | |
4545 | - end; | |
4546 | - // ÎÛXàµÍ»êðÜÞÈçQÆ èÆ·é | |
4547 | - if (PathRec.FSt = No) or | |
4548 | - ((PathRec.FSt <= No) and (PathRec.FTo >= No)) then begin | |
4549 | - alreadyExist := True; | |
4550 | - resNo.Add(IntToStr(currentNo)); | |
4551 | - end; | |
4552 | - end; | |
4553 | - end; | |
4554 | - end; | |
4555 | - end; | |
4556 | - // ³§ÀÈÌÅ-1Åè | |
4557 | - GikoForm.ActiveContent.IDAnchorPopup( | |
4558 | - GikoSys.CreateResAnchor(resNo, ThreadItem, -1)); | |
4559 | - finally | |
4560 | - resNo.Clear; | |
4561 | - resNo.Free; | |
4562 | - end; | |
4563 | - end; | |
4564 | -end; | |
4565 | 4463 | |
4566 | 4464 | end. |
4567 | 4465 |
@@ -213,11 +213,13 @@ type | ||
213 | 213 | procedure GetPopupResNumber(URL : string; var stRes, endRes : Int64); |
214 | 214 | |
215 | 215 | property Bayesian : TGikoBayesian read FBayesian write FBayesian; |
216 | - function CreateResAnchor(var Numbers: TStringList; ThreadItem: TThreadItem; limited: Integer):string; | |
216 | + function GetSameIDResAnchor(const AID : string; ThreadItem: TThreadItem; limited: Integer):string; overload; | |
217 | + function GetSameIDResAnchor(AIDNum : Integer; ThreadItem: TThreadItem; limited: Integer):string; overload; | |
217 | 218 | procedure GetSameIDRes(const AID : string; ThreadItem: TThreadItem;var body: TStringList); overload; |
218 | 219 | procedure GetSameIDRes(AIDNum : Integer; ThreadItem: TThreadItem;var body: TStringList); overload; |
220 | + function GetSameIDResCount(const AID : string; ThreadItem: TThreadItem):Integer; overload; | |
221 | + function GetSameIDResCount(AIDNum : Integer; ThreadItem: TThreadItem):Integer; overload; | |
219 | 222 | function GetResID(AIDNum: Integer; ThreadItem: TThreadItem): String; |
220 | - function ExtructResID(ADateStr: String): String; | |
221 | 223 | //! PêðÍ |
222 | 224 | procedure SpamCountWord( const text : string; wordCount : TWordCount ); |
223 | 225 | //! wKNA |
@@ -226,6 +228,8 @@ type | ||
226 | 228 | procedure SpamLearn( wordCount : TWordCount; isSpam : Boolean ); |
227 | 229 | //! Xpx |
228 | 230 | function SpamParse( const text : string; wordCount : TWordCount ) : Extended; |
231 | + //øªAútÅàÅàÈ¢±Æð²×é | |
232 | + function NotDateorTimeString(const AStr : string): boolean; | |
229 | 233 | |
230 | 234 | //! øÉçêÄ«½út/IDÉBE̶ñª Á½çAvt@CÖÌNðÇÁ |
231 | 235 | function AddBeProfileLink(AID : string; ANum: Integer): string; |
@@ -2508,7 +2512,6 @@ procedure TGikoSys.ListBoardFile; | ||
2508 | 2512 | var |
2509 | 2513 | boardFileList : TStringList; |
2510 | 2514 | i, l : Integer; |
2511 | - sCategory : TCategory; | |
2512 | 2515 | begin |
2513 | 2516 | // BBS ÌJú |
2514 | 2517 | try |
@@ -2551,20 +2554,6 @@ begin | ||
2551 | 2554 | BoardFileList.Free; |
2552 | 2555 | end; |
2553 | 2556 | end; |
2554 | - | |
2555 | - // ÁêprBBS¶¬ | |
2556 | - // ùɶݷéêÍí·é | |
2557 | - DestorySpecialBBS(BoardGroup.SpecialBBS); | |
2558 | - SpecialBBS := TBBS.Create(''); | |
2559 | - SpecialBBS.Title := 'Áêpr(ñ\¦)'; | |
2560 | - sCategory := TCategory.Create; | |
2561 | - sCategory.No := 1; | |
2562 | - sCategory.Title := 'Áêpr(ñ\¦)'; | |
2563 | - SpecialBBS.Add(sCategory); | |
2564 | - BoardGroup.SpecialBoard := TSpecialBoard.Create(nil, 'http://localhost/gikonavi/special/index.html'); | |
2565 | - BoardGroup.SpecialBoard.Title := '^uê'; | |
2566 | - BoardGroup.SpecialBoard.IsThreadDatRead := True; | |
2567 | - sCategory.Add(BoardGroup.SpecialBoard); | |
2568 | 2557 | end; |
2569 | 2558 | |
2570 | 2559 | {! |
@@ -2762,18 +2751,20 @@ function TGikoSys.GetSambaFileName : string; | ||
2762 | 2751 | begin |
2763 | 2752 | Result := Setting.GetSambaFileName; |
2764 | 2753 | end; |
2754 | + | |
2765 | 2755 | {! |
2766 | -\brief ñ³ê½XÔÖÌAJ[pHTMLì¬ | |
2767 | -\param Numbers ñ³ê½XÔ | |
2756 | +\brief ¯¶e ID ðÂXðAJ[ɵÄñ | |
2757 | +\param AID ÂlðÁè·ée ID | |
2768 | 2758 | \param ThreadItem ñ·éXbh |
2769 | 2759 | \param limited ñ·éð§À·éÈç1Èã |
2770 | 2760 | \return ñ³ê½XAJ[ |
2771 | 2761 | } |
2772 | -function TGikoSys.CreateResAnchor( | |
2773 | - var Numbers: TStringList; ThreadItem: TThreadItem; | |
2762 | +function TGikoSys.GetSameIDResAnchor( | |
2763 | + const AID : string; ThreadItem: TThreadItem; | |
2774 | 2764 | limited: Integer):string; |
2775 | 2765 | var |
2776 | 2766 | i: integer; |
2767 | + body: TStringList; | |
2777 | 2768 | Res: TResRec; |
2778 | 2769 | ResLink : TResLinkRec; |
2779 | 2770 | begin |
@@ -2781,22 +2772,29 @@ begin | ||
2781 | 2772 | Res.FBody := ''; |
2782 | 2773 | Res.FType := glt2chNew; |
2783 | 2774 | |
2784 | - Result := ''; | |
2785 | - if (Numbers <> nil) and (Numbers.Count > 0) then begin | |
2786 | - if (limited > 0) and (Numbers.Count > limited) then begin | |
2787 | - for i := Numbers.Count - limited to Numbers.Count - 1 do begin | |
2788 | - Res.FBody := Res.FBody + '>' + Numbers[i] + ' '; | |
2789 | - end; | |
2790 | - end else begin | |
2791 | - for i := 0 to Numbers.Count - 1 do begin | |
2792 | - Res.FBody := Res.FBody + '>' + Numbers[i] + ' '; | |
2793 | - end; | |
2794 | - end; | |
2775 | + Result := ''; | |
2776 | + if (not IsNoValidID(AID)) and | |
2777 | + (ThreadItem <> nil) and (ThreadItem.IsLogFile) then begin | |
2778 | + body := TStringList.Create; | |
2779 | + try | |
2780 | + GetSameIDRes(AID, ThreadItem, body); | |
2781 | + if (limited > 0) and (body.Count > limited) then begin | |
2782 | + for i := body.Count - limited to body.Count - 1 do begin | |
2783 | + Res.FBody := Res.FBody + '>' + body[i] + ' '; | |
2784 | + end; | |
2785 | + end else begin | |
2786 | + for i := 0 to body.Count - 1 do begin | |
2787 | + Res.FBody := Res.FBody + '>' + body[i] + ' '; | |
2788 | + end; | |
2789 | + end; | |
2790 | + finally | |
2791 | + body.Free; | |
2792 | + end; | |
2795 | 2793 | ResLink.FBbs := ThreadItem.ParentBoard.BBSID; |
2796 | 2794 | ResLink.FKey := ChangeFileExt(ThreadItem.FileName, ''); |
2797 | 2795 | HTMLCreater.ConvRes(@Res, @ResLink, false); |
2798 | 2796 | Result := Res.FBody; |
2799 | - end; | |
2797 | + end; | |
2800 | 2798 | end; |
2801 | 2799 | |
2802 | 2800 | {! |
@@ -2811,22 +2809,6 @@ var | ||
2811 | 2809 | ReadList: TStringList; |
2812 | 2810 | Res: TResRec; |
2813 | 2811 | boardPlugIn : TBoardPlugIn; |
2814 | - | |
2815 | - procedure CheckSameID(const AID:String; const Target: String; no: Integer); | |
2816 | - var | |
2817 | - pos: Integer; | |
2818 | - begin | |
2819 | - pos := AnsiPos('id:', LowerCase(Target)); | |
2820 | - if (pos > 0) then begin | |
2821 | - if(AnsiPos(AID, Copy(Target, pos-1, Length(Target))) > 0) then begin | |
2822 | - body.Add(IntToStr(no)); | |
2823 | - end; | |
2824 | - end else begin | |
2825 | - if(AnsiPos(AID, Target) > 0) then begin | |
2826 | - body.Add(IntToStr(no)); | |
2827 | - end; | |
2828 | - end; | |
2829 | - end; | |
2830 | 2812 | begin |
2831 | 2813 | if (not IsNoValidID(AID)) and |
2832 | 2814 | (ThreadItem <> nil) and (ThreadItem.IsLogFile) then begin |
@@ -2839,7 +2821,9 @@ begin | ||
2839 | 2821 | for i := 0 to threadItem.Count - 1 do begin |
2840 | 2822 | // X |
2841 | 2823 | THTMLCreate.DivideStrLine(boardPlugIn.GetDat(DWORD( threadItem ), i + 1), @Res); |
2842 | - CheckSameID(AID, Res.FDateTime, i+1); | |
2824 | + if(AnsiPos(AID, Res.FDateTime) > 0) then begin | |
2825 | + body.Add(IntToStr(i+1)); | |
2826 | + end; | |
2843 | 2827 | end; |
2844 | 2828 | end else begin |
2845 | 2829 | ReadList := TStringList.Create; |
@@ -2847,7 +2831,9 @@ begin | ||
2847 | 2831 | ReadList.LoadFromFile(ThreadItem.GetThreadFileName); |
2848 | 2832 | for i := 0 to ReadList.Count - 1 do begin |
2849 | 2833 | THTMLCreate.DivideStrLine(ReadList[i], @Res); |
2850 | - CheckSameID(AID, Res.FDateTime, i+1); | |
2834 | + if AnsiPos(AID, Res.FDateTime) > 0 then begin | |
2835 | + body.Add(IntToStr(i+1)); | |
2836 | + end; | |
2851 | 2837 | end; |
2852 | 2838 | finally |
2853 | 2839 | ReadList.Free; |
@@ -2860,6 +2846,50 @@ end; | ||
2860 | 2846 | \brief ¯¶e ID ðÂXðñ |
2861 | 2847 | \param AIDNum ÂlðÁè·ée ID |
2862 | 2848 | \param ThreadItem ñ·éXbh |
2849 | +\param limited ñ·éð§À·éÈç1Èã | |
2850 | +\return | |
2851 | +} | |
2852 | +function TGikoSys.GetSameIDResAnchor(AIDNum : Integer; | |
2853 | + ThreadItem: TThreadItem; | |
2854 | + limited: Integer):string; | |
2855 | +var | |
2856 | + i: integer; | |
2857 | + body: TStringList; | |
2858 | + Res: TResRec; | |
2859 | + ResLink : TResLinkRec; | |
2860 | +begin | |
2861 | + // bodyÈOÍgpµÈ¢ÌÅú»µÈ¢ | |
2862 | + Res.FBody := ''; | |
2863 | + Res.FType := glt2chNew; | |
2864 | + | |
2865 | + Result := ''; | |
2866 | + if (ThreadItem <> nil) and (ThreadItem.IsLogFile) then begin | |
2867 | + body := TStringList.Create; | |
2868 | + try | |
2869 | + GetSameIDRes(AIDNum, ThreadItem, body); | |
2870 | + if (limited > 0) and ( body.Count > limited) then begin | |
2871 | + for i := body.Count - 20 to body.Count - 1 do begin | |
2872 | + Res.FBody := Res.FBody + '>' + body[i] + ' '; | |
2873 | + end; | |
2874 | + end else begin | |
2875 | + for i := 0 to body.Count - 1 do begin | |
2876 | + Res.FBody := Res.FBody + '>' + body[i] + ' '; | |
2877 | + end; | |
2878 | + end; | |
2879 | + finally | |
2880 | + body.Free; | |
2881 | + end; | |
2882 | + ResLink.FBbs := ThreadItem.ParentBoard.BBSID; | |
2883 | + ResLink.FKey := ChangeFileExt(ThreadItem.FileName, ''); | |
2884 | + HTMLCreater.ConvRes(@Res, @ResLink, false); | |
2885 | + Result := Res.FBody; | |
2886 | + end; | |
2887 | +end; | |
2888 | + | |
2889 | +{! | |
2890 | +\brief ¯¶e ID ðÂXðñ | |
2891 | +\param AIDNum ÂlðÁè·ée ID | |
2892 | +\param ThreadItem ñ·éXbh | |
2863 | 2893 | \param body OUT:ñ³ê½XÔªÔé |
2864 | 2894 | } |
2865 | 2895 | procedure TGikoSys.GetSameIDRes(AIDNum : Integer; ThreadItem: TThreadItem;var body: TStringList); |
@@ -2881,6 +2911,8 @@ function TGikoSys.GetResID(AIDNum: Integer; ThreadItem: TThreadItem): String; | ||
2881 | 2911 | var |
2882 | 2912 | Res: TResRec; |
2883 | 2913 | boardPlugIn : TBoardPlugIn; |
2914 | + stList: TStringList; | |
2915 | + i : Integer; | |
2884 | 2916 | begin |
2885 | 2917 | Result := ''; |
2886 | 2918 | if (ThreadItem <> nil) and (ThreadItem.IsLogFile) |
@@ -2894,40 +2926,96 @@ begin | ||
2894 | 2926 | end else begin |
2895 | 2927 | THTMLCreate.DivideStrLine( ReadThreadFile(ThreadItem.GetThreadFileName, AIDNum), @Res); |
2896 | 2928 | end; |
2897 | - Result := ExtructResID(Res.FDateTime); | |
2929 | + Result := Res.FDateTime; | |
2930 | + if AnsiPos('id', AnsiLowerCase(Result)) > 0 then begin | |
2931 | + Result := Copy(Result, AnsiPos('id', AnsiLowerCase(Result)) - 1, 11); | |
2932 | + if AnsiPos(' be:', AnsiLowerCase(Result)) > 0 then begin | |
2933 | + Result := Copy(Result, 1, AnsiPos(' BE:', AnsiLowerCase(Result)) - 1) | |
2934 | + end; | |
2935 | + end else begin | |
2936 | + stlist := TStringList.Create; | |
2937 | + try | |
2938 | + stList.DelimitedText := Result; | |
2939 | + Result := ''; | |
2940 | + for i := 0 to stList.Count - 1 do | |
2941 | + if Length(WideString(stList[i])) = 8 then begin | |
2942 | + if NotDateorTimeString(stList[i]) then begin | |
2943 | + Result := stList[i]; | |
2944 | + break; | |
2945 | + end; | |
2946 | + end; | |
2947 | + finally | |
2948 | + stList.Free; | |
2949 | + end; | |
2950 | + end; | |
2898 | 2951 | end; |
2899 | 2952 | end; |
2900 | 2953 | {! |
2901 | -\brief XÌ©çIDðo·é | |
2902 | -\param ADateStr ̶ñ | |
2903 | -\return ID(IDÆÝȹ骪ȢƫÍó¶ñ) | |
2954 | +\brief ¯¶e ID ðÂXðJEg | |
2955 | +\param AID ÂlðÁè·ée ID | |
2956 | +\param ThreadItem ñ·éXbh | |
2957 | +\return ¯¶ ID ðÂXÌ | |
2904 | 2958 | } |
2905 | -function TGikoSys.ExtructResID(ADateStr: String): String; | |
2959 | +function TGikoSys.GetSameIDResCount(const AID : string; ThreadItem: TThreadItem):Integer; | |
2906 | 2960 | var |
2907 | - stlist : TStringList; | |
2961 | + body: TStringList; | |
2908 | 2962 | begin |
2909 | - Result := ''; | |
2910 | - if AnsiPos('id', AnsiLowerCase(ADateStr)) > 0 then begin | |
2911 | - Result := Copy(ADateStr, AnsiPos('id', AnsiLowerCase(ADateStr)), Length(ADateStr)); | |
2912 | - if AnsiPos(' ', Result) > 0 then begin | |
2913 | - Result := Copy(Result, 1, AnsiPos(' ', Result) - 1); | |
2914 | - end; | |
2915 | - Result := ' ' + Result; | |
2916 | - end else begin | |
2917 | - stlist := TStringList.Create; | |
2918 | - try | |
2919 | - stList.Delimiter := ' '; | |
2920 | - stList.DelimitedText := ADateStr; | |
2921 | - // út ID ¼@ÆÅèÅl¦é | |
2922 | - if (stList.Count >= 3) then begin | |
2923 | - if Length(stList[3 - 1]) >= 7 then begin | |
2924 | - Result := stList[3 - 1]; | |
2925 | - end; | |
2926 | - end; | |
2927 | - finally | |
2928 | - stList.Free; | |
2929 | - end; | |
2930 | - end; | |
2963 | + Result := 0; | |
2964 | + if (not IsNoValidID(AID)) | |
2965 | + and (ThreadItem <> nil) and (ThreadItem.IsLogFile) then begin | |
2966 | + body := TStringList.Create; | |
2967 | + try | |
2968 | + GetSameIDRes(AID, ThreadItem, body); | |
2969 | + Result := body.Count; | |
2970 | + finally | |
2971 | + body.Free; | |
2972 | + end; | |
2973 | + end; | |
2974 | + | |
2975 | +end; | |
2976 | + | |
2977 | +{! | |
2978 | +\brief ¯¶e ID ðÂXðJEg | |
2979 | +\param AIDNum ÂlðÁè·ée ID | |
2980 | +\param ThreadItem ñ·éXbh | |
2981 | +\return ¯¶ ID ðÂXÌ | |
2982 | +} | |
2983 | +function TGikoSys.GetSameIDResCount(AIDNum : Integer; ThreadItem: TThreadItem):Integer; | |
2984 | +var | |
2985 | + body: TStringList; | |
2986 | +begin | |
2987 | + Result := 0; | |
2988 | + if (ThreadItem <> nil) and (ThreadItem.IsLogFile) then begin | |
2989 | + body := TStringList.Create; | |
2990 | + try | |
2991 | + GetSameIDRes(AIDNum, ThreadItem, body); | |
2992 | + Result := body.Count; | |
2993 | + finally | |
2994 | + body.Free; | |
2995 | + end; | |
2996 | + end; | |
2997 | +end; | |
2998 | + | |
2999 | +{! | |
3000 | +\brief 𦷶ñÅͳ¢©Ç¤© | |
3001 | +\param AStr ²×é¶ñ | |
3002 | +\return Åͳ¢Èç True | |
3003 | +\todo Ûè`(Not)æèmèn(Is) | |
3004 | +} | |
3005 | +function TGikoSys.NotDateorTimeString(const AStr : string): boolean; | |
3006 | +begin | |
3007 | + Result := false; | |
3008 | + try | |
3009 | + StrToDate(AStr); | |
3010 | + except | |
3011 | + try | |
3012 | + StrToTime(AStr); | |
3013 | + Result := false; | |
3014 | + except | |
3015 | + Result := true; | |
3016 | + end; | |
3017 | + end; | |
3018 | + | |
2931 | 3019 | end; |
2932 | 3020 | |
2933 | 3021 | {! |
@@ -3397,10 +3485,8 @@ begin | ||
3397 | 3485 | end; |
3398 | 3486 | |
3399 | 3487 | procedure TGikoSys.ShowRefCount(msg: String; unk: IUnknown); |
3400 | -{$IFDEF DEBUG} | |
3401 | 3488 | var |
3402 | 3489 | count : integer; |
3403 | -{$ENDIF} | |
3404 | 3490 | begin |
3405 | 3491 | if not Assigned(unk) then |
3406 | 3492 | Exit; |
@@ -1325,19 +1325,13 @@ begin | ||
1325 | 1325 | end; |
1326 | 1326 | |
1327 | 1327 | procedure TOptionDialog.SoundPlayButtonClick(Sender: TObject); |
1328 | -var | |
1329 | - s : String; | |
1330 | 1328 | begin |
1331 | - s := SoundFileEdit.Text; | |
1332 | - if (AnsiPos('.\', s) = 1) then begin | |
1333 | - s := GikoSys.Setting.GetAppDir + Copy(s, 2, Length(s)); | |
1334 | - end; | |
1335 | - if not FileExists(s) then begin | |
1329 | + if not FileExists(SoundFileEdit.Text) then begin | |
1336 | 1330 | MsgBox(Handle, '¶ÝµÈ¢t@CÅ·', 'G[', MB_ICONSTOP or MB_OK); |
1337 | 1331 | SoundFileEdit.Text := ''; |
1338 | 1332 | Exit; |
1339 | 1333 | end; |
1340 | - if not sndPlaySound(PChar(s), SND_ASYNC or SND_NOSTOP) then begin | |
1334 | + if not sndPlaySound(PChar(SoundFileEdit.Text), SND_ASYNC or SND_NOSTOP) then begin | |
1341 | 1335 | sndPlaySound(nil, SND_ASYNC); |
1342 | 1336 | end; |
1343 | 1337 | end; |
@@ -66,8 +66,6 @@ begin | ||
66 | 66 | RawDocument := ''; |
67 | 67 | FEvent := nil; |
68 | 68 | ShowWindow(Self.Handle, SW_HIDE); |
69 | - GikoSys.ShowRefCount('ResPop Create', Self.ControlInterface); | |
70 | - GikoSys.ShowRefCount('ResPop.Document Create', Self.ControlInterface.Document); | |
71 | 69 | end; |
72 | 70 | |
73 | 71 | destructor TResPopupBrowser.Destroy; |
@@ -86,10 +84,6 @@ begin | ||
86 | 84 | FEvent := nil; |
87 | 85 | end; |
88 | 86 | FThread := nil; |
89 | - | |
90 | - GikoSys.ShowRefCount('ResPop Desctroy', Self.ControlInterface); | |
91 | - GikoSys.ShowRefCount('ResPop.Document Create', Self.ControlInterface.Document); | |
92 | - | |
93 | 87 | inherited Destroy; |
94 | 88 | end; |
95 | 89 |
@@ -142,7 +136,7 @@ begin | ||
142 | 136 | end; |
143 | 137 | procedure TResPopupBrowser.NavigateBlank(Forced: Boolean); |
144 | 138 | begin |
145 | - if (not Assigned(Self.ControlInterface.Document)) or (Forced) then begin | |
139 | + if (not Assigned(Self.Document)) or (Forced) then begin | |
146 | 140 | Self.Navigate('about:blank'); |
147 | 141 | end; |
148 | 142 | while (Self.ReadyState <> READYSTATE_COMPLETE) and |
@@ -198,7 +192,7 @@ begin | ||
198 | 192 | ARect := CalcRect(Screen.MonitorFromPoint(p).WorkareaRect, |
199 | 193 | not OnlyTitle); |
200 | 194 | |
201 | - FEvent := THTMLDocumentEventSink.Create(Self, Self.OleObject.Document, HTMLDocumentEvents2); | |
195 | + FEvent := THTMLDocumentEventSink.Create(Self, Self.Document, HTMLDocumentEvents2); | |
202 | 196 | FEvent.OnClick := ResPopupBrowserClick; |
203 | 197 | FEvent.OnDoubleClick := ResPopupBrowserDbClick; |
204 | 198 | Self.Visible := True; |
@@ -278,7 +272,7 @@ var | ||
278 | 272 | DIV_X, DIV_Y: Integer; |
279 | 273 | begin |
280 | 274 | GetCursorpos(p); |
281 | - ele := ((Self.ControlInterface.Document as IHTMLDocument2).body as IHTMLElement2); | |
275 | + ele := ((Self.Document as IHTMLDocument2).body as IHTMLElement2); | |
282 | 276 | if Scroll then begin |
283 | 277 | h := GetWindowHeight + 10; |
284 | 278 | w := ele.scrollWidth + 25 |
@@ -1218,16 +1218,8 @@ begin | ||
1218 | 1218 | if Exists then begin |
1219 | 1219 | for i := 0 to GetSoundCount - 1 do begin |
1220 | 1220 | SoundFileName[i] := ini.ReadString('Sound', SoundName[i], ''); |
1221 | - // ÎQÆÎô | |
1222 | - s := SoundFileName[i]; | |
1223 | - if (AnsiPos('.\', SoundFileName[i]) = 1) then begin | |
1224 | - s := GetAppDir | |
1225 | - + Copy(SoundFileName[i], 2, Length(SoundFileName[i])); | |
1226 | - end; | |
1227 | - // t@C̶Ý`FbN | |
1228 | - if not FileExists(SoundFileName[i]) then begin | |
1229 | - SoundFileName[i] := ''; | |
1230 | - end; | |
1221 | + if not FileExists(SoundFileName[i]) then | |
1222 | + SoundFileName[i] := ''; | |
1231 | 1223 | end; |
1232 | 1224 | end else begin |
1233 | 1225 | s := GetAppDir + '\sound\'; |
@@ -1880,11 +1872,6 @@ begin | ||
1880 | 1872 | for i := 0 to GetSoundCount - 1 do begin |
1881 | 1873 | if SoundName[i] = Name then begin |
1882 | 1874 | Result := SoundFileName[i]; |
1883 | - // ÎpXÎô | |
1884 | - if (AnsiPos('.\', Result) = 1) then begin | |
1885 | - Result := GetAppDir | |
1886 | - + Copy(Result, 2, Length(Result)); | |
1887 | - end; | |
1888 | 1875 | Exit; |
1889 | 1876 | end; |
1890 | 1877 | end; |
@@ -79,7 +79,7 @@ http://www.microsoft.com/windows95/downloads/contents/WUAdminTools/S_WUNetworkin | ||
79 | 79 | ------------------------------ |
80 | 80 | J°ÙFDelphi6 Professional (UP2 + RTL UP2 + RTL UP3) |
81 | 81 | Delphi6 Personal(UP2 + RTL UP2 + RTL UP3) |
82 | -OS FWindowsXP Professional Edition(SP3) + IE7 | |
82 | +OS FWindowsXP Professional Edition(SP2) + IE7 | |
83 | 83 | WindowsXP Professional Edition(SP1) + IE6(SP1) |
84 | 84 | Windows2000 Professional (SP4) + IE6(SP1) |
85 | 85 |
@@ -108,16 +108,10 @@ LICENSE | ||
108 | 108 | ------------------------------ |
109 | 109 | ð |
110 | 110 | ------------------------------ |
111 | -2008/09/20 | |
111 | +2008/0X/XX | |
112 | 112 | Version ÊÞÀ58 |
113 | 113 | vr [ÌURL©ço^µÄ éOAvðN®·é@\ðÇÁ |
114 | 114 | XMGfB^ÅAA±µÄeÅ«éæ¤É·é@\ðÇÁ |
115 | - J¢Ä¢é^uÌXbhÌêðXbhêÉ\¦·é@\ðÇÁ | |
116 | - Ü¿BBSÌPATH_INFO`®ÌURLÉÎ | |
117 | - TEhCxgÌt@CwèðÎpXÅwèÅ«éæ¤ÉC³ | |
118 | - \¦Ì^uÌêðXbhêÉ\¦·éANVðÇÁ | |
119 | - µ½çÎJBBSÌÂXV@\C³ | |
120 | - datt@CðXbhêÉD&Dµ½Æ«ÉAt@C¼ªs³Å·G[ÉíÉÈésïÌC³ | |
121 | 115 | |
122 | 116 | 2008/03/22 |
123 | 117 | Version ÊÞÀ57 [X2 |
@@ -83,7 +83,7 @@ const | ||
83 | 83 | MAJOR_VERSION = 1; |
84 | 84 | MINOR_VERSION = 0; |
85 | 85 | RELEASE_VERSION = 'beta'; |
86 | - REVISION_VERSION = 19; | |
86 | + REVISION_VERSION = 18; | |
87 | 87 | |
88 | 88 | // ========================================================================= |
89 | 89 | // GpÖ |
@@ -269,7 +269,6 @@ var | ||
269 | 269 | const |
270 | 270 | BBS_HOST = 'machi.to'; |
271 | 271 | THREAD_MARK = '/bbs/read.pl'; |
272 | - THREAD_MARK2= '/bbs/read.cgi'; | |
273 | 272 | begin |
274 | 273 | |
275 | 274 | try |
@@ -281,10 +280,6 @@ begin | ||
281 | 280 | foundPos := AnsiPos( BBS_HOST, uri.Host ); |
282 | 281 | if (foundPos > 0) and (Length( uri.Host ) - foundPos + 1 = Length( BBS_HOST )) then begin |
283 | 282 | foundPos := Pos( THREAD_MARK, inURL ); |
284 | - if (foundPos = 0) then begin | |
285 | - // VURLÎ | |
286 | - foundPos := Pos( THREAD_MARK2, inURL ); | |
287 | - end; | |
288 | 283 | if foundPos > 0 then |
289 | 284 | Result := atThread |
290 | 285 | else if (uriList.Count > 1) and (uri.Path <> '/') then // Å㪠'/' ÅÂßçêÄéÈç 3 |
@@ -314,10 +309,9 @@ procedure OnExtractBoardURL( | ||
314 | 309 | var |
315 | 310 | uri : TIdURI; |
316 | 311 | uriList : TStringList; |
317 | - URL : String; | |
312 | + URL : String; | |
318 | 313 | const |
319 | 314 | THREAD_MARK = '/bbs/read.pl'; |
320 | - THREAD_MARK2= '/bbs/read.cgi'; | |
321 | 315 | begin |
322 | 316 | URL := string(inURL); |
323 | 317 | if AnsiPos(THREAD_MARK, URL) > 0 then begin |
@@ -339,27 +333,6 @@ begin | ||
339 | 333 | uri.Free; |
340 | 334 | uriList.Free; |
341 | 335 | end; |
342 | - end else if AnsiPos(THREAD_MARK2, URL) > 0 then begin | |
343 | - if Copy( inURL, Length( inURL ), 1 ) = '/' then | |
344 | - uri := TIdURI.Create( URL ) | |
345 | - else | |
346 | - uri := TIdURI.Create( URL + '/' ); | |
347 | - | |
348 | - uriList := TStringList.Create; | |
349 | - try | |
350 | - // http://kanto.machi.to/bbs/read.cgi/kana/1215253035/l50 | |
351 | - // http://kanto.machi.to/kana/ | |
352 | - uriList.Delimiter := '/'; | |
353 | - uriList.DelimitedText := uri.Path; | |
354 | - URL := uri.Protocol + '://' + uri.Host + '/'; | |
355 | - if (uriList.Count >= 4) then begin | |
356 | - URL := URL + uriList[3] + '/'; | |
357 | - end; | |
358 | - outURL := CreateResultString(URL); | |
359 | - finally | |
360 | - uri.Free; | |
361 | - uriList.Free; | |
362 | - end; | |
363 | 336 | end else begin |
364 | 337 | outURL := CreateResultString(URL); |
365 | 338 | end; |
@@ -900,8 +873,6 @@ var | ||
900 | 873 | uri : TIdURI; |
901 | 874 | uriList : TStringList; |
902 | 875 | foundPos : Integer; |
903 | -const | |
904 | - THREAD_MARK2= '/bbs/read.cgi'; | |
905 | 876 | begin |
906 | 877 | |
907 | 878 | foundPos := AnsiPos( '?', URL ); |
@@ -917,26 +888,7 @@ begin | ||
917 | 888 | uri.Free; |
918 | 889 | uriList.Free; |
919 | 890 | end; |
920 | - end else begin | |
921 | - // V`® ? | |
922 | - foundPos := AnsiPos(THREAD_MARK2, URL); | |
923 | - if (foundPos > 0) then begin | |
924 | - uri := TIdURI.Create( URL ); | |
925 | - uriList := TStringList.Create; | |
926 | - try | |
927 | - uriList.Delimiter := '/'; | |
928 | - uriList.DelimitedText := uri.Path; | |
929 | - if (uriList.Count >= 5) then begin | |
930 | - Result := | |
931 | - uri.Protocol + '://' + uri.Host + '/bbs/read.pl?' + | |
932 | - 'BBS=' + uriList[3] + '&KEY=' + uriList[4]; | |
933 | - end; | |
934 | - finally | |
935 | - uri.Free; | |
936 | - uriList.Free; | |
937 | - end; | |
938 | - end; | |
939 | - end; | |
891 | + end; | |
940 | 892 | |
941 | 893 | end; |
942 | 894 |
@@ -201,9 +201,6 @@ var | ||
201 | 201 | key : string; |
202 | 202 | htmlList : TStringList; |
203 | 203 | i : Integer; |
204 | - | |
205 | - resultArea : Boolean; | |
206 | - pos : Integer; | |
207 | 204 | const |
208 | 205 | //http://rentalbbs.livedoor.com/jbbs/search/?word=%C2%E7%B3%D8&category=auto |
209 | 206 | BBS_HOST = 'http://rentalbbs.livedoor.com/'; |
@@ -215,7 +212,7 @@ const | ||
215 | 212 | label |
216 | 213 | NextBoard; |
217 | 214 | begin |
218 | - responseCode := 0; | |
215 | + | |
219 | 216 | category := CATEGORIES[ CategoryComboBox.ItemIndex ]; |
220 | 217 | boardname := BoardNameEdit.Text; |
221 | 218 |
@@ -240,30 +237,31 @@ begin | ||
240 | 237 | htmlList := TStringList.Create(); |
241 | 238 | try |
242 | 239 | htmlList.Text := CustomStringReplace(downResult, '<br>', #13#10); |
243 | - resultArea := False; | |
244 | - for i := 0 to htmlList.Count - 1 do begin | |
240 | + for i := htmlList.Count - 1 downto 0 do begin | |
245 | 241 | downResult := htmlList[i]; |
246 | 242 | try |
247 | - //<div class="searchResults"> | |
248 | - //<h2><span class="ranking">[1]</span><a href="http://jbbs.livedoor.jp/auto/5497/">MIT-MCC BBS</a><span class="point"><span class="all">4750pt</span><span class="yesterday">(Yesterday40 pt)</span></span></h2> | |
249 | - //<p> HÆåw@[^TCNÌBBSÅ·Be©`FbN·éæ¤ÉµÜµå¤ô(&gt;_&lt;)b</p> | |
250 | - //</div> | |
251 | - if (not resultArea) and (AnsiPos('class="searchResults"', downResult) > 0) then begin | |
252 | - resultArea := True; | |
253 | - end else if (resultArea) then begin | |
254 | - pos := AnsiPos('<a href="', downResult); | |
255 | - if (pos > 0) then begin | |
256 | - resultArea := False; | |
257 | - downResult := Copy(downResult, pos + 9, Length(downResult)); | |
258 | - key := Copy(downResult, 1, AnsiPos('"', downResult)-1); | |
259 | - downResult := Copy(downResult, AnsiPos('>', downResult) + 1, Length(downResult)); | |
260 | - | |
261 | - board := Copy(downResult, 1, AnsiPos('</a>', downResult) -1); | |
262 | - | |
263 | - board := CustomStringReplace(board, '=', '') + '=' + key; | |
264 | - LogEdit.SelText := board + #13#10; | |
265 | - FBoardList.Add( board ); | |
266 | - end; | |
243 | + //<a href="/auto/2348/">g^©®Ôf¦Â</a> | |
244 | + //<small><strng><a href="http://jbbs.livedoor.jp/auto/4112/">¾¡åw@ñEZå</a></strong></small></td> | |
245 | + if (AnsiPos('<small><strng><a href="', downResult) > 0) | |
246 | + and (AnsiPos(category, downResult) > 0) then begin | |
247 | + downResult := CustomStringReplace(downResult, '<small><strng>', ''); | |
248 | + board := Copy(downResult, AnsiPos('<a href="', downResult) + 9, | |
249 | + Length(downResult)); | |
250 | + key := Copy(board, AnsiPos('">', board) + 2, | |
251 | + Length(board)); | |
252 | + key := Copy(key, 1, AnsiPos('</a>', key) -1); | |
253 | + | |
254 | + board := Copy(board, 1, AnsiPos('">', board) - 1); | |
255 | + if (board = '../') then begin | |
256 | + board := CustomStringReplace(board, '../', BOARD_HOST); | |
257 | + end else if (AnsiPos('/', board) = 1) then begin | |
258 | + board := BOARD_HOST + Copy(board, 2, Length(board)); | |
259 | + end; | |
260 | + | |
261 | + board := key + '=' + board; | |
262 | + | |
263 | + LogEdit.SelText := board + #13#10; | |
264 | + FBoardList.Add( board ); | |
267 | 265 | end; |
268 | 266 | except |
269 | 267 | end; |
@@ -2,7 +2,7 @@ library ShitarabaJBBSPlugIn; | ||
2 | 2 | |
3 | 3 | { |
4 | 4 | ShitarabaJBBSPlugIn |
5 | - $Id: ShitarabaJBBSPlugIn.dpr,v 1.45 2008/08/03 02:45:48 h677 Exp $ | |
5 | + $Id: ShitarabaJBBSPlugIn.dpr,v 1.44 2006/07/02 09:48:04 h677 Exp $ | |
6 | 6 | } |
7 | 7 | |
8 | 8 | uses |
@@ -83,7 +83,7 @@ const | ||
83 | 83 | MAJOR_VERSION = 1; |
84 | 84 | MINOR_VERSION = 1; |
85 | 85 | RELEASE_VERSION = 'alpha'; |
86 | - REVISION_VERSION = 17; | |
86 | + REVISION_VERSION = 15; | |
87 | 87 | |
88 | 88 | SYNCRONIZE_MENU_CAPTION = 'µ½çÎJBBSÂXV'; |
89 | 89 |
@@ -1,31 +1,40 @@ | ||
1 | 1 | [Setting] |
2 | -@endless=20 | |
3 | 2 | @liveplus=10 |
4 | -@news=156 | |
3 | +@news=30 | |
5 | 4 | @newsplus=128 |
6 | -@operate=24 | |
7 | -@sec2chd=20 | |
8 | -academy6=45 | |
9 | -babiru=30 | |
10 | -bubble6=45 | |
11 | -changi=45 | |
12 | -ex24=45 | |
13 | -food8=45 | |
14 | -gimpo=45 | |
15 | -ipv6=45 | |
16 | -life9=45 | |
17 | -live23=15 | |
18 | -live24=15 | |
19 | -love6=45 | |
20 | -mamono=45 | |
21 | -namidame=45 | |
22 | -pc11=45 | |
23 | -qb5=45 | |
24 | -qiufen=30 | |
25 | -schiphol=45 | |
26 | -science6=45 | |
27 | -set=30 | |
28 | -society6=45 | |
29 | -venus=30 | |
30 | -yomi=30 | |
31 | -yutori=10 | |
5 | +@news4vip=10 | |
6 | +@news4viptasu=10 | |
7 | +academy6=20 | |
8 | +anime3=20 | |
9 | +bubble6=20 | |
10 | +etc7=20 | |
11 | +ex21=20 | |
12 | +food8=20 | |
13 | +game13=20 | |
14 | +game14=20 | |
15 | +hobby10=20 | |
16 | +human7=20 | |
17 | +life9=20 | |
18 | +live23=10 | |
19 | +live24=10 | |
20 | +live27=10 | |
21 | +love6=20 | |
22 | +mamono=10 | |
23 | +money6=20 | |
24 | +music8=20 | |
25 | +namidame=10 | |
26 | +news24=20 | |
27 | +pc11=20 | |
28 | +qb5=20 | |
29 | +qiufen=20 | |
30 | +babiru=20 | |
31 | +yomi=20 | |
32 | +venus=20 | |
33 | +set=20 | |
34 | +school7=20 | |
35 | +science6=20 | |
36 | +society6=20 | |
37 | +sports11=20 | |
38 | +tmp7=20 | |
39 | +tv11=20 | |
40 | +yutori=20 | |
\ No newline at end of file |