I have browsed all the methods in pier, seeking out hardwired
configuration type stuff.
The attached changeset (if this list allows) methods which contain
hardwired things such as the default name/password, and much much more.
After filing in the changeset, open the 'method finder' and search for
'senders of...' the following methods in order to find hard coded items
of interest.
#pierconfig
#label
#icon
enjoy
Keith
'From Squeak3.8 of ''5 May 2005'' [latest update: #6665] on 9 June
2006 at 6:12:54 am'!
!PRBoxWidget class methodsFor: 'accessing-defaults' stamp: 'kph 6/9/2006
05:51'!
defaultCssClass
self flag: #pierconfig.
^ nil! !
!PRBoxWidget class methodsFor: 'accessing-defaults' stamp: 'kph 6/9/2006
05:51'!
defaultCssName
self flag: #pierconfig.
^ nil! !
!PRBrowser methodsFor: 'morphic' stamp: 'kph 6/9/2006 05:35'!
defaultBackgroundColor
self flag: #pierconfig.
^ Color r: 0.151 g: 0.327 b: 0.720! !
!PRBrowser class methodsFor: 'configuration' stamp: 'kph 6/9/2006 05:36'!
defaultMetaNode
| root kernel structure description |
self flag: #pierconfig.
root := OBMetaNode named: 'Root'.
kernel := OBMetaNode named: 'Kernel'.
structure := OBMetaNode named: 'Structure'.
description := OBMetaNode named: 'Description'.
root
childAt: #children
labeled: 'children'
put: kernel.
kernel
childAt: #children
labeled: 'instances'
put: structure;
addActor: PRInspectActor new.
structure
childAt: #children
labeled: 'children'
put: structure;
childAt: #description
labeled: 'description'
put: description;
addActor: PRContextActor new;
addActor: PRInspectActor new;
filterClass: OBModalFilter.
description
childAt: #children
labeled: 'children'
put: description;
childAt: #description
labeled: 'description'
put: description;
addActor: PRInspectActor new;
filterClass: OBModalFilter.
^ root! !
!PRBrowser class methodsFor: 'configuration' stamp: 'kph 6/9/2006 05:37'!
defaultRootNode
self flag: #pierconfig.
^ PRRootNode on: PRKernel instances! !
!PRBrowser class methodsFor: 'configuration' stamp: 'kph 6/9/2006 05:36'!
title
self flag: #pierconfig.
^ 'Pier Browser'! !
!PRCommandsWidget class methodsFor: 'accessing-defaults' stamp: 'kph 6/9/2006
05:51'!
defaultCommandClasses
self flag: #pierconfig.
^ (Array withAll: PRCommand withAllConcreteClasses)
sort: [ :a :b | a label caseInsensitiveLessOrEqual: b label ];
yourself! !
!PRCommandsWidget class methodsFor: 'accessing-defaults' stamp: 'kph 6/9/2006
05:50'!
defaultCssClass
self flag: #pierconfig.
^ 'box commands'! !
!PRContentsWidget class methodsFor: 'accessing-defaults' stamp: 'kph 6/9/2006
05:52'!
defaultCssClass
self flag: #pierconfig.
^ 'contents'! !
!PRContentsWidget class methodsFor: 'accessing-defaults' stamp: 'kph 6/9/2006
05:52'!
defaultTitle
self flag: #pierconfig.
^ '%c'! !
!PRDistribution class methodsFor: 'accessing' stamp: 'kph 6/9/2006
05:08'!
package
self flag: #pierconfig.
"The SqueakMap package name."
^ 'Pier'! !
!PRDistribution class methodsFor: 'accessing' stamp: 'kph 6/9/2006
05:08'!
packages
self flag: #pierconfig.
^ #( ( 'Pier-Model' )
( 'Pier-Tests' 'Smalltalk includesKey: #TestCase' )
( 'Pier-Seaside' 'Smalltalk includesKey: #WAComponent' )
( 'Pier-OmniBrowser' 'Smalltalk includesKey: #OBBrowser' ) )! !
!PRDistribution class methodsFor: 'accessing' stamp: 'kph 6/9/2006
05:08'!
version
self flag: #pierconfig.
"The first item is the product name, which should only contain lowercase letters.
Then the version numbers are following, that are made up of three numbers. An optimal
suffix alpha, beta, pre or rc follows. External packages or extensions might want to call
this method to check the version required to run."
^ #( pier 1 0 4 alpha )! !
!PRFilePersistency methodsFor: 'accessing' stamp: 'kph 6/9/2006 05:30'!
logFilename
self flag: #pierconfig.
^ 'logs.obj'! !
!PRFilePersistency methodsFor: 'accessing' stamp: 'kph 6/9/2006 05:30'!
snapshotFilename
self flag: #pierconfig.
^ 'snapshots.obj'! !
!PRHeaderWidget class methodsFor: 'accessing-defaults' stamp: 'kph 6/9/2006
05:52'!
defaultCommandClasses
self flag: #pierconfig.
^ OrderedCollection
with: PRViewCommand
with: PREditCommand! !
!PRHeaderWidget class methodsFor: 'accessing-defaults' stamp: 'kph 6/9/2006
05:52'!
defaultCssClass
self flag: #pierconfig.
^ 'header'! !
!PRHeaderWidget class methodsFor: 'accessing-defaults' stamp: 'kph 6/9/2006
05:49'!
defaultTitle
self flag: #pierconfig.
^ '%k'! !
!PRInspectActor methodsFor: 'accessing' stamp: 'kph 6/9/2006 05:38'!
actionsForNode: aClassNode
self flag: #pierconfig.
^ Array
with: (OBAction
label: 'inspect'
buttonLabel: String new
receiver: aClassNode model
selector: #inspect
arguments: Array new
keystroke: $i
icon: MenuIcons inspectIcon)
with: (OBAction
label: 'explore'
buttonLabel: String new
receiver: aClassNode model
selector: #explore
arguments: Array new
keystroke: $I
icon: MenuIcons inspectIcon)! !
!PRIsbnLink methodsFor: 'accessing-dynamic' stamp: 'kph 6/9/2006 05:17'!
urlPrefix
self flag: #pierconfig.
^ 'http://www.amazon.com/exec/obidos/ISBN='! !
!PRKernel methodsFor: '*pier-security-defaults' stamp: 'kph 6/9/2006
05:08'!
adminGroup
self flag: #pierconfig.
^ self propertyAt: #adminGroup ifAbsentPut: [ PUGroup named: 'admin' ]! !
!PRKernel methodsFor: '*pier-security-defaults' stamp: 'kph 6/9/2006
05:09'!
adminUser
self flag: #pierconfig.
^ self propertyAt: #adminUser ifAbsentPut: [
(PUUser named: 'admin')
addGroup: self adminGroup;
password: 'pier';
superuser: true;
yourself ]! !
!PRKernel methodsFor: 'configuration' stamp: 'kph 6/9/2006 05:10'!
defaultInfo
| structure |
self flag: #pierconfig.
structure := PRPage named: 'information'.
structure childrenDecoration
add: self defaultInfoIntroduction;
add: self defaultInfoSyntax;
add: self defaultInfoLicense.
structure contents: '-*Introduction>introduction*
-*Syntax>syntax*
-*License>license*'.
^ structure! !
!PRKernel methodsFor: 'configuration' stamp: 'kph 6/9/2006 05:10'!
defaultInfoIntroduction
self flag: #pierconfig.
^ (PRPage named: 'introduction')
contents: 'The term <i>Wiki</i> usually means the collaborative software
used to create, edit and manage hypertext pages on the web. A Wiki enables the users to
author their documents using a simple markup language within their preferred web-browser.
Translated from the Hawaiian language <i>Wiki wiki</i> means
<i>fast</i> and that is exactly what the collaborative editing process of a
WikiWiki Web is all about: Everybody should be able to create and update pages, without
the need of user-name and password to login. However there are wiki vandals around that
abuse the general public access and make it necessary to protect the content with security
mechanism.
!!Problem
There are more than 150 Wiki implementations available and most of them are open source.
There are even a few implementations available written in different Smalltalk dialects, so
why did we create a new one?
All the implementations we had a look at have major flaws in extensibility: they
don''t provide a proper object oriented-design that is covered by unit tests.
Moreover they all keep the content of the pages within strings, which makes it painful to
render and search the wiki. These wikis haven''t been designed for
extensibility!!
The existing Smalltalk wikis are old and it seems that the developers don''t want
to touch their running systems. Both, WikiWorks and SqueakWiki, have some of their domain
code within external files, what makes the source hard to understand as it is not possible
to use the editing and debugging facilities of the Smalltalk environment.
!!Solution
As stated, all the current wiki implementations have problems with extensibility and the
design. Redoing the same mistakes is stupid, therefor we put together the following basic
requirements and refinded them with the experience we made with the first version:
-<b>Object-Oriented Design:</b> Pier provides a fully object oriented domain
model. As an example, the content of the pages is parsed and stored as a tree of different
entities representing text, links, tables, lists, etc.
-<b>Extensibility:</b> Everything in Pier can be extended: page types, storage
mechanism, actions, security mechanism, web-server, etc. Plug-ins can be shared within the
community and loaded independently of each other into the system.
-<b>Open Source:</b> Pier is released under the MIT license which grants
unrestricted rights to copy, modify, and redistribute as long as the original copyright
and license terms are retained.
-<b>Test Suites:</b> Pier is heavily tested. There are more than 1000 unit
tests included with the core of Pier. This makes it easy to change and verify the code and
comes in extremely useful when porting Pier to other Smalltalk dialects or when writing
extensions.';
yourself! !
!PRKernel methodsFor: 'configuration' stamp: 'kph 6/9/2006 05:11'!
defaultInfoSyntax
self flag: #pierconfig.
^ (PRPage named: 'syntax')
contents: '!!Paragraphs
As carriage returns are preserved, simply add a newline to begin a new paragraph.
!!Headers
A line starting with <code>!!</code>s becomes a header line.
!!Horizontal Line
A line starting with <code>_</code> (underline) becomes a horizontal line.
This is often used to separate topics.
!!Lists
Using lines starting with <code>#</code>s and <code>-</code>s,
creates a list:
-A block of lines, where each line starts with <code>-</code> is transformed
into a bulleted list, where each line is an entry.
-A block of lines, where each line starts with <code>#</code> is transformed
into an ordered list, where each line is an entry.
-Lists can be nested. Thus, a line starting with <code>#-</code> is an element
of a bulleted list that is part of an ordered list.
!!Tables
To create a table, start off the lines with <code>|</code> and separate the
elements with <code>|</code>s. Each new line represents a new row of the
table. The contents of cells can be aligned left, centered or aligned right by using
<code>|{</code>, <code>||</code> or <code>|}</code>
respectively.
!!Preformatted
To create a preformatted section, begin each line with <code>=</code>. A
preformatted section uses equally spaced text so that spacing is preserved.
!!Links
To create a link, put it between <code>\*</code>s. All links have the
following form <code>\*reference\*</code> or
<code>\*alias>reference\*</code>, where the reference is depending on the
kind of link that is created. The contents of some links, e.g. links pointing to
image-files, can be embedded into the current document by using
<code>+</code>s: <code>\+reference\+</code>. However not all types
of links support embedding and will quietly ignore it.
!!!!Internal Links
If a structure with the given title exists in the wiki (e.g.
<code>\*Path\*</code>), a link to that item shows up when the page is saved.
In case the path points to an non-existing structure, the user will be offered the
possibility to create a new one when clicking on the link. The path can be any absolute or
relative reference within the wiki.
!!!!External Links
-If the link is an URL (e.g. <code>\*http://www.lukas-renggli.ch\*</code>), a
link to the external page shows up.
-If the link is an e-mail address (e.g.
<code>\*renggli(a)iam.unibe.ch\*</code>)t;/code>), a link to mail that person shows up.
-If the link is an ISBN number (e.g. <code>\*isbn:3446202102\*</code>), a link
to the given book shows up.
-If the link is an RFC number (e.g. <code>\*rfc:2616\*</code>), a link to the
given RFC page shows up.
!!HTML
Use any HTML anywhere you want. Some useful HTML tags are:
-To make something <b>bold</b>, surround it by <b> and
</b>.
-To make something <i>italic</i>, surround it by <i> and
</i>.
-To make something <u>underlined</u>, surround it by <u> and
</u>.
-To make text appear in a different color (like <font
color="green">green</font>, <font
color="red">red</font>, <font color="blue">blue
</font>, <font color="grey">grey</font>, <font
color="yellow">yellow</font>, or <font
color="orange">orange</font>), use <font color="<i>a
color</i>"> <i> some text </i> </font>.';
yourself! !
!PRKernel methodsFor: 'configuration' stamp: 'kph 6/9/2006 05:12'!
defaultRoot
| structure |
self flag: #pierconfig.
structure := PRPage named: 'pier'.
structure childrenDecoration add: self defaultInfo.
structure contents: 'Welcome to Pier (formerly called SmallWiki 2), the next
generation of a fully extensible content management system implemented in Smalltalk. To
read additional information, please consult the *information page>information*.'.
^ structure! !
!PRMacroExpander class methodsFor: 'class initialization' stamp: 'kph 6/9/2006
05:32'!
initialize
self flag: #pierconfig.
Default := self on: (Dictionary new
at: $c put: [ :char :context | context command name ]; " current command "
at: $r put: [ :char :context | context kernel root title ]; " current root
structure "
at: $t put: [ :char :context | context structure title ]; " current structure
"
at: $k put: [ :char :context | context kernel name ]; " current kernel name
"
yourself)! !
!PRMoveCommand class methodsFor: 'accessing' stamp: 'kph 6/9/2006 05:26'!
accessKey
self flag: #pierconfig.
^ $m! !
!PRMoveCommand class methodsFor: 'accessing' stamp: 'kph 6/9/2006 05:46'!
label
^ 'Move'! !
!PRPath methodsFor: 'accessing-configuration' stamp: 'kph 6/9/2006
05:33'!
separator
self flag: #pierconfig.
^ $/! !
!PRPierLibrary methodsFor: 'accessing' stamp: 'kph 6/9/2006 05:41'!
style
self flag: #pierconfig.
^ '@import
"http://www.lukas-renggli.ch/smalltalk/pier/style/84/style.css";'! !
!PRRfcLink methodsFor: 'accessing-dynamic' stamp: 'kph 6/9/2006 05:17'!
urlPrefix
self flag: #pierconfig.
^ 'http://www.faqs.org/rfcs/rfc'! !
!PRRootNode methodsFor: 'accessing' stamp: 'kph 6/9/2006 05:37'!
name
self flag: #pierconfig.
^ 'Root'! !
!PRSettingsComponentCommand class methodsFor: 'accessing' stamp: 'kph 6/9/2006
05:44'!
accessKey
self flag: #pierconfig.
^ $p! !
!PRSettingsComponentCommand class methodsFor: 'accessing' stamp: 'kph 6/9/2006
05:46'!
label
^ 'Settings'! !
!PRSettingsComponentCommand class methodsFor: 'accessing-configuration' stamp:
'kph 6/9/2006 05:45'!
structureClass
^ PRComponent! !
!PRStructure methodsFor: '*pier-seaside-configuration' stamp: 'kph 6/9/2006
05:14'!
environmentSelector
self flag: #pierconfig.
^ 'environment'! !
!PRStructure methodsFor: '*pier-seaside-configuration' stamp: 'kph 6/9/2006
05:14'!
environmentStructure
self flag: #pierconfig.
^ (PRPage named: 'environment')
addDecoration: PRHider new;
addChild: ((PRComponent named: 'header')
componentClass: PRHeaderWidget;
yourself);
addChild: ((PRComponent named: 'views')
componentClass: PRViewsWidget;
yourself);
addChild: ((PRComponent named: 'commands')
componentClass: PRCommandsWidget;
yourself);
addChild: ((PRComponent named: 'tree')
componentClass: PRTreeWidget;
yourself);
addChild: ((PRComponent named: 'main')
componentClass: PRContentsWidget;
yourself);
contents: '+header+
<table class="body"><tr><td
class="boxes">+views+<br />+commands+<br
/>+tree+</td><td class="spacer"></td><td
class="main">+main+</td></tr></table>';
yourself! !
!PRStructure methodsFor: '*pier-seaside-configuration' stamp: 'kph 6/9/2006
05:14'!
viewComponentClass
"Return the default view component class of the reciever."
self flag: #pierconfig.
^ PRDefaultView! !
!PRForm class methodsFor: 'accessing' stamp: 'kph 6/9/2006 05:42'!
icon
"PRCompatibility compileFileNamed: 'icons/form.png' into: PRForm class
selector: #icon"
^ #(137 80 78 71 13 10 26 10 0 0 0 13 73 72 68 82 0 0 0 16 0 0 0 16 8 6 0 0 0 31 243 255
97 0 0 0 9 112 72 89 115 0 0 11 18 0 0 11 18 1 210 221 126 252 0 0 0 4 103 65 77 65 0 0
177 142 124 251 81 147 0 0 0 32 99 72 82 77 0 0 122 37 0 0 128 131 0 0 249 255 0 0 128 233
0 0 117 48 0 0 234 96 0 0 58 152 0 0 23 111 146 95 197 70 0 0 1 51 73 68 65 84 120 218 98
244 137 109 107 96 96 96 168 103 32 15 52 2 4 16 19 5 154 65 160 30 32 128 152 24 40 4 0 1
196 2 34 86 205 44 96 248 247 239 31 78 252 23 68 255 5 226 255 127 225 26 127 253 252 197
80 216 180 154 1 32 128 192 6 252 251 247 151 161 189 189 131 36 155 99 99 99 193 52 64 0
129 13 248 11 52 29 4 90 90 90 136 54 224 218 245 235 96 26 32 128 152 96 46 32 21 128 188
6 2 0 1 4 119 65 126 126 62 195 203 151 47 33 254 5 227 191 12 255 65 254 255 139 20 30
208 112 248 247 239 63 220 0 128 0 130 24 240 15 42 248 247 47 82 224 1 217 127 255 67 12
4 106 250 15 98 131 52 3 13 1 27 252 255 63 216 0 128 0 130 4 34 80 112 202 148 41 36 121
33 40 40 8 76 3 4 16 212 5 164 7 226 153 51 103 192 52 64 0 65 2 241 239 31 178 3 17 32
128 32 46 248 243 143 33 49 49 137 225 246 157 219 144 128 2 74 254 255 255 31 28 54 255
193 225 241 31 130 255 3 53 253 135 240 255 67 195 0 32 128 16 129 248 255 31 92 51 2 67
52 253 71 167 129 154 65 108 16 0 8 32 176 1 5 141 171 200 206 11 0 1 196 8 115 10 185 0
32 192 0 27 196 243 46 254 241 239 219 0 0 0 0 73 69 78 68 174 66 96 130) asByteArray! !
!PRPage methodsFor: 'accessing-configuration' stamp: 'kph 6/9/2006
05:14'!
defaultDocument
self flag: #pierconfig.
"Answer the default document of the receiver."
^ PRDocument new
add: (PRParagraph new
add: (PRText with: 'Edit this page ...');
yourself);
yourself! !
!PRPage methodsFor: 'accessing-configuration' stamp: 'kph 6/9/2006
05:13'!
parserClass
self flag: #pierconfig.
"Answer the default document parser for the receiver."
^ PRDocumentParser! !
!PRPage methodsFor: 'accessing-configuration' stamp: 'kph 6/9/2006
05:13'!
rendererClass
"Answer the default document writer for the receiver."
self flag: #pierconfig.
^ PRDocumentWriter! !
!PRStructureDescription class methodsFor: '*pier-seaside-defaults' stamp: 'kph
6/9/2006 05:31'!
defaultComponentClasses
self flag: #pierconfig.
^ Array with: PRStructureComponent! !
!PRStructureDescription class methodsFor: 'accessing' stamp: 'kph 6/9/2006
05:46'!
label
^ 'Structure'! !
!PRStructuresWidget class methodsFor: 'accessing-defaults' stamp: 'kph
6/9/2006 05:54'!
defaultLabels
self flag: #pierconfig.
^ #( title name )! !
!PRStructuresWidget class methodsFor: 'accessing-defaults' stamp: 'kph
6/9/2006 05:54'!
defaultMaxItems
self flag: #pierconfig.
^ 0! !
!PRStructuresWidget class methodsFor: 'accessing-defaults' stamp: 'kph
6/9/2006 05:54'!
defaultShowIcons
self flag: #pierconfig.
^ true! !
!PRChildrenWidget class methodsFor: 'accessing-defaults' stamp: 'kph 6/9/2006
05:50'!
defaultCssClass
self flag: #pierconfig.
^ 'box children'! !
!PRNavigationWidget class methodsFor: 'accessing-defaults' stamp: 'kph
6/9/2006 05:53'!
defaultCssClass
self flag: #pierconfig.
^ 'box navigation'! !
!PRPathWidget class methodsFor: 'accessing-defaults' stamp: 'kph 6/9/2006
05:53'!
defaultCssClass
self flag: #pierconfig.
^ 'box path'! !
!PRReferencesWidget class methodsFor: 'accessing-defaults' stamp: 'kph
6/9/2006 05:53'!
defaultCssClass
self flag: #pierconfig.
^ 'box references'! !
!PRSearchWidget class methodsFor: 'accessing-defaults' stamp: 'kph 6/9/2006
05:53'!
defaultCaseSensitive
self flag: #pierconfig.
^ false! !
!PRSearchWidget class methodsFor: 'accessing-defaults' stamp: 'kph 6/9/2006
05:53'!
defaultCssClass
self flag: #pierconfig.
^ 'box search'! !
!PRSearchWidget class methodsFor: 'accessing-defaults' stamp: 'kph 6/9/2006
05:53'!
defaultMaxItems
self flag: #pierconfig.
^ 10! !
!PRTocWidget class methodsFor: 'accessing-defaults' stamp: 'kph 6/9/2006
05:54'!
defaultCssClass
self flag: #pierconfig.
^ 'box toc'! !
!PRTreeWidget class methodsFor: 'accessing-defaults' stamp: 'kph 6/9/2006
05:55'!
defaultAutoCollapse
self flag: #pierconfig.
^ true! !
!PRTreeWidget class methodsFor: 'accessing-defaults' stamp: 'kph 6/9/2006
05:55'!
defaultAutoExpand
self flag: #pierconfig.
^ true! !
!PRTreeWidget class methodsFor: 'accessing-defaults' stamp: 'kph 6/9/2006
05:55'!
defaultCssClass
self flag: #pierconfig.
^ 'box tree'! !
!PRViewCommand class methodsFor: 'accessing' stamp: 'kph 6/9/2006 05:26'!
accessKey
self flag: #pierconfig.
^ $v! !
!PRViewsWidget class methodsFor: 'accessing-default' stamp: 'kph 6/9/2006
05:55'!
defaultCssClass
self flag: #pierconfig.
^ 'box views'! !
!PRViewsWidget class methodsFor: 'accessing-default' stamp: 'kph 6/9/2006
05:55'!
defaultViewClasses
self flag: #pierconfig.
^ (Array withAll: PRViewComponent withAllConcreteClasses)
sort: [ :a :b | a label caseInsensitiveLessOrEqual: b label ];
yourself! !
!PRXHtmlWidget class methodsFor: 'accessing-defaults' stamp: 'kph 6/9/2006
05:56'!
defaultText
self flag: #pierconfig.
^ '<h1>%k</h1><h2>%c</h2>'! !
PRMacroExpander initialize!