Page 1 of 2

Using templates from wikipedia?

Posted: Fri Aug 24, 2012 3:11 pm
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?

Re: Using templates from wikipedia?

Posted: Fri Aug 24, 2012 4:15 pm
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...

Re: Using templates from wikipedia?

Posted: Fri Aug 24, 2012 4:20 pm
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

Re: Using templates from wikipedia?

Posted: Sun Nov 24, 2013 12:13 pm
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?

Re: Using templates from wikipedia?

Posted: Sun Nov 24, 2013 7:01 pm
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.

Re: Using templates from wikipedia?

Posted: Sun Apr 28, 2013 8:50 am
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.

Re: Using templates from wikipedia?

Posted: Fri Nov 22, 2013 3:59 pm
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.

Re: Using templates from wikipedia?

Posted: Fri Aug 24, 2012 4:04 pm
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.

Re: Using templates from wikipedia?

Posted: Fri Nov 22, 2013 12:10 am
by sirKitKat
Is this already solved?

Re: Using templates from wikipedia?

Posted: Fri Nov 22, 2013 4:32 pm
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.