Menu

#1 inverse inverted search

None
closed
nobody
5
2017-10-31
2009-05-23
Anonymous
No

Sometimes it would be useful to know when someone removed something from the article from a lot of revisions. Example: I'm interested when was the "Future development" section removed from the en:PHP article, but I know that it was present about 1200 revisions ago. Interpolated search doesn't work here because it searches for when some text was added, but not removed. Do you think you could add a checkbox to reverse the direction of interpolated search? --Benutzer:The_CyberShadow

Discussion

  • Mark Hurd

    Mark Hurd - 2009-05-27

    Yes, I'd like that too. I would like to confirm who prematurely removed an XfD template for example.

     
  • Mark Hurd

    Mark Hurd - 2009-05-27

    I don't know php and it will need some language strings added or changed, but here is a diff against wikiblame.php revision 6 that should provide this feature:
    Comparing files .\wikiblame.php.bak and .\WIKIBLAME.PHP
    ***** .\wikiblame.php.bak
    76:
    77: //Offset = YYYYMMDDmmhhss
    ***** .\WIKIBLAME.PHP
    76:
    77: $invert_sense = $_REQUEST['invert_sense'];
    78: if($invert_sense=="on")
    79: {
    80: $invert_sense = true;
    81: }
    82: else
    83: {
    84: $invert_sense = false;
    85: }
    86: //Offset = YYYYMMDDmmhhss
    *****

    ***** .\wikiblame.php.bak
    240: <tr>
    241: <td colspan="2" align="center"><br><br>
    242: <input type="submit" value="<? echo $messages['start'] ?>" >
    243: </td>
    ***** .\WIKIBLAME.PHP
    249: <tr>
    250: <td align="<? echo $alignment ?>">
    251:
    252: <input type="checkbox" name="invert_sense" id="invert_sense" <? if ($invert_sen
    253: e==true) echo checked; ?> >
    254: </td>
    255: <td>
    256: <label for="invert_sense">
    257: <? echo $messages['invert_sense'] ?>
    258: </label>
    259: </td>
    *****

    ***** .\wikiblame.php.bak
    244: </tr>
    245: </table>
    ***** .\WIKIBLAME.PHP
    260: </tr>
    261: <tr>
    262: <td colspan="2" align="center"><br><br>
    263: <input type="submit" value="<? echo $messages['start'] ?>" >
    264: </td>
    265: </tr>
    266: </table>
    *****

    ***** .\wikiblame.php.bak
    430: set_time_limit(60);
    431: global $needle, $server, $articleenc, $tags_present;
    432: $url = "http://".$server."/w/index.php?title=".$articleenc."&oldid=".$id;
    ***** .\WIKIBLAME.PHP
    451: set_time_limit(60);
    452: global $needle, $server, $articleenc, $tags_present, $invert_sense;
    453: $url = "http://".$server."/w/index.php?title=".$articleenc."&oldid=".$id;
    *****

    ***** .\wikiblame.php.bak
    452: {
    453: return(true);
    454: }
    ***** .\WIKIBLAME.PHP
    473: {
    474: return(!$invert_sense);
    475: }
    *****

    ***** .\wikiblame.php.bak
    456: {
    457: return(false);
    458: }
    ***** .\WIKIBLAME.PHP
    477: {
    478: return($invert_sense);
    479: }
    *****

     
  • Flominator

    Flominator - 2009-05-31

    Tried to include it at http://wikipedia.ramselehof.de/wikiblame_inverse.php
    But it seems it doesn't work :(

     
  • Mark Hurd

    Mark Hurd - 2009-06-01

    That last comment was me. Regards, Mark Hurd.

     
  • Eric Kvaalen

    Eric Kvaalen - 2010-04-27

    I tried using wikiblame_inverse but I get the following message:

    Fatal error: Call to undefined function: language_list() in /home/www/kunden/ramselehof.de/wikipedia/wikiblame_inverse.php on line 158

     
  • Flominator

    Flominator - 2010-05-01

    Applied a quick and dirty fix in order to get the inverse script working again. I will definately have to include it in the "normal" one, too.

     
  • Eric Kvaalen

    Eric Kvaalen - 2010-06-03

    Wikiblame_inverse is confusing. If you don't manually check the box that says "inverse sense" then it doesn't do an "inverse search". And it seems to call insertions deletions and vice versa.

    By the way, it would be nice to show a key saying that the circles mean the string was found and the X means it was not -- except that in wikiblame_inverse it seems to mean the other way round.

     
  • Eric Kvaalen

    Eric Kvaalen - 2010-06-03

    Also, wikiblame_inverse does a sequential search instead of a binary search unless you change it. That's not good in my opinion.

     
  • Flominator

    Flominator - 2011-01-22
    • status: open --> open-accepted
     
  • Flominator

    Flominator - 2011-01-22

    I finally tried to include that feature in WikiBlame.php

    For the moment, it's hidden.

    Please use this link, to activate it:
    http://wikipedia.ramselehof.de/wikiblame.php?binary_search_inverse=true

    If anything goes wrong, please post it here.

     
  • Flominator

    Flominator - 2017-10-31

    Meanwhile the feature is a solid part of WikiBlame and because of that, I will delete wikiblame_inverse.php now (at least from the repository

     
  • Flominator

    Flominator - 2017-10-31
    • status: open-accepted --> closed
    • Group: -->
     

Log in to post a comment.