![]() Edit mode (note that the buttons are also at top) |
![]() Search keywords color highlight |
Text::Soundex
URI::Escape
# unzip /home/zoso/tmp/photonskin/twiki/photonskin.zipYou'll have to patch your
TWiki::Prefs module with the patch provided (twiki-prefs-pm.patch). Don't worry, the patch will only add one function. The patching should be as simple as:
cd $TWIKIDIR/lib/TWiki patch <$PATCHDIR/twiki-prefs-pm.patchSet the SKIN to "photon" (in TWikiPreferences, *.WebPreferences o in your own user topic). Be sure you have email addresses in all your user topics, for the notifications to work right, and that you have WIKIWEBMASTER and SMTPSENDERHOST set correctly, just in case. Optionally, you can also set variables ALIAS and VALID_DOMAIN_ACCOUNTS (see notifications, below). Customize the file lib/TWiki/Notifications.pm with your message template in line 35, if you want to use notifications (see the notification syntax in the next section).
##My important text. Will be saved with the node##(recip1, recip2)The notifications will be sent by e-mail to the specified users. You can use as recipients for the "regular" notifications the login names in the
.htpasswd file. The address used is the one in their user topic (Email "property"). As a convenience, you can:
localhost.localdomain if none is specified).
##My important text. Will be saved but possibly modified##(tag: param1, param2; othertag: param1, param2)Of course you can mix both styles, but the default (empty) tag must be the first one:
##My important text. Will be saved but possibly modified##(recip1, recip2; othertag: param1, param2)When tags are used, a plugin is called and the meaning of the parameters vary from plugin to plugin.
lib/TWiki/Notifications/. The module will have the first letter uppercase and the rest, downcase. The tag, in the notification, is converted accordingly, so it's case-insensitive.
The interface you have to provide is simply a function called notify. The parameters are $theNotificationParams, an array ref with the parameters; $theText, the notification text; $theWeb; $theTopic; and the $theUser, the notificating user's login name. THE VALUE RETURNED IS THE TEXT THAT WILL BE SUBSTITUTED BY THE ORIGINAL TEXT. That is, if you return 1, the notification text will be changed by the string 1.
In the distribution, a plugin called Test is provided for demonstration purposes.
/, it performs a full text search, using the DirectSearch method. /, and there is another / in the box, make a text contents search only in the nodes whose names have the final words in theirs, e.g.: /curses/perl searches for the text "curses" in the pages with "perl" in their names, for example, PerlTutorial, PerlTools, PHPVsPerl, etc.
:). By now, the list of possible options is:
l to search locally (only current web). By default, PhotonSearch does a global search, although that behaviour can be changed passing local as the CGI parameter scope.
a to search globally (all webs except Trash). This is the default unless you pass the value local in the parameter scope.
u to respect case. By default, searches ignore case.
n to open a new window. This is a Javascript feature in the template rather than a PhotonSearch one.
e to open the edit window instead of the view one. Note that this only happens if there is only one result.
c colorizes the current node with the given words. For example, you type c:one two three and the topic is reloaded, highlighting the words one, two and three. The words can in fact be regular expressions. For this to work, you need to install view CGI from PhotonTWikiMods.
v switches to BookView in the results, that is, shows the complete topic text for each result.
ne:per bookm
to edit directly his personal bookmarks (for example) without losing the current window, supposing only that topic had «per» and «bookm» in its name.
type parameter in the PhotonSearch CGI call. The type can be search for regular search, popup for the popup mode, and sidebar for the sidebar mode. The special modes use Javascript, but should work in IE, Mozilla and Opera. If you use other browsers and have problems, please report them.
To install them, simply copy searchpopup.tmpl and searchsidebar.tmpl to your templates directory.
yourtwikiURL with the URL of the (PhotonSearch-powered) TWiki you want to search on.
javascript:window.sidebar.addPanel ('PhotonSearch','http://yourtwikiURL/bin/photonsearch?type=sidebar', '');
To add it to Opera, add a new panel and put http://yourtwikiURL/bin/photonsearch?type=sidebar in its URL.
<a onClick="javascript:w = window.open('/twiki/bin/photonsearch?type=popup', \
'photonsearch', 'location=no,menubar=no,width=300,height=400,scrollbars=yes'); \
w.focus(); return false" href="#">Popup</a>
-- EstebanManchado - 06 Nov 2002
Colorize.pm (thanks, Lynnwood)
templates/ directory (doh!)
Mail::Send dependency.
| I | Attachment | History | Action | Size | Date | Who | Comment |
|---|---|---|---|---|---|---|---|
| |
browser_junk.gif | r1 | manage | 48.3 K | 2002-11-08 - 12:02 | UnknownUser | Previewing with Mozilla1.1/WinXP shows junk. |
| |
browser_junk.htm | r1 | manage | 56.2 K | 2002-11-08 - 15:27 | UnknownUser | HTML listing of junk in Mozilla1.1/WinXP. |
| |
photonskin-1.jpg | r1 | manage | 27.9 K | 2002-11-07 - 12:22 | UnknownUser | Edit mode (note that the buttons are also at top) |
| |
photonskin-2.jpg | r1 | manage | 41.0 K | 2002-11-07 - 12:31 | UnknownUser | Search keywords color highlight |
| |
photonskin.zip | r7 r6 r5 r4 r3 | manage | 31.4 K | 2003-06-13 - 15:25 | UnknownUser | The skin |