GNHLUG
>
TWiki Web
>
WebSearch
>
WebSearchAttachments
(2015-05-19,
TWikiContributor
)
(raw view)
E
dit
A
ttach
---+ %MAKETEXT{"Search Attachments in [_1] Web" args="<nop>%BASEWEB%"}% <style type="text/css" media="all"> .attName { padding-left: 38px; text-indent: -38px; } .attComment { font-size:80%; color:gray; } </style> <div class="twikiPageForm"> <form name="search" action="%SCRIPTURLPATH{"view"}%/%BASEWEB%/%BASETOPIC%" method="get"> <table id="twikiSearchTable" border="0" cellspacing="0" cellpadding="0"> <tr> <td class="twikiFirstRow" style="width: 12em; text-align: right; vertical-align: top;"> <b>%MAKETEXT{"Attachment name:"}%</b> </td> <td class="twikiFirstRow"> <input type="text" name="af" value="%URLPARAM{ "af" encode="entity" }%" size="32" class="twikiInputField" /> <input type="submit" class="twikiSubmit" value='%MAKETEXT{"Search"}%' /> <span class="twikiSmall"> [[%SCRIPTURLPATH{"view"}%/%BASEWEB%/%BASETOPIC%?tf=*;af=*][%MAKETEXT{"Show all"}%]] %VBAR% [[%SYSTEMWEB%.SearchHelp][%MAKETEXT{"Help"}%]]</span> <div class="twikiSmall" style="margin: 0.3em 0 -0.8em 0; color: gray;"> %MAKETEXT{"Use wildcards, such as =*.doc="}% </div> </td> </tr> <tr> <th style="width: 12em; text-align: right; vertical-align: top;"> %MAKETEXT{"Topic name:"}% </th> <td> <input type="text" name="tf" value="%URLPARAM{ "tf" encode="entity" }%" size="32" class="twikiInputField" /> <div class="twikiSmall" style="margin: 0.3em 0 -0.8em 0; color: gray;"> %MAKETEXT{"Use wildcards, such as =*= for all topics"}% </div> </td> </tr> </table> </form> </div> %SET{ "tf" value="%URLPARAM{ "tf" encode="quote" }%" }% %SET{ "af" value="%CALCULATE{ $LOWER( $SUBSTITUTE( $SUBSTITUTE( $SUBSTITUTE( $SUBSTITUTE( '''%URLPARAM{ "af" encode="off" }%''', ., \., ), +, \+ ), *, .* ), ?, . ) )}%" note_to_developer="The CALCULATE functions change a wildcard to a regular expression" }% %CALCULATE{$SET(topics, 0)$SET(attachments, 0)}% %SEARCH{ "[%]META:FILEATTACHMENT{name=\"%GET{af}%\" a[a-z]+=" type="regex" web="%BASEWEB%" topic="%GET{tf}%" format="$percntCALCULATE{ | *$NOP(%)ICON{viewtopic}$NOP(%) $CHAR(32) [[$web.$topic][$topictitle]] topic: $SETLIST( attNames, $LISTEACH( $SETHASH(attNameIndex, $index, $item)$item, $query(attachments.name) ) ) $LIST2HASH( attComments, $LISTEACH( $GETHASH(attNameIndex, $index)$CHAR(44)$CHAR(32)$item, $query(attachments.comment, quote:''') ) ) $LIST2HASH( attDates, $LISTEACH( $GETHASH(attNameIndex, $index)$CHAR(44)$CHAR(32)$item, $query(attachments.date) ) ) $LIST2HASH( attUsers, $LISTEACH( $GETHASH(attNameIndex, $index)$CHAR(44)$CHAR(32)$item, $query(attachments.user) ) ) $SETLIST( afNames, $LISTIF( $SEARCH( %GET{af}%, $LOWER($item) ), $GETLIST(attNames) ) ) $SET( num, $LISTSIZE( $GETLIST(afNames) ) ) $SETM(topics, +1) $SETM(attachments, +$GET(num))* || $CHAR(10) $LISTJOIN( $CHAR(10), $LISTEACH( | <div class='attName'> $NOP(%)ICON{$IF($index<$GET(num), dot_udr, dot_ur)}$NOP(%) $NOP(%)ICON{ \"$item\" default=\"else\" }$NOP(%) $CHAR(32) [[%PUBURL%/$web/$topic/$item][$item]] <span class='attComment'> $SUBSTITUTE( $GETHASH(attComments, $item), |, %VBAR% )</span> | <span style='white-space:nowrap;'> $FORMATTIME( $GETHASH(attDates, $item), $year-$mo-$day )''',''' $CHAR(32) $NOP(%)USERINFO{ \"$GETHASH(attUsers, $item)\" format=\"$wikiusername\" }$NOP(%) </span></div> |, $GETLIST(afNames) ) )}$percnt" nonoise="on" }% <div style="padding-top: 0.3em;"> %MAKETEXT{"Total:"}% %CALCULATE{$GET(topics) topic$IF($GET(topics)!=1, s), $GET(attachments) attachment$IF($GET(attachments)!=1, s)}% </div> <div class="twikiHelp"> *%MAKETEXT{"Other search options:"}%* * icon:searchtopic [[%BASEWEB%.WebSearch][%MAKETEXT{"Simple search"}%]] * icon:searchtopic [[%BASEWEB%.WebSearchAdvanced][%MAKETEXT{"Advanced search"}%]] * icon:arrowright %MAKETEXT{"If you already know the name of the topic, enter the name of the topic into the ~[~[[_1]~]~[Jump box~]~] at the top" args="%SYSTEMWEB%.JumpBox"}% * icon:indexlist [[%BASEWEB%.WebTopicList][%MAKETEXT{"List all topics in the [_1] web in alphabetical order" args="<nop>%INCLUDINGWEB%"}%]] * icon:filter %MAKETEXT{"List topics that start with the letter:"}% %CALCULATE{$LISTEACH(<a href="%SCRIPTURLPATH{"search"}%/%INCLUDINGWEB%/?scope=topic&regex=on&search=%5E$item">$item</a><span class="twikiSeparator">, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z)}% * icon:recentchanges [[%INCLUDINGWEB%.WebChanges][%MAKETEXT{"Recently changed topics"}%]] </div>
E
dit
|
A
ttach
|
Watch
|
P
rint version
|
H
istory
: r1
|
B
acklinks
|
V
iew topic
|
Ra
w
edit
|
M
ore topic actions
Topic revision: r1 - 2015-05-19
-
TWikiContributor
TWiki
Log In
or
Register
TWiki Web
Users
Groups
Index
Search
Changes
Notifications
RSS Feed
Statistics
Preferences
User Reference
ATasteOfTWiki
TextFormattingRules
TWikiVariables
FormattedSearch
QuerySearch
TWikiDocGraphics
TWikiSkinBrowser
InstalledPlugins
Admin Maintenance
Reference Manual
AdminToolsCategory
InterWikis
ManagingWebs
TWikiSiteTools
TWikiPreferences
WebPreferences
Categories
Admin Documentation
Admin Tools
Developer Doc
User Documentation
User Tools
Webs
GNHLUG
Main
Org
TWiki
Copyright © 1999-2025 by the contributing authors. All material from TWiki is the property of the contributing authors.
Questions, comments, or concerns?
Contact GNHLUG
.
All use of this site subject to our
Legal Notice
(includes Terms of Service).