Gallery Search Engine: Difference between revisions

From EHWiki
Jump to navigationJump to search
Luna Flina (talk | contribs)
Using PHP GET parameters: Updated for SG.
Luna Flina (talk | contribs)
Line 15: Line 15:
The following parameters are crucial for querying.
The following parameters are crucial for querying.


*f_apply: The search engine action to apply. Accepted values (strings) are "Apply Filter" ([[galleries]]) and "Search Favorites" ([[favorites]]).
*f_apply: The search engine action to apply. Accepted value is "Apply Filter". Only works for [[galleries]].
*f_search: The search query. Must be [https://en.wikipedia.org/wiki/Uniform_Resource_Identifier URI-compatible].
*f_search: The search query. Must be [https://en.wikipedia.org/wiki/Uniform_Resource_Identifier URI-compatible].


*advsearch: Default value is 1. Toggles advanced searching and visibility of the advanced options panel. 0=disabled, 1=enabled.
*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.
*page: Default value is 0. The zero-indexed page to jump to.


Line 26: Line 26:


Flag values:
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


1=Hide misc
===Favorites===
 
2=Hide doujinshi
 
4=Hide manga
 
8=Hide artistcg


16=Hide gamecg
No longer allows for low-power and downvoted tag search. Also requires the user to specify at least one field to search for as there is no default field.
 
32=Hide imageset
 
64=Hide cosplay
 
128=Hide asianporn
 
256=Hide nonh
 
512=Hide western
 
===Favorites===


*favcat: Ignored by default (shows all favorites). Accepted values are 0 to 9. If provided, shows only the specified favorite category.
*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. Accepted value is "on". Searches for gallery titles matching the search query.
*st: Disabled by default. Accepted value is "on". Searches for '''searchable''' gallery [[tags]] matching the search query.
*sf: Disabled by default. Accepted value is "on". Searches for notes matching the search query.


===File searching===
===File searching===

Revision as of 18:45, 20 March 2019

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_apply: The search engine action to apply. Accepted value is "Apply Filter". Only works for galleries.
  • 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.

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 low-power and downvoted tag search. 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. Accepted value is "on". Searches for gallery titles matching the search query.
  • st: Disabled by default. Accepted value is "on". Searches for searchable gallery tags matching the search query.
  • sf: Disabled by default. Accepted value is "on". 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. Accepted value is "on". Searches for the f_search query in gallery names (titles).
  • f_stags: Enabled by default. Accepted value is "on". 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. Accepted value is "on". Also searches for low-power tags. Requires f_stags to be applicable. Is implied when using f_sdt2 instead.
  • f_sdt2: Ignored by default. Accepted value is "on". Also searches for downvoted tags. Requires f_stags to be applicable and includes low-power tags as well.
  • f_sdesc: Enabled by default. Accepted value is "on". Searches for the f_search query in the gallery's description (uploader comment).
  • f_storr: Disabled by default. Accepted value is "on". Searches for the f_search query in torrent filenames.
  • f_sto: Disabled by default. Accepted value is "on". If set, only returns galleries with torrents.
  • f_sh: Disabled by default. Accepted value is "on". Shows expunged galleries.
  • f_sr: Ignored by default. Accepted value is "on". Must be set to "on" to enable search by rating. Required by f_srdd.
  • f_srdd: Default value is 2. Accepted values are 2 to 5. Minimum gallery rating for results in stars; must be an integer. Ignored if f_sr is not set.
  • f_spf: Ignored by default (assumed to be any as in 1). 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 (assumed to be any as in 2000). 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. Accepted value is "on". If set, ignores the user's language exclusion settings for this query.
  • f_sfu: Disabled by default. Accepted value is "on". If set, ignores the user's uploader exclusion settings for this query.
  • f_sft: Disabled by default. Accepted value is "on". If set, ignores the user's My Tags exclusion settings for this query.