1. Summary
  2. Files
  3. Support
  4. Report Spam
  5. Create account
  6. Log in

Author Toolbox

From notepad-plus

(Difference between revisions)
Jump to: navigation, search
(New page: At the time NpWiki++ opened to the public, its page were extensively using a set of simple templates aimed at using some common color code, simplifying some table input and such. The follo...)
(UI quotes)
 
(24 intermediate revisions not shown)
Line 1: Line 1:
 +
{{New Article| Tools to help authors write interesting pages in accordance with graphic standards}}
 +
At the time NpWiki++ opened to the public, its page were extensively using a set of simple templates aimed at using some common color code, simplifying some table input and such. The followng is a list of available templates. It is hoped that this list will grow and will be kept adequately documented.
At the time NpWiki++ opened to the public, its page were extensively using a set of simple templates aimed at using some common color code, simplifying some table input and such. The followng is a list of available templates. It is hoped that this list will grow and will be kept adequately documented.
-
* Versions
+
=== C operators ===
-
*; [[:Template:currentFXVersion]]
+
; [[Template:Equals]]
-
*: Displays the current version of the TextFX plugin distributed with Notepad++. Should be updated whenever thi distributed version changes.
+
: Resolves to ==. Since this is also used as wiki markup, it has to be escaped.
-
*: [[:Template:currentFXVersion]]
+
; [[Template:TEqual]]
-
*: Displays current version of Notepad++. Should be updated on each official release.
+
: Resolves to a single equal sign. Since this symbol is used in templates, using templates to build tables requires the hack when arguments happen to contain an equal sign, like URLs that point to PHP scripts.
 +
; [[Template:Tpipe]]
 +
: Resolves to a single pipe symbol. Since this symbol is used both in tables and templates, using templates to build tables requires the hack sometimes.
 +
 
 +
=== Forums ===
 +
; [[Template:forum_de]]
 +
: Resolves to a link to the Hilfe und Diskussion forum (in german)
 +
; [[Template:Forum_dev]]
 +
: Resolves to a link to the Developers forum
 +
; [[Template:forum_es]]
 +
: Resolves to a link to the Foro en español (in spanish)
 +
; [[Template:forum_fr]]
 +
: Resolves to a link to the Forum en français (in french); [[Template:forum_help]]
 +
: Resolves to a link to the Help forum
 +
; [[Template:forum_open]]
 +
: Resolves to a link to the Open Discussion forum
 +
; [[Template:forum_pt]]
 +
: Resolves to a link to the Fóro em português (in portuguese)
 +
; [[Template:forum_plugin]]
 +
: Resolves to a link to the Plugin Development forum
 +
; [[Template:forum_trans]]
 +
: Resolves to a link to the Translation forum
 +
 
 +
=== Indexing ===
 +
; [[Template:kwcat]]
 +
: This makes a new page into a keyword, or topic, category. To create a new topic, edit it and add <nowiki>{{kwcat}}</nowiki> as only text. Then save.
 +
; [[Template:New Article]]
 +
: Displays a long title at the top of a page. Required on any new page. Creates a hidden category link.
 +
* Parameters:
 +
*# the long title. Defaults to the short page name.
 +
 
 +
=== General ===
 +
 
 +
; [[Template:Note]]
 +
: Creates a Note, wich shows in italic between two line breaks. Links the page it is on to the Notes category. This allows to track pages that have one or more Note's.
 +
*Parameters:
 +
*# the text of the note.
 +
; [[Template:Maintainer]]
 +
: This is a way to show a contact e-mail address while protecting the address against harvester bots which might cause the mailbox to receive spam. This is why it is unusually complex: it has a mix of named and unnamed parameters.
 +
* Unnamed parameters:
 +
*# The actual addressee name which lies before the a sign, like <tt>first-middle.last</tt> or <tt>Plugininfo</tt>
 +
*# The displayed name, which will be displayed on the page the template is transcluded in, like <tt>John Doe Smith</tt>.
 +
*# Any middle part in the server name, excluding the first and last words, and including both dots. If the server is <tt>area.forbidden.403</tt>, this third paramater should be <tt>.forbidden.</tt>. Makes sense nly if the <tt>s1</tt> and <tt>s2</tt> parameters are passed explicitly.
 +
* Named parameters:
 +
** s1 is the first word of the server name. If omitted, defaults to <tt>users.sourceforge</tt>
 +
** s2 is the last word of the server name. Defaults to <tt>.net</tt>
 +
* Because <tt>s1</tt> and <tt>s2</tt> are named, they can be placed anywhere in the template call, and in any order. This may provide more stealth by making it harder for a bot to figure that there is an email address right here.
 +
 
 +
Thus (be sure to hover over the renderings to see the target address):
 +
{|border="1"
 +
|+ Use cases of the <tt>Maintainer</tt> template
 +
! Text
 +
! Rendering
 +
|-
 +
| <nowiki>{{Maintainer|me}}</nowiki> || {{Maintainer|me}}
 +
|-
 +
| <nowiki>{{Maintainer|me|The Boss}}</nowiki> || {{Maintainer|me|The Boss}}
 +
|-
 +
| <nowiki>{{Maintainer|john.doe|s2=404|Big Brother|.nowhere.|s1=iam}}</nowiki> || {{Maintainer|john.doe|s2=404|Big Brother|.nowhere.|s1=iam}}
 +
|-
 +
| <nowiki>{{Maintainer|s1=iam|john.doe|s2=404|Big Brother|.nowhere.}}</nowiki> || {{Maintainer|s1=iam|john.doe|s2=404|Big Brother|.nowhere.}}
 +
|-
 +
| <nowiki>{{Maintainer|info|s2=.org|s1=plugin}}</nowiki> || {{Maintainer|info|s2=.org|s1=plugin}}
 +
|}
 +
 
 +
Avoiding explicit dots and at signs and shuffling elements contribute to stealth, while the default values make it easy to refer to a SourceForge.net member. Thus, whle the last example is valid, perhaps is it less safe.
 +
 
 +
=== Other Notepad++ related ===
 +
; [[Template:SCI_macro]]
 +
: Shows a macro to be inserted in <tt>shortcuts.xml</tt> in order to send Scintilla a message.
 +
* Parameters:
 +
*# message: the message IDnumber. Quotes are provided.
 +
*# wParam, defaults to "0"
 +
*# lParam, defaults to "0": Use the 3=<lParam> idiom if the second parameter is defaulted.
 +
; [[Template:MsgRow]]
 +
: Resolves to a row of the Notepad++ message table.
 +
* Parameters:
 +
*# message: the message mnemonic, uppercase, unquoted
 +
*# lParam
 +
*# Description
 +
*# wParam, defaults to 0.
 +
* NOTE: the unnatural parameter order derives from wParam being often unused.
 +
; [[Template:NotifRow]]
 +
: Resolves to a row of the Notepad++ notification table.
 +
* Parameters:
 +
*# notif: the notification mnemonic, uppercase, unquoted
 +
*# hwndFrom
 +
*# Description
 +
*# idFrom, defaults to 0.
 +
* NOTE: the unnatural parameter order derives from idFrom being often unused.
 +
; [[Template:TaskRow]]
 +
: Resolves to a row of the Plugin Development task table.
 +
* Parameters:
 +
*# task description
 +
*# message to send, or other procedure
 +
*# wParam, or N/A
 +
*# lParam, default is 0
 +
*# Comments. Use the idom "5=<comments>" if previous parameter was defaulted.
 +
 
 +
=== Source files ===
 +
 
 +
The templates below build external links. As a result, arguments to the templates should follow a couple special rules:
 +
# Do not put any whitespace around them.
 +
# If the folder or file names contains some characters that need encoding using the %nn ASCII code, please include the encoded form.
 +
 
 +
You can, and are strongly encouraged to, check whether an external link works on previewing the page you are editing. Shift-click the link (at least on MSIE and Firefox) to open in a new window, so that you can just dismiss the test.
 +
 
 +
; [[Template:scSource]]
 +
: Creates a link to a Scintilla source file in its own SVN repository.
 +
* Parameters:
 +
*# subfolder of Scintilla main source folder. Default is <tt>src</tt>
 +
*# file name. Use the 2=<filename> idiom when 1st parameter is defaulted.
 +
* NOTE: Scintilla's site does not display properly in MSIE, but does in Firefox. Any workaround welcome.
 +
; [[Template:shSource]]
 +
: Creates a link to a Notepad++ source file in its own SVN repository, when the path has two main parts.
 +
* Parameters:
 +
*# subfolder of SNotepad++ main source folder. Default is <tt>PowerEditor/src</tt>
 +
*# subfolder of main subfolder. Use the 2=<subfolders> idiom when 1st parameter is defulted.
 +
*# file name. Use the 3=<filename> idiom when any parameter is defaulted.
 +
* All folder names should have exact capitalisation and use the / separator.
 +
; [[Template:shSource1]]
 +
: Creates a link to a Notepad++ source file in its own SVN repository, when the path has onmly one main part.
 +
* Parameters:
 +
*# subfolder of SNotepad++ main source folder. Default is <tt>PowerEditor/src</tt>
 +
*# file name. Use the 2=<filename> idiom when any parameter is defaulted.
 +
* All folder names should have exact capitalisation and use the / separator.
 +
 
 +
=== UI quotes ===
 +
; [[Template:shMenu]]
 +
: Resolves to {{shMenu|Menu|Command}}
 +
* Parameters:
 +
*# the menu name
 +
*# the command name, or submenu -> command if applicable
 +
; [[Template:shMenu1]]
 +
: Resolves to {{shMenu1|MenuCommand}}. Useful for entrie of context menus.
 +
* Parameters:
 +
*# the menu command name
 +
[[Template:shMenuFX]]
 +
: Resolves to {{shMenuFX|Menu|Command}}
 +
* Parameters:
 +
*# the TextFX submenu name, without the TextFX prefix
 +
*# the command name, or submenu -> command if applicable
 +
; [[Template:shSC]]
 +
: Resolves to {{shSC|Left column|Right column}}
 +
* Parameters:
 +
*# the style group, defaults to Global Styles
 +
*# the style element, efaults to Default style.  Use the 2=<style_element> idiom when 1st parameter is
 +
; [[Template:shSM]]
 +
: Resolves to {{shSM|Tab name}}
 +
* Parameters:
 +
*# the shortcut mapper tab name
 +
; [[Template:shSP]]
 +
: Resolves to {{shSP|Tab name|Frame name}}
 +
* Parameters:
 +
*# the tab name
 +
*# the frame name.  Use the 2=<style_element> idiom when 1st parameter is defulted. Write tab name -> element name if applicable.
 +
; [[Template:shSP1]]
 +
: Resolves to {{shSP1|Tab name}}
 +
* Parameters:
 +
*# the tab name.
 +
 
 +
=== Versions ===
 +
; [[Template:currentFXVersion]]
 +
: Displays the current version of the TextFX plugin distributed with Notepad++. Should be updated whenever this distributed version changes.
 +
; [[Template:currentNppVersion]]
 +
: Displays current version of Notepad++. Should be updated on each official release.
 +
 
 +
NOTE: since these templates point to values that get updated, they are primarily intended to be used in sentences like "As of version <nowiki>{{currentNppVersion}}</nowiki>, ...", which may disappear or change when some evolution takes place, like a feature being implemented. If you want to record the current version without an uppdate, use the subst: modifier on the template, like in <nowiki>{{subst:currentNppVersion}}</nowiki>, which is 5.4.5 at the time of writing and won't ever get uodated, because the template call itself will be removed on the next save of this page.
 +
 
 +
 
 +
 
 +
[[Category:NpWiki++]]
 +
[[Category:Usage(NP++ Project)]]

Current revision as of 12:43, 30 September 2012

Tools to help authors write interesting pages in accordance with graphic standards


At the time NpWiki++ opened to the public, its page were extensively using a set of simple templates aimed at using some common color code, simplifying some table input and such. The followng is a list of available templates. It is hoped that this list will grow and will be kept adequately documented.

Contents

C operators

Template:Equals
Resolves to ==. Since this is also used as wiki markup, it has to be escaped.
Template:TEqual
Resolves to a single equal sign. Since this symbol is used in templates, using templates to build tables requires the hack when arguments happen to contain an equal sign, like URLs that point to PHP scripts.
Template:Tpipe
Resolves to a single pipe symbol. Since this symbol is used both in tables and templates, using templates to build tables requires the hack sometimes.

Forums

Template:forum_de
Resolves to a link to the Hilfe und Diskussion forum (in german)
Template:Forum_dev
Resolves to a link to the Developers forum
Template:forum_es
Resolves to a link to the Foro en español (in spanish)
Template:forum_fr
Resolves to a link to the Forum en français (in french); Template:forum_help
Resolves to a link to the Help forum
Template:forum_open
Resolves to a link to the Open Discussion forum
Template:forum_pt
Resolves to a link to the Fóro em português (in portuguese)
Template:forum_plugin
Resolves to a link to the Plugin Development forum
Template:forum_trans
Resolves to a link to the Translation forum

Indexing

Template:kwcat
This makes a new page into a keyword, or topic, category. To create a new topic, edit it and add {{kwcat}} as only text. Then save.
Template:New Article
Displays a long title at the top of a page. Required on any new page. Creates a hidden category link.
  • Parameters:
    1. the long title. Defaults to the short page name.

General

Template:Note
Creates a Note, wich shows in italic between two line breaks. Links the page it is on to the Notes category. This allows to track pages that have one or more Note's.
  • Parameters:
    1. the text of the note.
Template:Maintainer
This is a way to show a contact e-mail address while protecting the address against harvester bots which might cause the mailbox to receive spam. This is why it is unusually complex: it has a mix of named and unnamed parameters.
  • Unnamed parameters:
    1. The actual addressee name which lies before the a sign, like first-middle.last or Plugininfo
    2. The displayed name, which will be displayed on the page the template is transcluded in, like John Doe Smith.
    3. Any middle part in the server name, excluding the first and last words, and including both dots. If the server is area.forbidden.403, this third paramater should be .forbidden.. Makes sense nly if the s1 and s2 parameters are passed explicitly.
  • Named parameters:
    • s1 is the first word of the server name. If omitted, defaults to users.sourceforge
    • s2 is the last word of the server name. Defaults to .net
  • Because s1 and s2 are named, they can be placed anywhere in the template call, and in any order. This may provide more stealth by making it harder for a bot to figure that there is an email address right here.

Thus (be sure to hover over the renderings to see the target address):

Use cases of the Maintainer template
Text Rendering
{{Maintainer|me}} me
{{Maintainer|me|The Boss}} The Boss
{{Maintainer|john.doe|s2=404|Big Brother|.nowhere.|s1=iam}} Big Brother
{{Maintainer|s1=iam|john.doe|s2=404|Big Brother|.nowhere.}} Big Brother
{{Maintainer|info|s2=.org|s1=plugin}} info

Avoiding explicit dots and at signs and shuffling elements contribute to stealth, while the default values make it easy to refer to a SourceForge.net member. Thus, whle the last example is valid, perhaps is it less safe.

Other Notepad++ related

Template:SCI_macro
Shows a macro to be inserted in shortcuts.xml in order to send Scintilla a message.
  • Parameters:
    1. message: the message IDnumber. Quotes are provided.
    2. wParam, defaults to "0"
    3. lParam, defaults to "0": Use the 3=<lParam> idiom if the second parameter is defaulted.
Template:MsgRow
Resolves to a row of the Notepad++ message table.
  • Parameters:
    1. message: the message mnemonic, uppercase, unquoted
    2. lParam
    3. Description
    4. wParam, defaults to 0.
  • NOTE: the unnatural parameter order derives from wParam being often unused.
Template:NotifRow
Resolves to a row of the Notepad++ notification table.
  • Parameters:
    1. notif: the notification mnemonic, uppercase, unquoted
    2. hwndFrom
    3. Description
    4. idFrom, defaults to 0.
  • NOTE: the unnatural parameter order derives from idFrom being often unused.
Template:TaskRow
Resolves to a row of the Plugin Development task table.
  • Parameters:
    1. task description
    2. message to send, or other procedure
    3. wParam, or N/A
    4. lParam, default is 0
    5. Comments. Use the idom "5=<comments>" if previous parameter was defaulted.

Source files

The templates below build external links. As a result, arguments to the templates should follow a couple special rules:

  1. Do not put any whitespace around them.
  2. If the folder or file names contains some characters that need encoding using the %nn ASCII code, please include the encoded form.

You can, and are strongly encouraged to, check whether an external link works on previewing the page you are editing. Shift-click the link (at least on MSIE and Firefox) to open in a new window, so that you can just dismiss the test.

Template:scSource
Creates a link to a Scintilla source file in its own SVN repository.
  • Parameters:
    1. subfolder of Scintilla main source folder. Default is src
    2. file name. Use the 2=<filename> idiom when 1st parameter is defaulted.
  • NOTE: Scintilla's site does not display properly in MSIE, but does in Firefox. Any workaround welcome.
Template:shSource
Creates a link to a Notepad++ source file in its own SVN repository, when the path has two main parts.
  • Parameters:
    1. subfolder of SNotepad++ main source folder. Default is PowerEditor/src
    2. subfolder of main subfolder. Use the 2=<subfolders> idiom when 1st parameter is defulted.
    3. file name. Use the 3=<filename> idiom when any parameter is defaulted.
  • All folder names should have exact capitalisation and use the / separator.
Template:shSource1
Creates a link to a Notepad++ source file in its own SVN repository, when the path has onmly one main part.
  • Parameters:
    1. subfolder of SNotepad++ main source folder. Default is PowerEditor/src
    2. file name. Use the 2=<filename> idiom when any parameter is defaulted.
  • All folder names should have exact capitalisation and use the / separator.

UI quotes

Template:shMenu
Resolves to Menu -> Command
  • Parameters:
    1. the menu name
    2. the command name, or submenu -> command if applicable
Template:shMenu1
Resolves to MenuCommand. Useful for entrie of context menus.
  • Parameters:
    1. the menu command name

Template:shMenuFX

Resolves to TextFX -> TextFX Menu -> Command
  • Parameters:
    1. the TextFX submenu name, without the TextFX prefix
    2. the command name, or submenu -> command if applicable
Template:shSC
Resolves to Settings -> Styler Configurator -> Left column , Right column
  • Parameters:
    1. the style group, defaults to Global Styles
    2. the style element, efaults to Default style. Use the 2=<style_element> idiom when 1st parameter is
Template:shSM
Resolves to Settings -> Shortcut mapper -> Tab name
  • Parameters:
    1. the shortcut mapper tab name
Template:shSP
Resolves to Settings -> Preferences -> Tab name -> Frame name
  • Parameters:
    1. the tab name
    2. the frame name. Use the 2=<style_element> idiom when 1st parameter is defulted. Write tab name -> element name if applicable.
Template:shSP1
Resolves to Settings -> Preferences -> Tab name
  • Parameters:
    1. the tab name.

Versions

Template:currentFXVersion
Displays the current version of the TextFX plugin distributed with Notepad++. Should be updated whenever this distributed version changes.
Template:currentNppVersion
Displays current version of Notepad++. Should be updated on each official release.

NOTE: since these templates point to values that get updated, they are primarily intended to be used in sentences like "As of version {{currentNppVersion}}, ...", which may disappear or change when some evolution takes place, like a feature being implemented. If you want to record the current version without an uppdate, use the subst: modifier on the template, like in {{subst:currentNppVersion}}, which is 5.4.5 at the time of writing and won't ever get uodated, because the template call itself will be removed on the next save of this page.

Personal tools
INVISIBLE