Tags:
,
view all tags
<script type="text/javascript"> //<![CDATA[ function capitalize(inForm, inValue) { // only capitalize if user wants a WikiWord if (inForm.nonwikiword.checked == true) { return removeSpaces(inValue); } var sIn = inValue; var sOut = ''; var chgUpper = true; for ( var i = 0; i < sIn.length; i++ ) { var ch = sIn.charAt( i ); if( ch!=' ' ) { if( chgUpper ) { ch = ch.toUpperCase(); chgUpper = false; } } if( ch==' ' ) { chgUpper = true; } else { chgUpper = false; } sOut += ch; } return removeSpaces(sOut); } function removeSpaces(inValue) { var sIn = inValue; var sOut = ''; for ( var i = 0; i < sIn.length; i++ ) { var ch = sIn.charAt( i ); if( ch==' ' ) { chgUpper = true; continue; } sOut += ch; } return sOut; } function canSubmit(inForm) { inForm.topic.value = capitalize(inForm, inForm.topic.value); // Use the negative value of the checkbox. This is the ugly way but must be used until edit script parameter =allowsnonwikiword= is implemented. inForm.onlywikiname.value = (inForm.nonwikiword.checked == true) ? "off" : "on"; return true; } //]]> </script> <form name="newtopic" action="%SCRIPTURLPATH{edit}%/%BASEWEB%/" onsubmit="return canSubmit(this);"> ---+ %MAKETEXT{"Create New Topic in [_1] Web" args="<nop>%BASEWEB%"}% <div class="twikiFormSteps"> <div class="twikiFormStep"> ---+++ %MAKETEXT{"Topic name:"}% <p><input type="text" class="twikiInputField" name="topic" size="40" value="" onblur="this.value=capitalize(this.form, this.value);" /> <!-- TODO: move JS to a separate file and make it callable on click of the button too --> <!-- TODO: blank out all the irrelevant links: Edit, Compose, Attach, Printable, ... Raw text, versions, History, More topic actions: could this be a CSS? --> </p> <p><input type="checkbox" class="twikiCheckbox" id="nonwikiword" name="nonwikiword" /><label for="nonwikiword">%MAKETEXT{"Allow non <nop>WikiWord for the new topic name"}%</label></p> <p class="twikiGrayText">%MAKETEXT{"It's usually best to choose a <a target='WikiWord' onclick=\"return launchWindow('[_1]','WikiWord')\" href='[_1]' rel='nofollow'>WikiWord</a> for the new topic name, otherwise automatic linking may not work. Characters not allowed in topic names, such as spaces will automatically be removed." args="%TWIKIWEB%,%SCRIPTURLPATH{"view"}%/%TWIKIWEB%/WikiWord"}%</p> </div><!--/twikiFormStep--> <div class="twikiFormStep"> ---+++ %MAKETEXT{"Topic parent:"}% <select name="topicparent" size="10"> %TOPICLIST{"<option $marker value='$name'>$name</option>" separator=" " selection="%URLPARAM{ "parent" default="%MAKETEXT{"(no parent, orphaned topic)"}%" }%"}% <option value="">%MAKETEXT{"(no parent, orphaned topic)"}%</option> </select> </div><!--/twikiFormStep--> <div class="twikiFormStep twikiLast"> <input type="submit" class="twikiSubmit" value='%MAKETEXT{"Create this topic"}%' /> </div><!--/twikiFormStep--> </div><!--/twikiFormSteps--> <input type="hidden" name="onlywikiname" value="off" /> <input type="hidden" name="onlynewtopic" value="on" /> </form> %BR% <div class="twikiHelp"> %ICON{info}% %MAKETEXT{"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."}% </div>
Edit
|
Attach
|
P
rint version
|
H
istory
:
r8
|
r4
<
r3
<
r2
<
r1
|
B
acklinks
|
V
iew topic
|
Raw edit
|
More topic actions...
Topic revision: r2 - 2005-11-08
-
TWikiContributor
Home
Site map
Public web
Sandbox web
TWiki web
TWiki Web
User registration
Users
Groups
Index
Search
Changes
Notifications
RSS Feed
Statistics
Preferences
View
Raw View
Print version
Find backlinks
History
More topic actions
Edit
Raw edit
Attach file or image
Edit topic preference settings
Set new parent
More topic actions
User Reference
ATasteOfTWiki
TextFormattingRules
TWikiVariables
FormattedSearch
QuerySearch
TWikiDocGraphics
TWikiSkinBrowser
InstalledPlugins
Admin Maintenance
Reference Manual
InterWikis
ManagingUsers
ManagingWebs
TWikiSiteTools
TWikiPreferences
WebPreferences
Categories
Admin Documentation
Admin Tools
Developer Doc
User Documentation
User Tools
Account
Log In
Register User
Edit
Attach
Copyright © 1999-2025 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback
Note:
Please contribute updates to this topic on TWiki.org at
TWiki:TWiki.WebTopicCreator
.