Leidenfrost (talk | contribs) (stole the button, maybe) |
Leidenfrost (talk | contribs) m (try) |
||
Line 34: | Line 34: | ||
|lon=" + expeditionData[2] + "\n\ | |lon=" + expeditionData[2] + "\n\ | ||
|date=" + expeditionData[0] + "\n\ | |date=" + expeditionData[0] + "\n\ | ||
+ | |graticule_name=\n\ | ||
}}" | }}" | ||
var expeditionTemplate = meetupTemplate + "\n\ | var expeditionTemplate = meetupTemplate + "\n\ | ||
__NOTOC__\n\ | __NOTOC__\n\ | ||
− | == Location ==\n\ | + | ==Location==\n\ |
− | + | \n\ | |
+ | \n\ | ||
+ | ==Participants==\n\ | ||
\n\ | \n\ | ||
− | |||
− | |||
− | |||
*[[User:" + mw.config.values.wgUserName + "|" + mw.config.values.wgUserName + "]]\n\ | *[[User:" + mw.config.values.wgUserName + "|" + mw.config.values.wgUserName + "]]\n\ | ||
\n\ | \n\ | ||
− | == Plans == | + | ==Plans==\n\ |
− | |||
\n\ | \n\ | ||
− | |||
− | |||
\n\ | \n\ | ||
− | == | + | ==Expedition==\n\ |
− | |||
\n\ | \n\ | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
\n\ | \n\ | ||
− | == Achievements ==\n\ | + | ==Photos== \n\ |
+ | following later | ||
+ | \n\ | ||
+ | ==Achievements==\n\ | ||
{{#vardefine:ribbonwidth|100%}}\n\ | {{#vardefine:ribbonwidth|100%}}\n\ | ||
− | + | {{land geohash | latitude =" + expeditionData[1] + " | longitude = " + expeditionData[2] + " | date = " + expeditionData[0] + "}}\n\ | |
\n\ | \n\ | ||
− | |||
− | |||
[[Category:New report]]\n\ | [[Category:New report]]\n\ | ||
\n\ | \n\ | ||
− | |||
− | |||
− | |||
<!-- If this is a planning page:\n\ | <!-- If this is a planning page:\n\ | ||
[[Category:Expedition planning]]\n\ | [[Category:Expedition planning]]\n\ | ||
-->\n\ | -->\n\ | ||
\n\ | \n\ | ||
− | <!-- | + | <!--\n\ |
− | |||
− | |||
[[Category:Expeditions]]\n\ | [[Category:Expeditions]]\n\ | ||
− | |||
[[Category:Expeditions with photos]]\n\ | [[Category:Expeditions with photos]]\n\ | ||
[[Category:Expeditions with videos]]\n\ | [[Category:Expeditions with videos]]\n\ | ||
− | |||
-->\n\ | -->\n\ | ||
− | + | <!--\n\ | |
− | <!-- | ||
[[Category:Coordinates reached]]\n\ | [[Category:Coordinates reached]]\n\ | ||
\n\ | \n\ | ||
Line 94: | Line 77: | ||
[[Category:Coordinates not reached]]\n\ | [[Category:Coordinates not reached]]\n\ | ||
-- and a reason --\n\ | -- and a reason --\n\ | ||
− | |||
[[Category:Not reached - Mother Nature]]\n\ | [[Category:Not reached - Mother Nature]]\n\ | ||
\n\ | \n\ | ||
− | + | [[Category:Not reached - No public access]] | |
− | [[Category:Not reached - No public access]] | + | --> \n\ |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
"; | "; | ||
Revision as of 18:47, 12 August 2022
// <includeonly> function waitForWikiEditor(){ if(typeof $("#wpTextbox1").wikiEditor === "function"){ $("#wpTextbox1").wikiEditor("addToToolbar", { section: "main", group: "insert", tools: { buttonId: { label: "Expedition template", type: "button", icon: "https://geohashing.site/images/thumb/4/4c/Landgeohash.png/22px-Landgeohash.png", action: { type: "encapsulate", options: { post: expeditionTemplate } } } } }); } else{ setTimeout(waitForWikiEditor, 250); } } var expeditionRegex = /\d{4}-\d{2}-\d{2}_-?\d{1,3}_-?\d{1,3}/ var expeditionMatch = location.toString().match(expeditionRegex) if(expeditionMatch !== null && (mw.config.get(['wgAction']).wgAction === "edit" || mw.config.get(['wgAction']).wgAction === "submit")){ var expeditionData = expeditionMatch[0].split("_") var meetupTemplate = "{{meetup graticule\n\ |lat=" + expeditionData[1] + "\n\ |lon=" + expeditionData[2] + "\n\ |date=" + expeditionData[0] + "\n\ |graticule_name=\n\ }}" var expeditionTemplate = meetupTemplate + "\n\ __NOTOC__\n\ ==Location==\n\ \n\ \n\ ==Participants==\n\ \n\ *[[User:" + mw.config.values.wgUserName + "|" + mw.config.values.wgUserName + "]]\n\ \n\ ==Plans==\n\ \n\ \n\ ==Expedition==\n\ \n\ \n\ ==Photos== \n\ following later \n\ ==Achievements==\n\ {{#vardefine:ribbonwidth|100%}}\n\ {{land geohash | latitude =" + expeditionData[1] + " | longitude = " + expeditionData[2] + " | date = " + expeditionData[0] + "}}\n\ \n\ [[Category:New report]]\n\ \n\ <!-- If this is a planning page:\n\ [[Category:Expedition planning]]\n\ -->\n\ \n\ <!--\n\ [[Category:Expeditions]]\n\ [[Category:Expeditions with photos]]\n\ [[Category:Expeditions with videos]]\n\ -->\n\ <!--\n\ [[Category:Coordinates reached]]\n\ \n\ \n\ --><!-- or if you failed :(\n\ [[Category:Coordinates not reached]]\n\ -- and a reason --\n\ [[Category:Not reached - Mother Nature]]\n\ \n\ [[Category:Not reached - No public access]] --> \n\ "; $(document).ready(waitForWikiEditor); } // </includeonly>