You are here:
STALklubben
>
System Web
>
TagMePlugin
>
TagMeCreateNewTag
(2010-02-10,
AdminUser
)
(raw view)
E
dit
A
ttach
---+!! Tag-me: Create New Tag %STARTINCLUDE% <table class="tagmeNavigation" border="0" cellpadding="3" cellspacing="0"><tr> <td> </td> <td bgcolor="#EAE9DE"> *Create New Tag* </td> <td> </td> <td bgcolor="#F6F4EB"> [[TagMeRenameTag][Rename Tag]] </td> <td> </td> <td bgcolor="#F6F4EB"> [[TagMeDeleteTag][Delete Tag]] </td> </tr></table> <table border="0" cellpadding="5" cellspacing="0" style="width:100%;"> <tr bgcolor="#EAE9DE"><td style="width:100%;"></td></tr> </table> %STARTSECTION{"create"}% Create a new tag - then add it to a topic. <noautolink>%TAGME{ tpaction="%URLPARAM{"newaction" default="nop"}%" tag="%URLPARAM{newtag}%" note="%URLPARAM{newtagnote}%" }%<form name="addtag" action="%SCRIPTURL{viewauth}%/%BASEWEB%/%BASETOPIC%" method="post" onsubmit="return cleanTag(this.newtag.value);"> <div class="foswikiFormSteps"> <div class="foswikiFormStep foswikiLast"> Name of new tag: <input type="text" class="foswikiInputField" name="newtag" id="newtag" size="30" value="%URLPARAM{"createtag"}%" onblur="this.value=cleanTag(this.value)" /> <input type="submit" class="foswikiSubmit" 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="Return to [<nop>[%URLPARAM{"from" default="%BASEWEB%.%HOMETOPIC%" }%]]" /> </form> </noautolink> %ENDSECTION{"create"}% %STARTSECTION{"existing"}% Existing tags: %TAGME{ tpaction="showalltags" format="[[%SCRIPTURL{view}%/%SYSTEMWEB%/TagMeSearch?tag=$tag][$tag]]" separator=", " }% %ENDSECTION{"existing"}% %STOPINCLUDE% %BR% <span class="foswikiGrayText">Other tag options: [[TagMeViewAllTags][View all tags]], [[TagMeViewMyTags][View my tags]], [[TagMeSearch][Search tags]]</span> %STARTSECTION{"cleanTagJavascript"}% <script language="javascript" type="text/javascript"> <!-- // <pre>-hide function cleanTag(inTagString) { var shouldTranslate = 0%TAGMEPLUGIN_NORMALIZE_TAG_INPUT%; var cleanName = ""; if (shouldTranslate) { 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"}%
E
dit
|
A
ttach
|
P
rint version
|
H
istory
: r2
<
r1
|
B
acklinks
|
V
iew topic
|
Ra
w
edit
|
M
ore topic actions
Topic revision: r2 - 2010-02-10 - 20:39:31 -
AdminUser
System
Internetbokning
Log In
(ej för bokning) or
Register
Toolbox
Users
Groups
Index
Search
Changes
Notifications
RSS Feed
Statistics
Preferences
User Reference
BeginnersStartHere
TextFormattingRules
Macros
FormattedSearch
QuerySearch
DocumentGraphics
SkinBrowser
InstalledPlugins
Admin Maintenance
Reference Manual
AdminToolsCategory
InterWikis
ManagingWebs
SiteTools
DefaultPreferences
WebPreferences
Categories
Admin Documentation
Admin Tools
Developer Doc
User Documentation
User Tools
Webs
Main
STALklubben
Sandbox
System
Deutsch
English
Svenska
Copyright © by the contributing authors. All material on this site is the property of the contributing authors.
Ideas, requests, problems regarding STALklubben?
Send feedback