META TOPICPARENT
name="WebHome"
Create New Topic in TWiki Web > > > >
< < // > > /* /**
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 AdminDocumentationCategory AdminSkillsAssumptions AdminToolsCategory AnApplicationWithWikiForm AppendixEncodeURLsWithUTF8 BehaviourContrib BookView BreadCrumbsPlugin BulkRegistration BulkResetPassword BumpyWord CGISessionDotPm CGISessionDriverDBIDotPm CGISessionDriverDb_fileDotPm CGISessionDriverDotPm CGISessionDriverFileDotPm CGISessionDriverMysqlDotPm CGISessionDriverPostgresqlDotPm CGISessionDriverSqliteDotPm CGISessionErrorHandlerDotPm CGISessionIDIncrDotPm CGISessionIDMd5DotPm CGISessionSerializeDefaultDotPm CGISessionSerializeFreezethawDotPm CGISessionSerializeJsonDotPm CGISessionSerializeStorableDotPm CGISessionSerializeYamlDotPm CGISessionTutorialDotPm CategoryCategory ChangeEmailAddress ChangePassword ClassMethod ClassicSkin CommentPlugin CommentPluginExamples CommentPluginTemplate DeleteOrRenameATopic DeleteOrRenameAnAttachment DeveloperDocumentationCategory DontNotify EditDoesNotIncreaseTheRevision EditTablePlugin EmptyPlugin ExampleTopicTemplate FileAttachment FileAttribute FilterPlugin FlexWebListExamples FlexWebListNavi FlexWebListPlugin FlexWebListTree ForceNewRevision FormatTokens FormattedSearch GluePlugin GnuGeneralPublicLicense GoBox GoodStyle HeadlinesPlugin HiddenAttachment HierarchicalNavigation HierarchicalNavigationChildExample IfDefinedPlugin IfStatements IncludeTopicsAndWebPages InstalledPlugins InstantEnhancements InterWikis InterwikiPlugin JQueryPlugin JQueryTwistyPlugin JSCalendarContrib JSCalendarContribInline LanguageSelector LoginName MailerContrib MainFeatures ManagingTopics ManagingUsers ManagingWebs MonitorDotPm 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 PatternSkinGraphics PatternSkinHeaderArt PatternSkinWebCreateNewTopicTemplate PersonalPreferencesHelp PeterThoeny PlainSkin PreferencesPlugin PreviewBackground PrintSkin QuerySearch QuietSave RedDotPlugin RegistrationApprovals RegularExpression RenameWeb RenderListPlugin ResetPassword SearchDoesNotWork SearchHelp SearchPatternCookbook SimultaneousEdits SiteChanges SiteEditorsGroup SiteMap SitePermissions SlideShowPlugin SmiliesPlugin SourceCode SpreadSheetPlugin StandardColors StartingPoints StaticMethod TWikiAccessControl TWikiAccessControlExceptionDotPm TWikiAccessDotPm TWikiAddOns TWikiAggregateIteratorDotPm TWikiAttachDotPm TWikiAttrsDotPm TWikiCompatibilityDotPm TWikiConfigureLoadDotPm TWikiConfigureUIsEXTENDDotPm TWikiContribs TWikiContributor TWikiCss TWikiDocGraphics TWikiDocumentation TWikiDotPm TWikiDownload TWikiEditingShorthand TWikiEnhancementRequests TWikiFAQ TWikiFaqTemplate TWikiFormDotPm TWikiFormFieldDefinitionDotPm TWikiFormListFieldDefinitionDotPm TWikiFormSelectDotPm TWikiForms TWikiFuncDotPm TWikiGlossary TWikiHistory TWikiI18NDotPm TWikiI18NExtractDotPm TWikiIfNodeDotPm TWikiIfOP_iswebDotPm TWikiIfParserDotPm TWikiInfixErrorDotPm TWikiInfixNodeDotPm TWikiInfixParserDotPm TWikiInstallationGuide TWikiJavascripts TWikiLineIteratorDotPm TWikiListIteratorDotPm TWikiLoginManagerApacheLoginDotPm TWikiLoginManagerDotPm TWikiLoginManagerTemplateLoginDotPm TWikiLogos TWikiMergeDotPm TWikiMetaData TWikiMetaDotPm TWikiNetDotPm TWikiNetHTTPResponseDotPm TWikiNetSkin TWikiNetSkinColorSettings TWikiNetSkinPlugin TWikiNetSkinWebCreateNewTopicTemplate TWikiOopsExceptionDotPm TWikiPlannedFeatures TWikiPluginDotPm TWikiPlugins TWikiPluginsDotPm TWikiPluralsDotPm TWikiPreferences TWikiPreferencesForm TWikiPrefsDotPm TWikiPrefsParserDotPm TWikiPrefsPrefsCacheDotPm TWikiQueryHoistREsDotPm TWikiQueryNodeDotPm TWikiQueryParserDotPm TWikiReferenceManual TWikiRegistration TWikiReleaseNotes04x00 TWikiReleaseNotes04x01 TWikiReleaseNotes04x02 TWikiReleaseNotes04x03 TWikiRenderDotPm TWikiRenderingShortcut TWikiSandboxDotPm TWikiScripts TWikiSearchDotPm TWikiShorthand TWikiSite TWikiSiteTools TWikiSkinBrowser TWikiSkins TWikiStoreDotPm TWikiStoreQueryAlgorithmsBruteForceDotPm TWikiStoreRcsFileDotPm TWikiStoreRcsLiteDotPm TWikiStoreRcsWrapDotPm TWikiStoreSearchAlgorithmsForkingDotPm 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 TWikiUserMappingContrib TWikiUserMappingDotPm TWikiUserSetting TWikiUsersApacheHtpasswdUserDotPm TWikiUsersBaseUserMappingDotPm TWikiUsersDotPm TWikiUsersGuide TWikiUsersHtPasswdUserDotPm TWikiUsersPasswordDotPm TWikiUsersTemplate TWikiVariables TWikiVariablesQuickStart TWikiVariablesSearch TWikiWebButtons TWikiWebHtmlHead TWikiWebLinks TWikiWebMoreTopicActions TWikiWebNothingFound TWikiWebRightBar TWikiWebSideBar TWikiWebTopicActions TWikiWebsTable TablePlugin TemplateWeb TextEditor TextFormattingFAQ TextFormattingRules TimBernersLee TimeSpecifications TinyMCEPlugin TinyMCEQuickHelp TipsContrib TwistyContrib TwistyPlugin UserDocumentationCategory UserForm UserToolsCategory UsingHTML VarACTIVATEDPLUGINS VarALLVARIABLES VarAQUA VarATTACHURL VarATTACHURLPATH VarAUTHREALM VarBASETOPIC VarBASEWEB VarBB VarBB2 VarBB3 VarBB4 VarBLACK VarBLUE VarBR VarBROWN VarBULLET VarCALC VarCARET VarCOMMENT VarDATE VarDISPLAYTIME VarDISPLAYTIME2 VarEDITACTION VarEDITTABLE VarENCODE VarENDCOLOR VarENDSECTION VarENV 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 VarRENDERLIST VarREVINFO VarREVINFO2 VarS VarSCRIPTNAME VarSCRIPTSUFFIX VarSCRIPTURL VarSCRIPTURL2 VarSCRIPTURLPATH VarSCRIPTURLPATH2 VarSEARCH VarSERVERTIME VarSERVERTIME2 VarSESSIONID VarSESSIONVAR VarSESSIONVARIABLE VarSILVER VarSLIDESHOWEND VarSLIDESHOWSTART VarSPACEDTOPIC VarSPACEOUT VarSTARTINCLUDE VarSTARTSECTION VarSTATISTICSTOPIC VarSTOPINCLUDE VarSYSTEMWEB VarT VarTABLE VarTEAL VarTOC VarTOC2 VarTOPIC VarTOPICLIST VarTOPICURL VarTWIKIWEB VarU VarURLPARAM VarUSERINFO VarUSERNAME VarUSERSWEB VarVAR VarVBAR VarWEB VarWEBLIST VarWEBPREFSTOPIC VarWHITE VarWIKIHOMEURL VarWIKINAME VarWIKIPREFSTOPIC VarWIKITOOLNAME VarWIKIUSERNAME VarWIKIUSERSTOPIC VarWIKIVERSION VarX VarY VarYELLOW WabiSabi WebAtom WebAtomBase WebBottomBar WebChanges WebChangesAlert WebCreateNewTopic WebCreateNewTopicTemplate WebHome WebIndex WebLeftBar WebLeftBarCookbook WebLeftBarExample WebLeftBarLogin WebLeftBarPersonalTemplate WebLeftBarSearch WebLeftBarWebsList WebLinks WebNotify WebPreferences WebPreferencesHelp WebRss WebRssBase WebSearch WebSearchAdvanced WebSiteTools WebStatistics WebTemplateTopics WebTopBar WebTopicCreator WebTopicEditTemplate WebTopicList WebTopicNonWikiTemplate WebTopicViewTemplate WelcomeGuest WhatDoesTWikiStandFor WhatIsWikiWiki WikiCulture WikiName WikiNotation WikiReferences WikiSyntax WikiSyntaxSummary WikiWikiClones WikiWord WikiwygContrib WysiwygPlugin WysiwygPluginSettings 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.