documentation updates
This commit is contained in:
@ -1,4 +1,69 @@
|
||||
<?php
|
||||
/**
|
||||
* Name: Post Index
|
||||
* Author: Shish <webmaster@shishnet.org>
|
||||
* Link: http://trac.shishnet.org/shimmie2/
|
||||
* License: GPLv2
|
||||
* Description: Show a list of uploaded images
|
||||
* Documentation:
|
||||
* Here is a list of the search methods available out of the box;
|
||||
* Shimmie extensions may provide other filters:
|
||||
* <ul>
|
||||
* <li>by tag, eg
|
||||
* <ul>
|
||||
* <li>cat
|
||||
* <li>pie
|
||||
* <li>somethi* -- wildcards are supported
|
||||
* </ul>
|
||||
* <li>size (=, <, >, <=, >=) width x height, eg
|
||||
* <ul>
|
||||
* <li>size=1024x768 -- a specific wallpaper size
|
||||
* <li>size>=500x500 -- no small images
|
||||
* <li>size<1000x1000 -- no large images
|
||||
* </ul>
|
||||
* <li>ratio (=, <, >, <=, >=) width : height, eg
|
||||
* <ul>
|
||||
* <li>ratio=4:3, ratio=16:9 -- standard wallpaper
|
||||
* <li>ratio=1:1 -- square images
|
||||
* <li>ratio<1:1 -- tall images
|
||||
* <li>ratio>1:1 -- wide images
|
||||
* </ul>
|
||||
* <li>filesize (=, <, >, <=, >=) size, eg
|
||||
* <ul>
|
||||
* <li>filesize>1024 -- no images under 1KB
|
||||
* <li>filesize<=3MB -- shorthand filesizes are supported too
|
||||
* </ul>
|
||||
* <li>id (=, <, >, <=, >=) number, eg
|
||||
* <ul>
|
||||
* <li>id<20 -- search only the first few images
|
||||
* <li>id>=500 -- search later images
|
||||
* </ul>
|
||||
* <li>user=Username, eg
|
||||
* <ul>
|
||||
* <li>user=Shish -- find all of Shish's posts
|
||||
* </ul>
|
||||
* <li>hash=md5sum, eg
|
||||
* <ul>
|
||||
* <li>hash=bf5b59173f16b6937a4021713dbfaa72 -- find the "Taiga want up!" image
|
||||
* </ul>
|
||||
* <li>filetype=type, eg
|
||||
* <ul>
|
||||
* <li>filetype=png -- find all PNG images
|
||||
* </ul>
|
||||
* <li>filename=blah, eg
|
||||
* <ul>
|
||||
* <li>user=kitten -- find all images with "kitten" in the original filename
|
||||
* </ul>
|
||||
* <li>posted=date, eg
|
||||
* <ul>
|
||||
* <li>posted=2009-12-25 -- find images posted on the 25th December
|
||||
* </ul>
|
||||
* </ul>
|
||||
* <p>Search items can be combined to search for images which match both,
|
||||
* or you can stick "-" in front of an item to search for things that don't
|
||||
* match it.
|
||||
*/
|
||||
|
||||
/*
|
||||
* SearchTermParseEvent:
|
||||
* Signal that a search term needs parsing
|
||||
@ -140,7 +205,7 @@ class Index extends SimpleExtension {
|
||||
}
|
||||
else if(preg_match("/^posted=(([0-9\*]*)?(-[0-9\*]*)?(-[0-9\*]*)?)$/", $event->term, $matches)) {
|
||||
$val = str_replace("*", "%", $matches[1]);
|
||||
$img_search->append(new Querylet("images.posted LIKE '%$val%'"));
|
||||
$event->add_querylet(new Querylet("images.posted LIKE '%$val%'"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user