Collaborama About Help Contact Anonymous [login] Source: site.view [edit] Function name: play Arguments: Description: Play page for SkillsRank Page type: html Render function: Module: skillsrank Page source: <webl> WubCall("skillsrank.incHeader", []); </webl> <webl> WubCall("skillsrank.incTop", ["play"]); </webl> <!-- content here ============================================================ --> <a name="content"></a> <h1>Play SkillsRank</h1> <webl> var res = ""; var uname = (wubinfo.fullname ? nil); if (uname != nil) then res = "Welcome, " + uname + ".<p>"; var accessToken = Wub_GetVaultValue("skillsrankLinkedInToken") ? nil; if (accessToken == nil) then res = res + `<a href="/webl/WubHub_DoIt?cmdline=skillsrank.oauthLinkedIn">Login to LinkedIn</a> to begin playing.<p>`; else var alreadyLoaded = (Wub_GetVaultValue("skillsrankLinkedInLoaded") == "true" ? false); if (!alreadyLoaded) then res = res + `You must first <a href="/webl/WubHub_DoIt?cmdline=skillsrank.getConnections">Load Connections</a> before you can play. This will take several minutes...<p>`; else res = res + ` <form action="/webl/WubHub_DoIt" method="post">` + "\n" + ` <input name="cmdline" value="skillsrank.cmdRankSkill(skill)" type="hidden"/>` + "\n" + ` Enter a skill, or leave empty to have SkillsRank choose one for you: <p> <input name="skill" value="" size="15" title="skill"/>` + "\n" + ` <input type="submit" value="Play!">` + "\n" + `</form><p>`; end end else res = `Please <a href="/webl/WubHub_DoIt?cmdline=skillsrank.login">Login</a> first to access this page.` end; res; </webl> </div> <webl> WubCall("skillsrank.incBottom", []); </webl> <webl> WubCall("skillsrank.incSidemenuNavSite", ["play"]); </webl> <webl> WubCall("skillsrank.incFooter", []); </webl>