Using templates from wikipedia?

Moderators: krankyd, Unholy

Using templates from wikipedia?

Postby AlanOfTheBerg » Fri Aug 24, 2012 3:11 pm

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?
Wiki Resources: Map Editing Manual | Oregon Project/To-Do List
Oregon-based US Country Manager | iPhone5 - VZ - iOS 7.0.6 | Waze v3.7.9.992
AlanOfTheBerg
Waze Global Champs
Waze Global Champs
 
Posts: 19459
Joined: Sat Aug 28, 2010 8:48 pm
Location: US Country Manager - Oregon, USA
Has thanked: 647 times
Been thanked: 2239 times

Re: Using templates from wikipedia?

Postby AlanOfTheBerg » Fri Aug 24, 2012 4:15 pm

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...
Wiki Resources: Map Editing Manual | Oregon Project/To-Do List
Oregon-based US Country Manager | iPhone5 - VZ - iOS 7.0.6 | Waze v3.7.9.992
AlanOfTheBerg
Waze Global Champs
Waze Global Champs
 
Posts: 19459
Joined: Sat Aug 28, 2010 8:48 pm
Location: US Country Manager - Oregon, USA
Has thanked: 647 times
Been thanked: 2239 times

Re: Using templates from wikipedia?

Postby AndyPoms » Fri Aug 24, 2012 4:20 pm

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
Image
Waze Champ & Forum Moderator
USA Country Manager
Senior Area Manager: State of Connecticut
Wiki: Editing | Best Practices | FAQ
AndyPoms
Waze Global Champs
Waze Global Champs
 
Posts: 5924
Joined: Tue Dec 27, 2011 1:34 pm
Location: Hartford, CT
Has thanked: 89 times
Been thanked: 883 times

Re: Using templates from wikipedia?

Postby AndyPoms » Sun Nov 24, 2013 12:13 pm

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?
Image
Waze Champ & Forum Moderator
USA Country Manager
Senior Area Manager: State of Connecticut
Wiki: Editing | Best Practices | FAQ
AndyPoms
Waze Global Champs
Waze Global Champs
 
Posts: 5924
Joined: Tue Dec 27, 2011 1:34 pm
Location: Hartford, CT
Has thanked: 89 times
Been thanked: 883 times

Re: Using templates from wikipedia?

Postby AndyPoms » Sun Nov 24, 2013 7:01 pm

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.
Image
Waze Champ & Forum Moderator
USA Country Manager
Senior Area Manager: State of Connecticut
Wiki: Editing | Best Practices | FAQ
AndyPoms
Waze Global Champs
Waze Global Champs
 
Posts: 5924
Joined: Tue Dec 27, 2011 1:34 pm
Location: Hartford, CT
Has thanked: 89 times
Been thanked: 883 times

Re: Using templates from wikipedia?

Postby kentsmith9 » Sun Apr 28, 2013 8:50 am

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: 3112
Joined: Mon Apr 23, 2012 3:33 pm
Location: SF/SJ Bay Area of Northern California
Has thanked: 515 times
Been thanked: 586 times

Re: Using templates from wikipedia?

Postby kentsmith9 » Fri Nov 22, 2013 3:59 pm

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: 3112
Joined: Mon Apr 23, 2012 3:33 pm
Location: SF/SJ Bay Area of Northern California
Has thanked: 515 times
Been thanked: 586 times

Re: Using templates from wikipedia?

Postby MiltH » Fri Aug 24, 2012 4:04 pm

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.
"Area Manager" for Midland & Odessa, TX, and the surrounding areas.

Image
MiltH
 
Posts: 34
Joined: Tue Jul 24, 2012 3:05 pm
Location: Odessa-Midland, Texas
Has thanked: 0 time
Been thanked: 0 time

Re: Using templates from wikipedia?

Postby sirKitKat » Fri Nov 22, 2013 12:10 am

Is this already solved?
Image
(This image represents the update cycle of the INTL map tiles. Time line marked in days (CET), the dotted square is an estimation of the next update, based on previous ones. The image is hosted on a free server witch is sometimes not available.)
sirKitKat
Waze Local Champs
Waze Local Champs
 
Posts: 566
Joined: Thu Nov 24, 2011 4:50 pm
Location: BE-Deinze / Waze wiki: Benelux
Has thanked: 232 times
Been thanked: 89 times

Re: Using templates from wikipedia?

Postby sirKitKat » Fri Nov 22, 2013 4:32 pm

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.
Image
(This image represents the update cycle of the INTL map tiles. Time line marked in days (CET), the dotted square is an estimation of the next update, based on previous ones. The image is hosted on a free server witch is sometimes not available.)
sirKitKat
Waze Local Champs
Waze Local Champs
 
Posts: 566
Joined: Thu Nov 24, 2011 4:50 pm
Location: BE-Deinze / Waze wiki: Benelux
Has thanked: 232 times
Been thanked: 89 times

Next

Return to Wiki Updates and Discussion

Who is online

Users browsing this forum: CBenson