Gallery Search Engine
From EHWiki
This is an article about detailed use of the search engine via the browser's address bar. For parent articles, please see E-Hentai Gallery System, Favorites and Gallery Searching.
Using PHP GET parameters
Basic guidelines
- ? (question mark): Append this after a .php file (index.php is omitted; in this case append directly after the slash) to start declaring arguments, parameters and their respective values.
- & (ampersand): Must be preceded by ? at the beginning of the declaration. Append this to declare additional arguments/parameters. You must add an ampersand for each new argument or parameter.
- = (equals): Sets a GET argument/parameter's value if applicable. If omitted, the default value is used.
If arguments are omitted, their default value is used/they are ignored. Some arguments have prerequisites to actually mean something (f_srdd, for example, is useless without f_sr=on, as it requires f_sr to activate a search by rating).
Querying
The following parameters are crucial for querying.
- f_search: The search query. Must be URI-compatible.
- advsearch: Default value is 1. Toggles advanced searching and visibility of the advanced options panel for galleries. 0=disabled, 1=enabled.
- page: Default value is 0. The zero-indexed page to jump to.
Viewing
- from: Automatically set when needed. Discards galleries from the provided gallery ID (gid) for proper display of filtered/new results. Ignored where it would not have any effect.
- Example - A link to the next page automatically sets "from" to the last gallery ID of the page to prevent the previous page from pushing galleries you've already seen in the results.
- inline_set: Changes the current inline display mode.
Accepted values:
- dm_m: Minimal
- dm_p: Minimal+
- dm_l: Compact (default)
- dm_e: Extended
- dm_t: Thumbnail
Categories
- f_cats: Filters out categories you don't want to see using binary flags. Add them up to achieve the desired result. Cannot be higher than 1022 (hides everything but Misc); 1023 is the same as 0.
Flag values:
- 1=Hide misc
- 2=Hide doujinshi
- 4=Hide manga
- 8=Hide artistcg
- 16=Hide gamecg
- 32=Hide imageset
- 64=Hide cosplay
- 128=Hide asianporn
- 256=Hide nonh
- 512=Hide western
Favorites
No longer allows for fuzzy tag search at the moment due to performance issues. Also requires the user to specify at least one field to search for as there is no default field.
- favcat: Ignored by default (shows all favorites). Accepted values are 0 to 9. If provided, only searches in the specified favorite category.
- sn: Disabled by default. Searches for gallery titles matching the search query.
- st: Disabled by default. Searches for searchable gallery tags matching the search query.
- sf: Disabled by default. Searches for notes matching the search query.
File searching
- f_shash: Ignored by default. The SHA-1 file hash to search for.
- fs_from: Ignored by default. The filename of the file that will be used to compare against. You must provide a file for this to work.
- fs_similar: Default is 1. Toggles similarity search. 0=disabled, 1=enabled.
- fs_covers: Default is 1. Toggles cover-only search. 0=any file, 1=cover only.
- fs_exp: Default is 1. Toggles expunged gallery file searching. 0=disabled, 1=enabled.
Filters
A valid f_search argument is required for all filters.
- f_sname: Enabled by default. Searches for the f_search query in gallery names (titles).
- f_stags: Enabled by default. Searches for the f_search query in gallery tags. Is restricted by f_sdt1 or f_sdt2 if provided. If neither is provided, searches for searchable tags.
- f_sdt1: Ignored by default. Also searches for low-power tags. Requires f_stags to be applicable. Is implied when using f_sdt2 instead.
- f_sdt2: Ignored by default. Also searches for downvoted tags. Requires f_stags to be applicable and includes low-power tags as well.
- f_sdesc: Enabled by default. Searches for the f_search query in the gallery's description (uploader comment).
- f_storr: Disabled by default. Searches for the f_search query in torrent filenames.
- f_sto: Disabled by default. If set, only returns galleries with torrents.
- f_sh: Disabled by default. Shows expunged galleries.
- f_sr: Disabled by default. Enables search by rating. Required by f_srdd.
- f_srdd: Ignored by default. Accepted values are 2 to 5. Minimum gallery rating for results in stars; must be an integer.
- f_sp: Disabled by default. Enables search by page count. Required by f_spf and f_spt.
- f_spf: Ignored by default. Accepted values are 1-2000. Sets the minimum amount of pages required for a gallery to be shown with this query.
- f_spt: Ignored by default. Accepted values are 1-2000. Sets the maximum amount of pages required for a gallery to be shown with this query.
- f_sfl: Disabled by default. Ignores the user's language exclusion settings for this query.
- f_sfu: Disabled by default. Ignores the user's uploader exclusion settings for this query.
- f_sft: Disabled by default. Ignores the user's My Tags exclusion settings for this query.