META TOPICPARENT name="WebHome"
Create New Topic in TWiki Web > > > >
< < //<![CDATA[ > > /* <![CDATA[ */ /**
Checks if the entered topic name is a valid WikiWord . < < If so, enables the submit button, if not: enables the submit button
if the user allows non-WikiWords as topic name; otherwise disables the
submit button and returns 'false'. > > If so, enables the submit button, if not: enables the submit button if the user allows non-WikiWords as topic name; otherwise disables the submit button and returns 'false'. Automatically removes spaces from entered name.
Automatically strips illegal characters.
If non-WikiWords are not allowed, capitalizes words (separated by space). > > If non-WikiWords are allowed, capitalizes sentence. The generated topic name is written to a 'feedback' field.
@param inForm : pointer to the form
@param inShouldConvertInput : true: a new name is created from the entered name function canSubmit(inForm, inShouldConvertInput) {
var inputForTopicName = inForm.topic.value; > > if (inputForTopicName) return; < < // Topic names of zero length are not allowed > > /* Topic names of zero length are not allowed */ if (inputForTopicName.length == 0) {
disableSubmit(inForm.submit); < < // Update feedback field > > /* Update feedback field */ insertHtml("", "webTopicCreatorFeedback");
return false;
}
< < var userAllowsNonWikiWord = inForm.nonwikiword.checked; > > var hasNonWikiWordCheck = (inForm.nonwikiword = undefined);
var userAllowsNonWikiWord = true;
if (hasNonWikiWordCheck) {
userAllowsNonWikiWord = inForm.nonwikiword.checked;
} < < // check if current input is a valid WikiWord > > /* check if current input is a valid WikiWord */ var noSpaceName = removeSpacesAndPunctiation(inputForTopicName); < < // if necessary, create a WikiWord from the input name
// (when a non-WikiWord is not allowed) > > /*
if necessary, create a WikiWord from the input name
(when a non-WikiWord is not allowed)
*/ var wikiWordName = noSpaceName;
if (userAllowsNonWikiWord) {
wikiWordName = removeSpacesAndPunctiation(capitalize(inputForTopicName));
} > > if (userAllowsNonWikiWord) {
wikiWordName = removeSpacesAndPunctiation(capitalizeSentence(inputForTopicName));
}
if (inShouldConvertInput) { < < if (userAllowsNonWikiWord) inForm.topic.value = noSpaceName;
if (userAllowsNonWikiWord) inForm.topic.value = wikiWordName; > > if (hasNonWikiWordCheck && userAllowsNonWikiWord) {
inForm.topic.value = noSpaceName;
} else {
inForm.topic.value = wikiWordName;
} } < < // Update feedback field > > /* Update feedback field */ feedbackHeader = "Topic will be named: ";
feedbackText = feedbackHeader + wikiWordName;
insertHtml(feedbackText, "webTopicCreatorFeedback"); < < // Update hidden field value
// Use the negative value of the checkbox. This is the ugly way but must be used until edit script parameter allowsnonwikiword
is implemented. > > /*
Update hidden field value
Use the negative value of the checkbox. This is the ugly way but must be used until edit script parameter allowsnonwikiword
is implemented.
*/
if (hasNonWikiWordCheck && userAllowsNonWikiWord) { inForm.onlywikiname.value = userAllowsNonWikiWord ? "off" : "on"; < < > > } if (isWikiWord(wikiWordName) || userAllowsNonWikiWord) {
enableSubmit(inForm.submit);
return true; return false;
}
} > > function capitalizeSentence (inText) {
return inText.substr(0,1).toUpperCase() + inText.substr(1);
} /**
@param inState: true or false
*/
function setCheckBoxState (inCheckBox, inState) { > > if (! inCheckBox) return; inCheckBox.checked = inState;
}
function enableSubmit(inButton) { > > if (inButton) return; removeClass(inButton, "twikiSubmitDisabled");
inButton.disabled = false;
}
function disableSubmit(inButton) { > > if (inButton) return; addClass(inButton, "twikiSubmitDisabled");
inButton.disabled = true;
} < < //]]> > > /* ]]> */ < < > > < < Topic name:
<--generated name will be put here-->
> > Topic name:
<--generated name will be put here-->
Allow non WikiWord for the new topic name
< < It's usually best to choose a WikiWord for the new topic name, otherwise automatic linking may not work. Characters not allowed in topic names, such as spaces will automatically be removed. > > It's usually best to choose a WikiWord for the new topic name, otherwise automatic linking may not work. Characters not allowed in topic names, such as spaces will automatically be removed.
<--/twikiFormStep-->
< < Topic parent: > > Topic parent:
ATasteOfTWiki AccessKeys ActionTrackerPlugin ActionTrackerPluginQBE AdminDocumentationCategory AdminSkillsAssumptions AdminToolsCategory AnApplicationWithWikiForm AppendixEncodeURLsWithUTF8 AttachmentListPlugin BehaviourContrib BlackListPlugin BookView BreadCrumbsPlugin BulkRegistration BulkResetPassword BumpyWord CalendarPlugin CategoryCategory ChangeEmailAddress ChangePassword ClassMethod ClassicSkin ClassicSkinLogin CommentPlugin CommentPluginExamples CommentPluginTemplate CompareRevisionsAddOn CompareRevisionsAddonPlugin DeleteOrRenameATopic DeleteOrRenameAnAttachment DeveloperDocumentationCategory DontNotify EditDoesNotIncreaseTheRevision EditTablePlugin EmptyPlugin ExampleTopicTemplate FileAttachment FileAttribute FilterPlugin FlexWebListExamples FlexWebListNavi FlexWebListPlugin FlexWebListTree FootNotePlugin ForceNewRevision FormattedSearch GluePlugin GnuGeneralPublicLicense GoBox GoodStyle HiddenAttachment HierarchicalNavigation HierarchicalNavigationChildExample IfDefinedPlugin IfStatements IncludeTopicsAndWebPages InstalledPlugins InstantEnhancements InterWikis InterwikiPlugin JQueryPlugin JSCalendarContrib KupuContrib LanguageSelector LoginName MailerContrib MainFeatures ManagingTopics ManagingUsers ManagingWebs MoveTopic MySideBar MySideBarTemplate NatEditContrib NatEditContribJSUnitTests NatEditHelpText NatEditWordHelpText NatSearch NatSkin NatSkinConfiguration NatSkinCss NatSkinFAQ NatSkinPlugin NatSkinStyleBrowser NatSkinTemplates NewUserTemplate ObjectMethod PatternSkin PatternSkinColorSettings PatternSkinCss PatternSkinCssCookbook PatternSkinCssCookbookCenterPage PatternSkinCssCookbookCenterPageBorder PatternSkinCssCookbookEditTableStyle PatternSkinCssCookbookFonts PatternSkinCssCookbookNoLeftBar PatternSkinCssCookbookNoTopBar PatternSkinCustomization PatternSkinElements PatternSkinHeaderArt PatternSkinJavascripts PeterThoeny PlainSkin PreferencesPlugin PreviewBackground PrintSkin QuietSave RatingContrib RedDotPlugin RegistrationApprovals RegularExpression RenameWeb RenderListPlugin ResetPassword SearchDoesNotWork SearchHelp SearchPatternCookbook SimultaneousEdits SiteChanges SiteMap SitePermissions SlideShowPlugin SmiliesPlugin SourceCode SpreadSheetPlugin StandardColors StartingPoints StaticMethod TWikiAccessControl TWikiAccessControlExceptionDotPm TWikiAccessDotPm TWikiAddOns TWikiAttachDotPm TWikiAttrsDotPm TWikiClientApacheLoginDotPm TWikiClientDotPm TWikiClientTemplateLoginDotPm TWikiCompatibilityDotPm TWikiConfigureLoadDotPm TWikiConfigureUIsEXTENDDotPm TWikiContribs TWikiContributor TWikiCss TWikiDocGraphics TWikiDocumentation TWikiDotPm TWikiDownload TWikiEditingShorthand TWikiEnhancementRequests TWikiFAQ TWikiFaqTemplate TWikiFormDotPm TWikiForms TWikiFuncDotPm TWikiGlossary TWikiHistory TWikiI18NDotPm TWikiI18NExtractDotPm TWikiIfDotPm TWikiInstallationGuide TWikiJavascripts TWikiLogos TWikiMergeDotPm TWikiMetaData TWikiMetaDotPm TWikiNetDotPm TWikiOopsExceptionDotPm TWikiPlannedFeatures TWikiPluginDotPm TWikiPlugins TWikiPluginsDotPm TWikiPluralsDotPm TWikiPreferences TWikiPreferencesForm TWikiPrefsDotPm TWikiPrefsParserDotPm TWikiPrefsPrefsCacheDotPm TWikiReferenceManual TWikiRegistration TWikiReleaseNotes04x00 TWikiReleaseNotes04x01 TWikiRenderDotPm TWikiRenderingShortcut TWikiSandboxDotPm TWikiScripts TWikiSearchDotPm TWikiShorthand TWikiSite TWikiSiteTools TWikiSkinBrowser TWikiSkins TWikiStoreDotPm TWikiStoreRcsFileDotPm TWikiStoreRcsLiteDotPm TWikiStoreRcsWrapDotPm TWikiStoreSearchAlgorithmsForkingDotPm TWikiStoreSearchAlgorithmsNativeDotPm TWikiStoreSearchAlgorithmsPurePerlDotPm TWikiSystemRequirements TWikiTemplates TWikiTemplatesDotPm TWikiTimeDotPm TWikiTip001 TWikiTip002 TWikiTip003 TWikiTip004 TWikiTip005 TWikiTip006 TWikiTip007 TWikiTip008 TWikiTip009 TWikiTip010 TWikiTip011 TWikiTip012 TWikiTip013 TWikiTip014 TWikiTip015 TWikiTip016 TWikiTip017 TWikiTip018 TWikiTip019 TWikiTip020 TWikiTip021 TWikiTip022 TWikiTip023 TWikiTip024 TWikiTip025 TWikiTip026 TWikiTip027 TWikiTip028 TWikiTip029 TWikiTips TWikiTipsOfTheDay TWikiTipsOfTheDayAddNew TWikiTipsOfTheDayAdmin TWikiTipsOfTheDayInclude TWikiTipsOfTheDayTemplate TWikiTopics TWikiTutorial TWikiUIChangeFormDotPm TWikiUIDotPm TWikiUIEditDotPm TWikiUIManageDotPm TWikiUIOopsDotPm TWikiUIRDiffDotPm TWikiUIRegisterDotPm TWikiUISaveDotPm TWikiUISearchDotPm TWikiUIStatisticsDotPm TWikiUIUploadDotPm TWikiUIViewDotPm TWikiUpgradeGuide TWikiUserAuthentication TWikiUserDotPm TWikiUserSetting TWikiUsersApacheHtpasswdUserDotPm TWikiUsersDotPm TWikiUsersGuide TWikiUsersPasswordDotPm TWikiUsersTWikiUserMappingDotPm TWikiVariables TWikiVariablesQuickStart TWikiWebButtons TWikiWebCss TWikiWebLinks TWikiWebMoreTopicActions TWikiWebNothingFound TWikiWebRightBar TWikiWebSideBar TWikiWebTopicActions TWikiWebsTable TablePlugin TemplateWeb TextEditor TextFormattingFAQ TextFormattingRules TimBernersLee TimeInterval TipsContrib TreeBrowserPlugin TreePlugin TwistyContrib TwistyPlugin UserDocumentationCategory UserToolsCategory UsingHTML VarACTIVATEDPLUGINS VarALLVARIABLES VarAQUA VarATTACHURL VarATTACHURLPATH VarAUTHREALM VarBASETOPIC VarBASEWEB VarBB VarBB2 VarBB3 VarBB4 VarBLACK VarBLUE VarBR VarBROWN VarBULLET VarDATE VarDISPLAYTIME VarDISPLAYTIME2 VarENCODE VarENDCOLOR VarENDSECTION VarFAILEDPLUGINS VarFORMFIELD VarGMTIME VarGMTIME2 VarGRAY VarGREEN VarGROUPS VarH VarHOMETOPIC VarHTTP VarHTTPHOST VarHTTPS VarI VarICON VarICONURL VarICONURLPATH VarIF VarINCLUDE VarINCLUDINGTOPIC VarINCLUDINGWEB VarLANGUAGE VarLANGUAGES VarLIME VarLOCALSITEPREFS VarLOGIN VarLOGOUT VarM VarMAINWEB VarMAKETEXT VarMAROON VarMETA VarMETASEARCH VarN VarNAVY VarNOP VarNOTIFYTOPIC VarOLIVE VarORANGE VarP VarPINK VarPLUGINDESCRIPTIONS VarPLUGINVERSION VarPUBURL VarPUBURLPATH VarPURPLE VarQ VarQUERYPARAMS VarQUERYSTRING VarRED VarREMOTEADDR VarREMOTEPORT VarREMOTEUSER VarREVINFO VarREVINFO2 VarS VarSCRIPTNAME VarSCRIPTSUFFIX VarSCRIPTURL VarSCRIPTURL2 VarSCRIPTURLPATH VarSCRIPTURLPATH2 VarSEARCH VarSERVERTIME VarSERVERTIME2 VarSESSIONID VarSESSIONVAR VarSESSIONVARIABLE VarSILVER VarSPACEDTOPIC VarSPACEOUT VarSTARTINCLUDE VarSTARTSECTION VarSTATISTICSTOPIC VarSTOPINCLUDE VarT VarTEAL VarTOC VarTOC2 VarTOPIC VarTOPICLIST VarTOPICURL VarTWIKIWEB VarU VarURLPARAM VarUSERINFO VarUSERNAME VarVAR VarVBAR VarVOTE VarWEB VarWEBLIST VarWEBPREFSTOPIC VarWHITE VarWIKIHOMEURL VarWIKINAME VarWIKIPREFSTOPIC VarWIKITOOLNAME VarWIKIUSERNAME VarWIKIUSERSTOPIC VarWIKIVERSION VarX VarY VarYELLOW VotePlugin WabiSabi WebAtom WebAtomBase WebBottomBar WebChanges WebChangesAlert WebHome WebIndex WebLeftBar WebLeftBarCookbook WebLeftBarExample WebLeftBarLogin WebLeftBarPersonalTemplate WebLeftBarSearch WebLeftBarWebsList WebLinks WebNotify WebPreferences WebPreferencesHelp WebRss WebRssBase WebSearch WebSearchAdvanced WebSiteMap WebSiteTools WebStatistics WebTemplateTopics WebTopBar WebTopicCreator WebTopicEditTemplate WebTopicList WebTopicNonWikiTemplate WebTopicViewTemplate WelcomeGuest WhatDoesTWikiStandFor WhatIsWikiWiki WikiCulture WikiName WikiNotation WikiReferences WikiSyntax WikiSyntaxSummary WikiWikiClones WikiWord WysiwygPlugin WysiwygPluginTopicLister YouAreHere
(no parent, orphaned topic)
<--/twikiFormStep--> > > <--/twikiFormStep--> <--/twikiFormStep-->
<--/twikiFormSteps--> < <
> >
> >
Once you have created the topic, consider adding links in related topics to the new topic so that there are more ways people can discover it.