E
dit
A
ttach
P
rintable
r1 - 2013-11-23 - 15:17:50 - Main.sbeard
You are here:
TWiki
>
Deployment Web
>
TagMeCreateNewTag
<div id="header-title" style="padding: 10px 15px; border-width:1px; border-style:solid; border-color:#FFD28C; background-image: url(<nop>https://jazz.net/wiki/pub/Deployment/WebPreferences/TLASE.jpg); background-size: cover; font-size:120%"> ---+!! Tag-me: Create new tag %ENDCOLOR%</div></sticky> <sticky><div style="margin:15px;"></sticky> %STARTINCLUDE% <table class="tagmeNavigation" border="0" cellpadding="3" cellspacing="0"><tr> <td> </td> <td bgcolor="#FFF0CE" > *Create New Tag* </td> <td> </td> <td bgcolor="#C4DEF2" > [[%BASEWEB%.TagMeRenameTag][Rename Tag]] </td> <td> </td> <td bgcolor="#C4DEF2" > [[%BASEWEB%.TagMeDeleteTag][Delete Tag]] </td> </tr></table> <table border="0" cellpadding="5" cellspacing="0" style="width:100%;"> <tr bgcolor="#FFF0CE"><td style="width:100%;"></td></tr> </table> %STARTSECTION{"create"}% Create a new tag - Only Technical Leaders and Senior Editors can perform these operation at present. <noautolink><form name="addtag" action="%SCRIPTURL{viewauth}%/%BASEWEB%/%BASETOPIC%" method="post" onsubmit="return cleanTag(this.newtag.value);">%TAGME{ tpaction="%URLPARAM{"newaction" default="newtaginit"}%" tag="%URLPARAM{newtag}%" note="%URLPARAM{newtagnote}%" }% <div class="twikiFormSteps"> <div class="twikiFormStep twikiLast"> Name of new tag: <input type="text" class="twikiInputField" name="newtag" id="newtag" size="30" value="%URLPARAM{"createtag"}%" onblur="this.value=cleanTag(this.value)" /> <input %IF{"context inactive" then="disabled"}% type="submit" class="twikiSubmit" value="%MAKETEXT{"Create"}%" /> </div> </div> <input type="hidden" name="newaction" value="newtag" /> <input type="hidden" name="from" value="%URLPARAM{"from"}%" /> <input type="hidden" name="newtagnote" value="%IF{"defined from" then="Return to [<nop>[%URLPARAM{from}%]]"}%" /> </form> </noautolink> %ENDSECTION{"create"}% %STARTSECTION{"existing"}% Existing tags: %TAGME{ tpaction="showalltags" format="[[%SCRIPTURL{view}%/%BASEWEB%/TagMeSearch?tag=$tag][$tag]]" separator=", " }% %ENDSECTION{"existing"}% %DKGRAY% Other tag options: Other tag options: [[TagMeViewAllTags][View all tags]], %IF{"'%TAGMEPLUGIN_USER_AGNOSTIC%' = 'on'" else="[[TagMeViewMyTags][View my tags]], "}%[[TagMeSearch][Search tags]] %ENDCOLOR% %STARTSECTION{"cleanTagJavascript"}% <script language="javascript" type="text/javascript"> <!-- // <pre>-hide function cleanTag(inTagString) { var shouldTranslate = '%TAGMEPLUGIN_NORMALIZE_TAG_INPUT%'; var cleanName = ""; if (shouldTranslate == 'on') { cleanName = translateEntities(inTagString); } else { cleanName = makeSafe(inTagString); } return cleanName; } /** Translates international characters to ASCII. */ function translateEntities(inText) { var translated = ''; for ( var i = 0; i < inText.length; i++ ) { var ch = inText.charAt( i ); var chVal = ch.charCodeAt(0); var ch2 = ''; if( (chVal==192) || (chVal==193) || (chVal==194) || (chVal==195) ) { ch = 'A'; } if( chVal==196) { ch = 'A'; ch2 = 'E'; } if( chVal==197) { ch = 'A'; ch2 = 'A'; } if( chVal==198) { ch = 'A'; ch2 = 'E'; } if( chVal==199) { ch = 'C'; } if( (chVal==200) || (chVal==201) || (chVal==202) || (chVal==203) ) { ch = 'E'; } if( (chVal==204) || (chVal==205) || (chVal==206) || (chVal==207) ) { ch = 'I'; } if( chVal==208) { ch = 'd'; } if( chVal==209) { ch = 'N'; } if( (chVal==210) || (chVal==211) || (chVal==212) || (chVal==213) ) { ch = 'O'; } if( chVal==214) { ch = 'O'; ch2 = 'E'; } if( chVal==216) { ch = 'O'; ch2 = 'E'; } if( (chVal==217) || (chVal==218) || (chVal==219) ) { ch = 'U'; } if( chVal==220) { ch = 'U'; ch2 = 'E'; } if( chVal==221) { ch = 'Y'; } if( chVal==222) { ch = 'P'; } if( chVal==223) { ch = 's'; ch2 = 's'; } if( (chVal==224) || (chVal==225) || (chVal==226) || (chVal==227) ) { ch = 'a'; } if( chVal==228) { ch = 'a'; ch2 = 'e'; } if( chVal==229) { ch = 'a'; ch2 = 'a'; } if( chVal==230) { ch = 'a'; ch2 = 'e'; } if( chVal==231) { ch = 'c'; } if( (chVal==232) || (chVal==233) || (chVal==234) || (chVal==235) ) { ch = 'e'; } if( (chVal==236) || (chVal==237) || (chVal==238) || (chVal==239) ) { ch = 'i'; } if( chVal==240) { ch = 'd'; } if( chVal==241) { ch = 'n'; } if( (chVal==242) || (chVal==243) || (chVal==244) || (chVal==245) ) { ch = 'o'; } if( chVal==246) { ch = 'o'; ch2 = 'e'; } if( chVal==248) { ch = 'o'; ch2 = 'e'; } if( (chVal==249) || (chVal==250) || (chVal==251) ) { ch = 'u'; } if( chVal==252) { ch = 'u'; ch2 = 'e'; } if( chVal==253) { ch = 'y'; } if( chVal==254) { ch = 'p'; } if( chVal==255) { ch = 'y'; } ch = toUnderscore(ch); ch = ch.toLowerCase(); if( ((ch>='a')&&(ch<='z')) || ((ch>='0')&&(ch<='9')) || (ch=='_') ) { translated += ch } if( ch2!='' ) { translated += ch2; } } // remove double underscores var re = new RegExp(/_+/g); translated = translated.replace(re, "_"); return translated; } function toUnderscore (inChar) { if (inChar.length == 0) return ""; var safeChar = inChar; if( ((safeChar=='-') || (safeChar==' ') || (safeChar=='/')) ) { safeChar = '_'; } return safeChar; } function makeSafe (inText) { if (inText.length == 0) return ""; var re = new RegExp(/[\x01-\x1f^\#\,\'\"\|\*]/g); var perlSafeString = inText.replace(re, ""); return perlSafeString; } addLoadEvent(setHandyFocus); function setHandyFocus () { document.getElementById('newtag').focus(); } // </pre>-hide --> </script> %ENDSECTION{"cleanTagJavascript"}% %STOPINCLUDE% <sticky></div></sticky>
E
dit
|
A
ttach
|
P
rintable
|
V
iew topic
|
Backlinks:
We
b
,
A
l
l Webs
|
H
istory
: r1
|
M
ore topic actions
Deployment
Deployment web
Planning and design
Installing and upgrading
Migrating and evolving
Integrating
Administering
Monitoring
Troubleshooting
ELM SaaS
Community information and contribution guidelines
Create new topic
Topic list
Search
Advanced search
Notify
RSS
Atom
Changes
Statistics
Web preferences
NOTE: Please use the Sandbox web for testing
Status icon key:
To do
Under construction
New
Updated
Constant change
None - stable page
Smaller versions of status icons for inline text:
Copyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Contributions are governed by our
Terms of Use.
Please read the following
disclaimer
.