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
Yes, I'd like that too. I would like to confirm who prematurely removed an XfD template for example.
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: }
*****
Tried to include it at http://wikipedia.ramselehof.de/wikiblame_inverse.php
But it seems it doesn't work :(
That last comment was me. Regards, Mark Hurd.
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
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.
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.
Also, wikiblame_inverse does a sequential search instead of a binary search unless you change it. That's not good in my opinion.
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.
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