Template:Auto List to Icons

From TEHCC Wiki
Jump to navigation Jump to search

This template converts keywords into icons, if found.

Read below the legend for typical template instructions.

Icon Legend

Image Description Semantic property
Nature Activities (hiking, biking, etc.) (Infobox Icon Type: Activities)
Canoe.jpg
Boating is allowed on lakes and waterways near the park Boating
Caving icon.png
Caving opportunities, and allowed, along the trail or in the park Caving
Climbing icon.png
Rock climbing opportunities, and allowed, along the trail or in the park Climbing
Dnr atv.png
Signifies that ATVs are allowed on at least some of the trail
Note: Check with proper authorities for which specific trails allow it and their registration requirements
ATV
Dnr bike.png
Signifies that bicycles are allowed on at least some of the trail
Note: Check with proper authorities for which specific trails allow it and their registration requirements
Biking
Dnr camp.png
Signifies that camping is allowed near the trail
Note: Check with proper authorities for their registration, location, and open fire requirements
Camping
Dnr fishing.png
Signifies that fishing might be allowed on at least some streams nearby the trail
Note: Check with proper authorities for locations and license requirements
Fishing
Dnr hiking.png
Signifies that hiking is allowed on the trail Hiking
Dnr horse.png
Signifies that horses are allowed on at least some of the trails
Note: Check with proper authorities for which specific trails allow it and their registration requirements
Horses
Dnr skiing.png
Signifies that skiing is allowed on the trail and is common in the winter Skiing
Icon Geocaching.jpg
Signifies there are geocaches in the park or along the trail Geocaching
Icon Hunting.jpg
Hunting is allowed along the trail.
Note: check with local authorities for all requirements. Non-hunter hikers should also note hunting seasons.
Hunting
No Dogs icon.jpg
Signifies that either the trail does not allow dogs or if for lodging, that there are pet free cabins (Park inns are always assumed pet free unless stated otherwise) No Dogs
Features within the park or along the trail (Infobox Icon Type: Features)
Dnr waterfall.png
There are waterfalls within the park or near the trail Waterfalls
Lakes icon.png
There are navigable lakes (bigger than a pond) in the park or along the trail Lakes
Mountains icon.png
There are great views of mountains or views from mountains. Mountains
Rivers icon.png
There are navigable rivers (bigger than a stream) in the park or along the trail Rivers
Scenic vistas icon.png
There are scenic vistas (expansive views of beautiful nature) within the park or near the trail Vistas
Park Amenities (Infobox Icon Type: Park Amenities)
Beaches icon.jpg
The park has a designated beach within its boundaries Beaches
Disc Golf icon.jpg
The park has a disc golf course within its boundaries Disc Golf
FastFoodIcon.png
There is a casual or fast food grill within the park Fast Food Grill
Golfing.png
The park owns/operates a golf course within its boundaries Golf
Icon Sports.png
Signifies there are sports fields (baseball, soccer, tennis, etc.) within the park Sports
Picnic icon.png
The park has designated picnicking spots typically including picnic tables and possibly grills Picnicking
Playground icon.png
The park or campground has at least one playground within its boundaries Playgrounds
Pool icon.jpg
The park has a pool within its boundaries Pools
RestaurantIcon.jpg
There is a sit down restaurant with tables and typically wait staff within the park Restaurant
Lodging options within the park (Infobox Icon Type: Lodging)
Dnr dog.png
Signifies there are pet friendly cabins or lodge rooms within the park (trails and campgrounds are always assumed pet friendly unless otherwise stated) Dogs
Group camping icon.png
Signifies there is a group camping site within the park Group Campground
Icon Cabin.png
Signifies there are cabins for overnight stays within the park. Cabins
Icon backpacking.jpg
Signifies there are backpacking sites within the park Backpacking
Icon campground.png
Signifies there is a campground within the park Campground
Icon lodge.png
Signifies there is a lodge/inn/hotel within the park Lodge/Inn/Hotel
No Dogs icon.jpg
Signifies that either the trail does not allow dogs or if for lodging, that there are pet free cabins (Park inns are always assumed pet free unless stated otherwise) No Dogs
Rustic Cabins icon.png
Signifies there are rustic cabins for overnight stays within the park. Typically that means remote and/or without electricity or possibly water. Rustic Cabins
Campground amenities (Infobox Icon Type: Campground Amenities)
Icon 20 amp.png
At least some campground sites have 20 amp receptacles 20 amp electrical
Icon 30 amp.png
At least some campground sites have 30 amp receptacles 30 amp electrical
Icon 50 amp.png
At least some campground sites have 50 amp receptacles 50 amp electrical
Icon Showers.png
Showers are available to campers Showers
Icon Washing.png
Washing machine(s) and likely dryer(s) are near the campground for use (paid or otherwise) Clothes Washing
Icon dollar.jpg
A store is available offering at least some limited selection of camping related items - see park details if more information is available Camp Store
Icon dump station.png
The campground has a dump station available to campers Dump station
Icon water.jpg
Water is available at some or all campground sites Site water
Icon wifi.jpg
Wi-Fi symbol to signify that Wi-Fi is available in the campground. Wi-Fi
Playground icon.png
The park or campground has at least one playground within its boundaries Playgrounds
Tent only icon.png
Campground campsites offered that do not permit RV's Tent only

Simply pass the template the comma separated list of terms and it will convert any found keywords to icons, and list the remainder. Although the icons have different groupings, the template doesn't care and is simply looking for keywords with an associated icon.

Expected usage:

{{Template:Auto List to Icons|List=<insert comma separated list>}}

How this works:

  • Create an array called 'iconslist' of the keywords found in a query of all pages under the category Category:Infobox Icons
  • Make an array called 'list' from the passed parameter names list
  • Make an array called 'noiconsitems' which is the arraydiff of the first two created arrays (items on the passed list that don't have an icon)
  • Make a fourth array 'iconitems' which is the intersection of the first two arrays (items on the passed list that do have an icon)
  • For each iconitems, find the keyword matching image and show it
  • Then finally, list the noiconsitems last

Edit the page to see the details.