Skip to content

Commit

Permalink
Item15218: implement homeweb feature
Browse files Browse the repository at this point in the history
only use %USERSWEB when refering to a user topic. anything else most probably should be %HOMEWEB
  • Loading branch information
MichaelDaum committed Sep 29, 2023
1 parent 1bd7698 commit 10d49fb
Show file tree
Hide file tree
Showing 45 changed files with 184 additions and 154 deletions.
2 changes: 1 addition & 1 deletion EmptyPlugin/lib/Foswiki/Plugins/EmptyPlugin.pm
Expand Up @@ -111,7 +111,7 @@ our $SHORTDESCRIPTION = '%$CREATED_SHORTDESCRIPTION%';
# is not recommended. Instead, leave $NO_PREFS_IN_TOPIC at 1 and use
# =$Foswiki::cfg= entries, or if you want the users
# to be able to change settings, then use standard Foswiki preferences that
# can be defined in your %USERSWEB%.%LOCALSITEPREFS% and overridden at the web
# can be defined in your %LOCALSITEPREFS% and overridden at the web
# and topic level.
#
# %SYSTEMWEB%.DevelopingPlugins has details of how to define =$Foswiki::cfg=
Expand Down
8 changes: 4 additions & 4 deletions InterwikiPlugin/data/System/InterWikis.txt
@@ -1,4 +1,4 @@
%META:TOPICINFO{author="ProjectContributor" comment="" date="1655899072" format="1.1" version="1"}%
%META:TOPICINFO{author="ProjectContributor" comment="" date="1696003379" format="1.1" version="1"}%
%META:TOPICPARENT{name="InterwikiPlugin"}%
---+ <nop>Inter-Wiki Link Rules (or Links to other Sites)

Expand All @@ -20,14 +20,14 @@ See %SYSTEMWEB%.InterwikiPlugin for more details on specifiying the INTERLINKFOR
#AddingYourOwn
---+++ Adding your own Inter-Wiki Links

Rather than adding your own inter-wiki links to this topic, the recommended approach is to create a topic in your %USERSWEB% Web, for example [[%USERSWEB%.InterWikis]].
Rather than adding your own inter-wiki links to this topic, the recommended approach is to create a topic in your %HOMEWEB% Web, for example [[%HOMEWEB%.InterWikis]].
You can then set the =INTERWIKIPLUGIN_RULESTOPIC= preference setting in [[%LOCALSITEPREFS%]] as follows:

<pre class="tml">
* Set INTERWIKIPLUGIN_RULESTOPIC = %SYSTEMWEB%.InterWikis, %USERSWEB%.InterWikis
* Set INTERWIKIPLUGIN_RULESTOPIC = %SYSTEMWEB%.InterWikis, %HOMEWEB%.InterWikis
</pre>

Any inter-wikis you add to [[%USERSWEB%.InterWikis]] will then be available in the same way that the inter-wikis from here are. If you create a rule in [[%USERSWEB%.InterWikis]] which has the same alias as a rule in this topic, the rule from [[%USERSWEB%.InterWikis]] will take preference.
Any inter-wikis you add to [[%HOMEWEB%.InterWikis]] will then be available in the same way that the inter-wikis from here are. If you create a rule in [[%HOMEWEB%.InterWikis]] which has the same alias as a rule in this topic, the rule from [[%HOMEWEB%.InterWikis]] will take preference.

---+++ General Inter-Site Links

Expand Down
4 changes: 2 additions & 2 deletions JQueryPlugin/data/System/JQueryUIAutocomplete.txt
@@ -1,4 +1,4 @@
%META:TOPICINFO{author="ProjectContributor" date="1574078050" format="1.1" version="1"}%
%META:TOPICINFO{author="ProjectContributor" date="1696003379" format="1.1" version="1"}%
%META:TOPICPARENT{name="JQueryPlugin"}%
---+!! %TOPIC%
%JQPLUGINS{"ui::autocomplete"
Expand Down Expand Up @@ -223,7 +223,7 @@ var countryList = [
<table class='foswikiLayoutTable'>
<tr>
<th>Topic:</th>
<td><input class="foswikiInputField" size="60" autocomplete="%SCRIPTURL{"view"}%/%SYSTEMWEB%/JQueryAjaxHelper?section=topic;skin=text;baseweb=%USERSWEB%" /></td>
<td><input class="foswikiInputField" size="60" autocomplete="%SCRIPTURL{"view"}%/%SYSTEMWEB%/JQueryAjaxHelper?section=topic;skin=text;baseweb=%HOMEWEB%" /></td>
</tr>
<tr>
<th>Country:</th>
Expand Down
Expand Up @@ -111,7 +111,7 @@ sub new {

# get topic parameter and set the context
my ( $web, $topic ) =
Foswiki::Func::normalizeWebTopicName( $Foswiki::cfg{UsersWebName},
Foswiki::Func::normalizeWebTopicName( $Foswiki::cfg{HomeWebName},
$this->param('topic') || $Foswiki::cfg{HomeTopicName} );

writeDebug("switching context to $web.$topic") if TRACE;
Expand Down
4 changes: 2 additions & 2 deletions ModPerlEngineContrib/data/System/ModPerlEngineContrib.txt
@@ -1,4 +1,4 @@
%META:TOPICINFO{author="ProjectContributor" date="1691320505" format="1.1" version="1"}%
%META:TOPICINFO{author="ProjectContributor" date="1696003379" format="1.1" version="1"}%
---+!! !ModPerlEngineContrib
%FORMFIELD{"Description"}%

Expand Down Expand Up @@ -96,7 +96,7 @@ Go to =Store Settings=:
attachments.

Note that this should be kept in sync with the Foswiki =ATTACHFILESIZELIMIT=,
set in %USERSWEB%.SitePreferences, default taken from
set in %HOMEWEB%.SitePreferences, default taken from
%SYSTEMWEB%.SitePreferences.
<verbatim>
<IfModule mod_perl.c>
Expand Down
38 changes: 19 additions & 19 deletions PatternSkin/data/System/PatternSkin.txt
@@ -1,4 +1,4 @@
%META:TOPICINFO{author="ProjectContributor" date="1655468868" format="1.1" version="1"}%
%META:TOPICINFO{author="ProjectContributor" date="1696003379" format="1.1" version="1"}%
%META:TOPICPARENT{name="Skins"}%
%STARTINCLUDE%
---+!! Pattern skin
Expand Down Expand Up @@ -80,7 +80,7 @@ The =Edit= and =Edit wiki text= buttons simply add =;action=text= or =;action=fo

---+++ Installation
<div class="foswikiNotification"> *Compatibility with Foswiki 1.1 has been restored. However system changes are required:*
* The SKIN must be overridden to "pattern01x01,pattern". You can safely set this in your %USERSWEB%.SitePreferences before upgrading this extension.
* The SKIN must be overridden to "pattern01x01,pattern". You can safely set this in your %HOMEWEB%.SitePreferences before upgrading this extension.
* #Set SKIN = pattern01x01,pattern
* You must not manually install by extracting the archive directly into your Foswiki instance. You must use the Extension Installer. The installer will omit two files which are incompatible and must not be installed on Foswiki 1.1.
* =data/System/WebCreateNewTopicComponents.txt=
Expand Down Expand Up @@ -275,20 +275,20 @@ For further troubleshooting and feedback, go to http://foswiki.org/Support/%TOPI
%META:FIELD{name="Repository" title="Repository" value="https://github.com/foswiki/distro"}%
%META:FIELD{name="Support" title="Support" value="http://foswiki.org/Support/%25$ROOTMODULE%25"}%
%META:FIELD{name="Version" title="Version" value="%25$VERSION%25"}%
%META:FILEATTACHMENT{name="print.css.gz" attr="h" comment="" date="1655468868" size="786" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="header3.gif" attr="h" comment="" date="1655468868" size="33112" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="patternskin_screenshot.png" attr="h" comment="" date="1655468868" size="129505" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="foswiki_edit_01x01_src.js" attr="h" comment="" date="1655468868" size="2618" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="header1.gif" attr="h" comment="" date="1655468868" size="20605" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="pattern.js" attr="h" comment="" date="1655468868" size="1305" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="header2.gif" attr="h" comment="" date="1655468868" size="41616" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="header5.gif" attr="h" comment="" date="1655468868" size="20639" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="pattern_src.js" attr="h" comment="" date="1655468868" size="1732" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="foswiki_edit_01x01.js.gz" attr="h" comment="" date="1655468868" size="474" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="pattern.js.gz" attr="h" comment="" date="1655468868" size="620" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="print.css" attr="h" comment="" date="1655468868" size="3869" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="headers.psd" attr="h" comment="" date="1655468868" size="8499470" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="header4.gif" attr="h" comment="" date="1655468868" size="92238" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="patternskin_screenshot_full.png" attr="h" comment="" date="1655468868" size="177943" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="foswiki_edit_01x01.js" attr="h" comment="" date="1655468868" size="1007" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="print_src.css" attr="h" comment="" date="1655468868" size="5545" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="print.css.gz" attr="h" comment="" date="1696003379" size="786" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="header3.gif" attr="h" comment="" date="1696003379" size="33112" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="patternskin_screenshot.png" attr="h" comment="" date="1696003379" size="129505" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="foswiki_edit_01x01_src.js" attr="h" comment="" date="1696003379" size="2618" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="header1.gif" attr="h" comment="" date="1696003379" size="20605" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="pattern.js" attr="h" comment="" date="1696003379" size="1305" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="header2.gif" attr="h" comment="" date="1696003379" size="41616" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="header5.gif" attr="h" comment="" date="1696003379" size="20639" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="pattern_src.js" attr="h" comment="" date="1696003379" size="1732" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="foswiki_edit_01x01.js.gz" attr="h" comment="" date="1696003379" size="474" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="pattern.js.gz" attr="h" comment="" date="1696003379" size="620" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="print.css" attr="h" comment="" date="1696003379" size="3869" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="headers.psd" attr="h" comment="" date="1696003379" size="8499470" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="header4.gif" attr="h" comment="" date="1696003379" size="92238" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="patternskin_screenshot_full.png" attr="h" comment="" date="1696003379" size="177943" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="foswiki_edit_01x01.js" attr="h" comment="" date="1696003379" size="1007" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="print_src.css" attr="h" comment="" date="1696003379" size="5545" user="ProjectContributor" version="1"}%
@@ -1,12 +1,12 @@
%META:TOPICINFO{author="ProjectContributor" date="1655468868" format="1.1" version="1"}%
%META:TOPICINFO{author="ProjectContributor" date="1696003379" format="1.1" version="1"}%
%META:TOPICPARENT{name="PatternSkin"}%
---+!! <nop>PatternSkin horizontal navigation example

Include main navigation with:
<verbatim class="tml">
%INCLUDE{"PatternSkinHorizontalNavigationExample" section="main"}%
</verbatim>
This is done automatically in the templates by setting in the %USERSWEB%.SitePreferences:
This is done automatically in the templates by setting in the %HOMEWEB%.SitePreferences:
* #Set PATTERNSKIN_NAVIGATION_TOPIC = %SYSTEMWEB%.PatternSkinHorizontalNavigationExample

---++ Include sections
Expand All @@ -16,9 +16,9 @@ This is done automatically in the templates by setting in the %USERSWEB%.SitePre
"%SYSTEMWEB%.PatternSkinNavigation"
section="topbarbutton"
ID=""
DESTWEB="%USERSWEB%"
DESTWEB="%HOMEWEB%"
DESTTOPIC="%HOMETOPIC%"
LABEL="%USERSWEB%"
LABEL="%HOMEWEB%"
}%
%INCLUDE{
"%SYSTEMWEB%.PatternSkinNavigation"
Expand Down
@@ -1,12 +1,12 @@
%META:TOPICINFO{author="ProjectContributor" date="1655468868" format="1.1" version="1"}%
%META:TOPICINFO{author="ProjectContributor" date="1696003379" format="1.1" version="1"}%
%META:TOPICPARENT{name="PatternSkinFatwillyTheme"}%
---+!! <nop>PatternSkin theme: Foswiki "Fat Willy" Site Skin - Navigation

Include main navigation with:
<verbatim class="tml">
%INCLUDE{"%SYSTEMWEB%.PatternSkinThemeFatWillyNavigation" section="main"}%
</verbatim>
This is done automatically in the templates by setting in the %USERSWEB%.SitePreferences:
This is done automatically in the templates by setting in the %HOMEWEB%.SitePreferences:
* #Set PATTERNSKIN_NAVIGATION_TOPIC = %SYSTEMWEB%.PatternSkinThemeFatWillyNavigation

Include meta navigation with:
Expand Down Expand Up @@ -73,6 +73,6 @@ Include meta navigation with:
"context registration_supported AND context registration_enabled"
then="%MAKETEXT{"or"}% [[%SYSTEMWEB%.UserRegistration][%MAKETEXT{"Register"}%]]"
}%</li>'
}%<li>[[%USERSWEB%.%WIKIUSERSTOPIC%][Users]]</li></ul></div>%ENDSECTION{"meta"}%
}%<li>[[%HOMEWEB%.%WIKIUSERSTOPIC%][Users]]</li></ul></div>%ENDSECTION{"meta"}%
</verbatim>
%META:PREFERENCE{name="ALLOWTOPICVIEW" title="ALLOWTOPICVIEW" type="Set" value="*"}%
4 changes: 2 additions & 2 deletions PatternSkin/data/System/WebCreateNewTopicComponents.txt
@@ -1,4 +1,4 @@
%META:TOPICINFO{author="ProjectContributor" date="1500085204" format="1.1" version="1"}%
%META:TOPICINFO{author="ProjectContributor" date="1696003379" format="1.1" version="1"}%
%META:TOPICPARENT{name="WebHome"}%
---+!! <nop>%TOPIC%
This topic is meant for developers. It contains =INCLUDE= sections to build a "create new topic" form.
Expand All @@ -22,7 +22,7 @@ Create a form with an "auto increment" name, and with customised INCLUDE section
"%SYSTEMWEB%.WebCreateNewTopicComponents"
section="newtopic"
newtopic="TestTopicAUTOINC0"
override="%USERSWEB%.TopicFields,%BASEWEB%.TopicFieldsForWeb"
override="%HOMEWEB%.TopicFields,%BASEWEB%.TopicFieldsForWeb"
}%
</verbatim>

Expand Down
Expand Up @@ -122,7 +122,7 @@ sub test_getScriptUrl {
$this->assert_matches( qr!/$ss/$this->{users_web}/WebHome!, $result );

$result = TWiki::Func::getScriptUrl( "", "WebHome", 'wibble' );
$this->assert_matches( qr!/$ss/$this->{users_web}/WebHome!, $result );
$this->assert_matches( qr!/$ss/$this->{home_web}/WebHome!, $result );

my $q = Unit::Request->new( {} );
$q->path_info('/Sausages/AndMash');
Expand All @@ -133,7 +133,7 @@ sub test_getScriptUrl {
$this->assert_matches( qr!/$ss/Sausages/AndMash!, $result );

$result = TWiki::Func::getScriptUrl( "", "AndMash", 'wibble' );
$this->assert_matches( qr!/$ss/$this->{users_web}/AndMash!, $result );
$this->assert_matches( qr!/$ss/$this->{home_web}/AndMash!, $result );
$this->createNewFoswikiSession();

return;
Expand Down Expand Up @@ -456,11 +456,11 @@ sub test_normalizeWebTopicName {
$this->assert_str_equals( 'Web', $w );
$this->assert_str_equals( 'Topic', $t );
( $w, $t ) = TWiki::Func::normalizeWebTopicName( '', 'Topic' );
$this->assert_str_equals( $TWiki::cfg{UsersWebName}, $w );
$this->assert_str_equals( 'Topic', $t );
$this->assert_str_equals( $TWiki::cfg{HomeWebName}, $w );
$this->assert_str_equals( 'Topic', $t );
( $w, $t ) = TWiki::Func::normalizeWebTopicName( '', '' );
$this->assert_str_equals( $TWiki::cfg{UsersWebName}, $w );
$this->assert_str_equals( 'WebHome', $t );
$this->assert_str_equals( $TWiki::cfg{HomeWebName}, $w );
$this->assert_str_equals( 'WebHome', $t );
( $w, $t ) = TWiki::Func::normalizeWebTopicName( '', 'Web/Topic' );
$this->assert_str_equals( 'Web', $w );
$this->assert_str_equals( 'Topic', $t );
Expand All @@ -470,6 +470,9 @@ sub test_normalizeWebTopicName {
( $w, $t ) = TWiki::Func::normalizeWebTopicName( 'Web1', 'Web2.Topic' );
$this->assert_str_equals( 'Web2', $w );
$this->assert_str_equals( 'Topic', $t );
( $w, $t ) = TWiki::Func::normalizeWebTopicName( '%HOMEWEB%', 'Topic' );
$this->assert_str_equals( $TWiki::cfg{HomeWebName}, $w );
$this->assert_str_equals( 'Topic', $t );
( $w, $t ) = TWiki::Func::normalizeWebTopicName( '%USERSWEB%', 'Topic' );
$this->assert_str_equals( $TWiki::cfg{UsersWebName}, $w );
$this->assert_str_equals( 'Topic', $t );
Expand Down
6 changes: 3 additions & 3 deletions TinyMCEPlugin/data/System/TinyMCEPlugin.txt
@@ -1,4 +1,4 @@
%META:TOPICINFO{author="ProjectContributor" date="1655468868" format="1.1" version="1"}%
%META:TOPICINFO{author="ProjectContributor" date="1696003379" format="1.1" version="1"}%
%META:TOPICPARENT{name="Plugins"}%
---+!! !TinyMCEPlugin
%FORMFIELD{"Description"}%
Expand Down Expand Up @@ -180,9 +180,9 @@ Below is the default configuration. If it is to be modified, it should be copied
%ENDTWISTY%

Example:
* Create <nop>%USERSWEB%.TinyMCEPlugin, copying the text above
* Create <nop>%HOMEWEB%.TinyMCEPlugin, copying the text above
* Update the =TINYMCEPLUGIN_INIT_TOPIC= variable to point to the newly created topic, Eg. in %LOCALSITEPREFS% or any <nop>%WEBPREFSTOPIC%:%BR%\
<verbatim class="tml"> * Set TINYMCEPLUGIN_INIT_TOPIC = %USERSWEB%.TinyMCEPlugin</verbatim>
<verbatim class="tml"> * Set TINYMCEPLUGIN_INIT_TOPIC = %HOMEWEB%.TinyMCEPlugin</verbatim>

---+++ Settings
| *Variable* | *Default* | *Description* |
Expand Down
8 changes: 4 additions & 4 deletions TipsContrib/data/System/TipTopic029.txt
@@ -1,14 +1,14 @@
%META:TOPICINFO{author="ProjectContributor" date="1421599458" format="1.1" version="1"}%
%META:TOPICINFO{author="ProjectContributor" date="1696003196" format="1.1" version="1"}%
%META:TOPICPARENT{name="TipsOfTheDay"}%
---+ <nop>RSS news feed of topic changes

You can use an RSS news reader to find out what is new in a Foswiki web. This complements WebChanges that shows recent changes in a web, and WebNotify where people can subscribe to get notified of recent changes by e-mail.

For the %USERSWEB% web, point your RSS news reader to:
For the %HOMEWEB% web, point your RSS news reader to:

<code> %SCRIPTURL%/view%SCRIPTSUFFIX%/%USERSWEB%/WebRss </code>
<code> %SCRIPTURL%/view%SCRIPTSUFFIX%/%HOMEWEB%/WebRss </code>

For other Foswiki webs, replace =/%USERSWEB%/= with the name of the web:
For other Foswiki webs, replace =/%HOMEWEB%/= with the name of the web:

%WEBLIST{ format=" * <code> %SCRIPTURL%/view%SCRIPTSUFFIX%/$name/WebRss </code>" }%

Expand Down
6 changes: 3 additions & 3 deletions TipsContrib/data/System/TipsOfTheDay.txt
@@ -1,11 +1,11 @@
%META:TOPICINFO{author="ProjectContributor" date="1436997088" format="1.1" version="1"}%
%META:TOPICINFO{author="ProjectContributor" date="1696003196" format="1.1" version="1"}%
%META:TOPICPARENT{name="TipsContrib"}%
---+ Tips Of The Day

These are all tips of the day. They are located in the %SYSTEMWEB% web (official distribution tips) and %USERSWEB% web (custom tips).
These are all tips of the day. They are located in the %SYSTEMWEB% web (official distribution tips) and %HOMEWEB% web (custom tips).

---++ Custom (local) tips
%SEARCH{ "^CustomTipTopic[0-9A-Z]" web="%USERSWEB%" topic="CustomTipTopic*" scope="topic" type="regex" casesensitive="on" nosearch="on" nototal="on" format=" * [[$web.$topic][$pattern(.*?\-\-\-\+([^\n\r]+).*)]]:$n() $summary(noheader, 100)$n()$percntCALC{$SETM(ctotal, +1)}$percnt"}%
%SEARCH{ "^CustomTipTopic[0-9A-Z]" web="%HOMEWEB%" topic="CustomTipTopic*" scope="topic" type="regex" casesensitive="on" nosearch="on" nototal="on" format=" * [[$web.$topic][$pattern(.*?\-\-\-\+([^\n\r]+).*)]]:$n() $summary(noheader, 100)$n()$percntCALC{$SETM(ctotal, +1)}$percnt"}%
-Total: %CALC{$GET(ctotal)}% Custom tips

---++ System tips
Expand Down
8 changes: 4 additions & 4 deletions TipsContrib/data/System/TipsOfTheDayAddNew.txt
@@ -1,16 +1,16 @@
%META:TOPICINFO{author="ProjectContributor" date="1436997088" format="1.1" version="1"}%
%META:TOPICINFO{author="ProjectContributor" date="1696003196" format="1.1" version="1"}%
%META:TOPICPARENT{name="TipsOfTheDayAdmin"}%
---+ Add New Tip Of The Day

There are *Custom Tips* maintained on your local %WIKITOOLNAME% installation, *Official Tips* distributed with the Tips Contrib, and *Plugin Tips* maintained by Plugin authors.

---++ Add a Custom %WIKITOOLNAME% Tip

Custom tips are located in the %USERSWEB% web. You can add custom tips that are specific to your installation and to your organization in general.
Custom tips are located in the %HOMEWEB% web. You can add custom tips that are specific to your installation and to your organization in general.

<form name="newlocal" action="%SCRIPTURLPATH%/edit%SCRIPTSUFFIX%/%USERSWEB%/">
<form name="newlocal" action="%SCRIPTURLPATH%/edit%SCRIPTSUFFIX%/%HOMEWEB%/">
<!--
| Last topic: | %CALC{$SET(ctopic, %SEARCH{ "CustomTipTopic[0-9]" scope="topic" web="%USERSWEB%" type="regex" nosearch="on" nototal="on" reverse="on" limit="1" format="$topic" }%)$GET(ctopic)}% |
| Last topic: | %CALC{$SET(ctopic, %SEARCH{ "CustomTipTopic[0-9]" scope="topic" web="%HOMEWEB%" type="regex" nosearch="on" nototal="on" reverse="on" limit="1" format="$topic" }%)$GET(ctopic)}% |
| Next available: | %CALC{$SET(cnext, $INT($VALUE($GET(ctopic)) + 1))$GET(cnext)}% |
| Zero pad to 3: | %CALC{$SET(cnext, $REPLACE(0000$GET(cnext),1,$INT(1 + $LENGTH($GET(cnext)))))$GET(cnext)}% |
| New topic name: | %CALC{$SET(ctopic, CustomTipTopic$GET(cnext))$GET(ctopic)}% |
Expand Down

0 comments on commit 10d49fb

Please sign in to comment.