This WordPress plugin NGG Smart Image Search provides a smart search and display functionality for images in NextGEN galleries on a WordPress front end website. It requires NextGEN Gallery to be installed and activated.
NGG Smart Image Search will provide a highly customizable search and display functionality for images in NextGEN Galleries. Customization can be done differently for public and private searches, i.e. for public and logged in users. Customization can be done via widgets or shortcodes.
The search will be carried out across title, description, filename and tags of all images. You can search for single terms, special terms and multi-key terms. You can include and exclude search terms or restrict terms to dedicated fields.
The scope of search can be defined by customizable lists of NextGEN galleries which can be defined separatly for public users or for logged in users:
- all galleries
- selected list of included galleries and albums
- selected list of excluded galleries and albums
The result list can be configured in gallery form or as a single image list. As a single image list it can provide the following information:
- image id
- image title
- image description
- filename of image
- size of image in bytes and pixel dimensions
- size of backup image in bytes and pixel dimensions
(original image is optionally saved as backup image by NextGEN Gallery if uploaded image is resized and optimized during upload)
- user id of uploading user (needs NextGEN Gallery table customization)
- gallery id of gallery, where image is listed
- title of that gallery
- description of that gallery
- tags saved with the image
The plugin NGG Smart Image Search will provide
- a customizable widget and a customizable shortcode to define a search depending on user type (public or logged in)
- a customizable shortcode to list the search results
- a shortcode to add describing text depending on user type (public or logged in)
The plugin will automatically generate a landing page for the widget-based search, but this landing page can be configured freely by settings and WordPress edit page means as well (including redefinition of slug and title).
- Upload `NGG Smart Image Search` to the `/wp-content/plugins/` directory
- Activate the plugin through the ‘Plugins’ menu in WordPress
- Adjust settings, widget and shortcode as necessary
Frequently Asked Questions
How does the search work ?
There are two possibilities to perform a search for NextGEN Galleries images:
(1) Use a search field in a sidebar widget.
The plugin comes with a widget „NGG Smart Image Search“. If you use this widget, it will provide a search field in the sidebar. Entering text in the search field will send the input to an automatically generated search page. This search page is described on the settings page of the plugin. You can freely customize this search page. The search page will use a shortcode Kein Suchbegriff für die Bildersuche eingegeben.
to generate and display the result list.
(2) Use a search field provided by the shortcode
This shortcode searchbox can be placed on any post or page (also on the automatically generated search page). Entering text in this searchfield will send the input to the shortcode Kein Suchbegriff für die Bildersuche eingegeben.
, which must be placed on the same page. Otherwise you won’t get any search results. The shortcode Kein Suchbegriff für die Bildersuche eingegeben.
will generate and display the search result.
How can a search be customized ?
You can freely specify the scope of the image search by listing or excluding galleries and albums. You can also specify the listed fields in the result list.
You can do this separately for public users and for logged in users.
If you do it by using search widgets, you define separate widgets for public users and for logged in users. Users will only see one widget which is relevant for them.
If you use a searchfield shortcode
you specify your customization by parameters (see screenshots for a complete list of parameters). By default parameters are initiated differently for public users and for logged in users (see screenshots). You can overwrite these settings by specifying the parameters in the searchbox shortcode. E.g. parameter list_descr=“1″ will list the image description in the result list for all users. If you want to set this parameter only for public users, you use prefix „pu_“, i.e. pu_list_title=“1″. If you want to set this parameter only for logged in users, you use the prefix „lo_“, i.e. lo_list_descr=“1″.
How can the result list be customized ?
The result list is generated by the shortcode Kein Suchbegriff für die Bildersuche eingegeben.
and starting with version 2.0 by the shortcode Kein Suchbegriff für die Bildersuche eingegeben.
. This shortcode accepts a display parameter to select the result list layout. There are several options available:
(1) display=“si“ or display=“ngg_single_images“ (formerly „single_images“)
This will generate a detailed result list in table format showing found images and their describing fields. The images are displayed using the native NextGEN Gallery shortcode for displaying single images. Clicking on an image will open the image in the lightbox as defined on the NextGEN Gallery setting page. The lightbox will only display a single image.
(2) display=“li“ or display=“linked_images“
This will generate the same result list as in option (1). However, the found images are here displayed using explicite image links generated by this search plugin. For this option you should configure NextGEN Gallery so that the standard NextGEN Gallery lightbox will also work for all other linked images. Doing this you can again open each listed image in the standard NextGEN Gallery lightbox. However now you can skip all images in the lightbox, you do no longer have to click on each image first.
(3) display=“bt“ or display=“ngg_basic_thumbnails“
This will generate a standard NextGEN basic thumbnails gallery for all found images. The found images are only listed as thumbnails, there is no further describing text for the images.
Starting with version 2.0 there are more display options available which are documented separatly on the subpage display search result list.
In future releases there will be also some formatting options available for the result lists. Currently only a spacing parameter defines the width of the fieldnames in the resultlist. The default is set to spacing=“10em“. Possible values can be defined with units em, rem or px.
What search string can be entered ?
You can enter any sensible search text. The whole text, including entered spaces, will be searched for in the image fields Title, Description, Filename and Tags as configured in the searchfield widget or shortcode. You can include a dynamic display option in the search text by directly appending „>si“, „>li“ or „>bt“ to the search text (no blanks in between). The result list will use the corresponding layout as described above.
For logged in users there is a special search option available: g:<n>. This will list all images of the gallery with Id <n>. The result list will also provide the gallery name and gallery id with underlying links to the backend gallery administration page or to the gallery page, if such a page is defined for the NextGEN Gallery in the backend.
Starting with version 2.0 there are also new advanced and complex search options available which include multiple keyword search. An extensive documentation with examples is provide on the subpage qualified search examples.
screenshot 1: widget display for search definition
screenshot 2: search result list
screenshot 3: settings page
screenshot 4: public default parameters
screenshot 5: private default parameters
= 1.0 =
* Initial public version
= 1.0 =
No upgrade, just initial install