WSN Gallery https://scripts.webmastersite.net/wsngallery/manual en-us Offers The offers system, which you can enable at Admin -> Settings -> Switches -> Llistings -> Offers, allows listing owners to set up special offers which https://scripts.webmastersite.net/wsngallery/manual/administrative-tasks/switches/offers-660.html Thu, 06 Sep 2018 15:36:33 GMT https://scripts.webmastersite.net/wsngallery/manual/administrative-tasks/switches/offers-660.html
Offers are treated as a field, so you can manage the input and display code via the field manager at Admin -> Listings -> Listing Fields.

Submitters add and remove offers from the submit listing or edit listing page, and they're displayed to all on the listing details page. Offers may be held for validation by an admin if you so choose in the usergroup permissions.

Template variables:

{OFFERID} - The database id number
{OFFERTITLE} - The title of the offer
{OFFERDESCRIPTION} - The description of the offer
{OFFEREXPIREDATE} - The date on which the offer expires, if applicable
{OFFERIMAGEATTACHTHUMBIMAGE} - Thumbnail of the offer's image (complete img tag)
{OFFERIMAGEATTACHTHUMBURL} - URL of thumbnail of the offer image
{OFFERVALIDATED} - True if approved, false if pending admin validation
{OFFERLINKDETAILSURL} - URL of listing details page of listing this offer is for
{OFFERLINKTITLE} - Title of the listing this offer is for

{LINKNUMOFFERS} - The number of validated, non-expired offers a given listing has at the moment

You can also make toplists of offers with the toplist generator.]]>
Searching by Coordinates Sometimes you may wish to construct a search (either as a link or as a form) which will show everything within x distance of a given set of latitude a https://scripts.webmastersite.net/wsngallery/manual/configuration/searching/searching-by-coordinates-659.html Tue, 31 Oct 2017 12:18:23 GMT https://scripts.webmastersite.net/wsngallery/manual/configuration/searching/searching-by-coordinates-659.html
A complete search link with a 50 mile range and no search term filtering for the coordinates 37.316,-120.042 would be yoursiteurl/search.php?condition=or&filled=1&search=&whichtype=links&zipmiles=50&zipsource[0]=37.316&zipsource[1]=-120.042

To construct a complete search form, just copy the simple or advanced search form and add the zipsource[0], zipsource[1] and zipmiles as hidden inputs. To construct a search link that filters in any desired way, simply run the desired search, copy the url from your browser address bar, and add the three paramaters &zipmiles=50&zipsource[0]=37.316&zipsource[1]=-120.042 to the end of the url.

If you just want to show stuff near the person who's reading the page, you can use zipsource=visitorlocation]]>
Redirects Sometimes you want to control where the user will be sent after their interaction with the page. https://scripts.webmastersite.net/wsngallery/manual/other/redirects-657.html Tue, 05 Sep 2017 08:33:15 GMT https://scripts.webmastersite.net/wsngallery/manual/other/redirects-657.html
For links, just add a 'returnto' parameter specifying the relative in-site URL. For example, index.php?action=userlogin&returnto=index.php?TID=somecustomtemplate will prompt for login and then go to index.php?TID=somecustomtemplate after they log in. Note that this won't work if there's an & in the URL you want to redirect too, because it'll be interpreted as an & in the link URL separating parameters -- for such a case, your best bet is to set up a friendlier URL for that page in your Admin -> Settings -> SEO.

In a form, you can embed a hidden field <input type="hidden" name="returnto" value="index.php?TID=somecustomtemplate">

To redirect back to the current page, use {CURRENTRELATIVEURL}. For example, <a href="index.php?action=userlogin&returnto={CURRENTRELATIVEURL}">click here to login and then redirect</a>. Note that this *will* work with &s in link form because it encodes them.]]>
Open Hours At Admin Panel -> Settings -> Switches, you have an 'Open hours' option. https://scripts.webmastersite.net/wsngallery/manual/administrative-tasks/switches/open-hours-656.html Wed, 17 May 2017 23:10:48 GMT https://scripts.webmastersite.net/wsngallery/manual/administrative-tasks/switches/open-hours-656.html
Note that up to two sets of hours are supported for each day (this allows a place to have split hours with a break for lunch, like 8 AM - 12 PM and 1 PM - 5 PM). Using 3 or more sets for the same day may not sort correctly if entered non-chronologically, but very few businesses have 3 sets.

If you'd like to display the hours somewhere outside of the default location, you can use {LINKSHOWFIELD[hours]} or for a customized version you can copy and modify the custom display html from the Link Fields page into any other template where you're within the scope of a listing.

In the open hours display, today's hours are automatically bolded. This styling is from the application of the css class todayhours to all sets of hours that are for today. You can re-style as desired by adding .todayhours { } to your stylesheet.

There are a few useful template variables related to the hours:
{LINKHASHOURS} - Tests if the listing has any hours entered (for use in conditioanls).
{LINKISOPEN} - Tests if the business is currently open, for use in conditionals. Returns false if it's closed or has no hours entered.
{LINKCLOSINGSOON} - Tests if the business is currently open but is going to close within the next 60 minutes. For use in conditionals. Returns false if closed or if open for more than another hour. You can pass a parameter for a different number of minutes, like {LINKCLOSINGSOON[30]).
{LINKOPENSTATUS} - Displays "open", "closing soon" or "closed" (in English, so best used in conditionals)... or blank if there are no hours entered.
{LINKSHOWDAYHOURS[today]} - Displays the open hours (e.g. 8 AM - 5 PM) for the specified day parameter. The parameter can be 'today' or it can be a day of the week like Monday (which can be written out as Monday or as just Mon).

Note: these variables make the assumption that the viewer is in the same timezone as the business.

People can search by hours with either the simple or advanced search. For advanced searching, four radio options appear: "Any Time" (does not filter by hours), "Now" (filters to businesses currently open), "On __ at __" (filters to a particular time) and "On __ from __ until at least __" (filters to businesses open for the entirity of that length of time).

For any search form you may be using, whether it's simple or advanced search, you can include this simple checkbox to allow people to filter to businesses currently open: <input type="checkbox" name="openhoursquerytype" value="now">

Because the filtering by hours happens mostly on the php side rather than in the database query (which only filters by day open), you will notice that searches with large numbers of results have a different number of listings per page than normal. To account for the probability that the majority of the listings may be currently closed, WSN queries several times more listings than usual on the first page and then dynamically alters the number of listings per page for the subsequent pages to a value that seems appropriate to the results, in hopes of giving you something similar to the number of displayed results you want.]]>
Combination Simple and Advanced Search Sometimes you may wish to blend the simple search box and advanced field filter searches. As of version 10.1.6 Beta 4 and later, this is now possible. https://scripts.webmastersite.net/wsngallery/manual/configuration/searching/combination-simple-and-advanced-search-655.html Tue, 21 Mar 2017 20:51:09 GMT https://scripts.webmastersite.net/wsngallery/manual/configuration/searching/combination-simple-and-advanced-search-655.html
Start with your advanced search form. To construct a custom advanced search form, one easy approach is to use your browser's "view source" option when viewing the advanced search page on your site. Then use ctrl+f to locate "Find Listings". Copy that whole box and then remove whichever listing fields you don't want searched in your custom form.

To incorporate the simple search box into the custom advanced search box you've made, let's make it the first row of the table just below <table> like this:
<tr><td>Any searchable field</td><td><select name="condition">{FUNC_SIMPLESEARCHCONDITIONOPS}</select></td><td><input type="text" name="search" class="standardinput" placeholder="type your simple search term here"></td></tr>


If you prefer not to allow a choice of condition for the simple search, replace the condition selector with <input type="hidden" name="condition" value="{DEFAULTSEARCHTYPE}"> to use the default simple search type automatically.]]>