Post Reply

Using templates from wikipedia?

Post by AlanOfTheBerg
I was/am frustrated that the Waze wiki templates for highway shields isn't working reliably for US or state highways. What I've found is that the simple template is referring to a static location for thumbnails and the files have recently either been purged or reorganized.

The wikipedia pages for highways and freeways use a series of what look to be very complex templates. One of the main ones appears to be http://en.wikipedia.org/wiki/Template:Jct/abbrev/USA.

I cannot find a way to reference an external template, so if that's possible, that would mostly solve my problem if someone could point out how to do that.

If not possible, how can we get a reliable way to access, via a template, the various images of interstate and highway shields found on wikipedia?
AlanOfTheBerg
EmeritusChamps
EmeritusChamps
Posts: 23627
Has thanked: 568 times
Been thanked: 3479 times

POSTER_ID:701618

1

Send a message
Wiki Resources: Map Editing Manual | alanoftheberg@gmail.com
Oregon-based US Ex-Global Champ Editor | iPhone13Pro - VZ

Post by AlanOfTheBerg
Yeah, I know I could copy stuff, but it appears that I would need to copy over several templates and I'm familiar enough with working with wiki to know how to follow the trail correctly and to get everything necessary copied over...
AlanOfTheBerg
EmeritusChamps
EmeritusChamps
Posts: 23627
Has thanked: 568 times
Been thanked: 3479 times
Send a message
Wiki Resources: Map Editing Manual | alanoftheberg@gmail.com
Oregon-based US Ex-Global Champ Editor | iPhone13Pro - VZ

Post by AndyPoms
I've tried to get a few templates working and I couldn't get them to work...

See:
https://www.waze.com/wiki/index.php/Template:Citation
https://www.waze.com/wiki/index.php/Template:Cite_web
AndyPoms
EmeritusChamps
EmeritusChamps
Posts: 7223
Has thanked: 65 times
Been thanked: 990 times
Send a message
https://www.waze.com/wiki/images/f/ff/W ... 00k_6c.png
Waze Champ & Forum Moderator
USA Country Manager
Senior Area Manager: State of Connecticut
Wiki: Editing | Best Practices | FAQ

Post by AndyPoms
sketch wrote:Has anyone attempted to add the templates? I'd love to get shields into the road naming by state chart.
Why not just add them as images? Why do you need a template to do it?
AndyPoms
EmeritusChamps
EmeritusChamps
Posts: 7223
Has thanked: 65 times
Been thanked: 990 times
Send a message
https://www.waze.com/wiki/images/f/ff/W ... 00k_6c.png
Waze Champ & Forum Moderator
USA Country Manager
Senior Area Manager: State of Connecticut
Wiki: Editing | Best Practices | FAQ

Post by AndyPoms
sketch wrote:Because then I don't have to make or find and resize a bunch of images?
I still don't see how templates would help here... The images have to come from somewhere & hotlinking is usually frowned upon.

Also, the wiki will resize images automatically - just upload the biggest/highest resolution one you can.
AndyPoms
EmeritusChamps
EmeritusChamps
Posts: 7223
Has thanked: 65 times
Been thanked: 990 times
Send a message
https://www.waze.com/wiki/images/f/ff/W ... 00k_6c.png
Waze Champ & Forum Moderator
USA Country Manager
Senior Area Manager: State of Connecticut
Wiki: Editing | Best Practices | FAQ

Post by kentsmith9
AlanOfTheBerg wrote:I was/am frustrated that the Waze wiki templates for highway shields isn't working reliably for US or state highways. What I've found is that the simple template is referring to a static location for thumbnails and the files have recently either been purged or reorganized.

The wikipedia pages for highways and freeways use a series of what look to be very complex templates. One of the main ones appears to be http://en.wikipedia.org/wiki/Template:Jct/abbrev/USA.

I cannot find a way to reference an external template, so if that's possible, that would mostly solve my problem if someone could point out how to do that.

If not possible, how can we get a reliable way to access, via a template, the various images of interstate and highway shields found on wikipedia?
The problem with this particular template is that it uses Parser Functions (one example is #SWITCH). For reference this is the code for the template you listed:

Code: Select all

{{#switch:{{{type|}}}
|I|Interstate|Future={{#ifeq:{{{type}}}|Future|Future }}{{#switch:{{{state|}}}
 |HI=H-{{{route}}}
 |PR=PRI-{{{route}}}
 |#default=I-{{{route}}}
 }}
|I-Spur=I-{{{route}}} Spur
|US|US-Alt|US-Bus|US-Byp|US-Conn|US-Scenic|US-Spur|US-Truck|US 1926|US 1926-Alt|US 1926-Bus|US 1926-Byp|US 1926-Conn|US 1926-Scenic|US 1926-Spur|US 1926-Truck|US 1948|US 1948-Alt|US 1948-Bus|US 1948-Byp|US 1948-Conn|US 1948-Scenic|US 1948-Spur|US 1948-Truck|US 1961|US 1961-Alt|US 1961-Bus|US 1961-Byp|US 1961-Conn|US 1961-Scenic|US 1961-Spur|US 1961-Truck={{#switch:{{{state|}}}
 |MI|VT={{Jct/abbrev/USA/US|state={{{state|}}}|type={{{type|}}}}}
 |#default=
 }}{{#switch:{{{state|}}}
 |AL|ID|KS|NE|OK|TN|UT=US-{{{route}}}
 |AR=U.S. {{{route}}}
 |#default=US {{{route}}}
 }}{{#switch:{{{state|}}}
 |MI|VT=
 |#default={{Jct/abbrev/USA/US|state={{{state|}}}|type={{{type|}}}}}
 }}
|FFH=FFH {{{route}}}
|#default={{Infobox road/{{{state}}}/abbrev {{{1}}}
|num={{{2}}}
|denom={{{denom|}}}
|county={{{county|}}}
|dab={{{dab|}}}
}}}}
Once we get the Parser Functions added to our Wiki we can start investigating these types of templates.
AndyPoms wrote:I've tried to get a few templates working and I couldn't get them to work...

See:
https://www.waze.com/wiki/index.php/Template:Citation
https://www.waze.com/wiki/index.php/Template:Cite_web
These templates use the #IF function that also require the Parser Functions.
kentsmith9
Waze Global Champs
Waze Global Champs
Posts: 5767
Has thanked: 816 times
Been thanked: 1157 times
Send a message

Post by kentsmith9
I know we did get more Parser Functions added, but I don't remember if I tested the SWITCH function and some of the others yet.
kentsmith9
Waze Global Champs
Waze Global Champs
Posts: 5767
Has thanked: 816 times
Been thanked: 1157 times
Send a message

Post by MiltH
In theory you could simply copy the source from the WP template you wanted to use, and recreate it in Waze's wiki. The one you want will be tough though, as it has templates imbedded in it, and uses images from Commons in the results.

I've done so much work on WP that I find it nearly impossible to get anything done on Waze's wiki. Spoiled, I guess.
MiltH
Posts: 34
Send a message
Former Area Manager for Midland & Odessa, TX, and the surrounding areas.

Post by sirKitKat
Is this already solved?
sirKitKat
Wiki Master
Wiki Master
Posts: 675
Has thanked: 244 times
Been thanked: 86 times
Send a message
https://wazebelgium.be/mapupdate/image?s=INTL$n=5
(This image represents the update cycle of the INTL map tiles CET. The NA version of this can be found here CT)

Post by sirKitKat
The switch function is working.
I'm becoming quite handy with templates. If you want me to take a look at or create a template, just let me know.
sirKitKat
Wiki Master
Wiki Master
Posts: 675
Has thanked: 244 times
Been thanked: 86 times
Send a message
https://wazebelgium.be/mapupdate/image?s=INTL$n=5
(This image represents the update cycle of the INTL map tiles CET. The NA version of this can be found here CT)